Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Update local hacking checks for new flake8. Remove hacking and friends from lower-constraints, they are not needed to be installed at run-time. Change-Id: Ia6af344ec8441dc98a0820176373dcff3a8c80d5
This commit is contained in:
@@ -140,7 +140,7 @@ class BaseAction(loadable.Loadable):
|
||||
raise NotImplementedError()
|
||||
|
||||
def check_abort(self):
|
||||
if self.__class__.__name__ is 'Migrate':
|
||||
if self.__class__.__name__ == 'Migrate':
|
||||
if self.migration_type == self.LIVE_MIGRATION:
|
||||
return True
|
||||
else:
|
||||
|
||||
@@ -47,24 +47,24 @@ class Resize(base.BaseAction):
|
||||
|
||||
@property
|
||||
def schema(self):
|
||||
return {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'resource_id': {
|
||||
'type': 'string',
|
||||
'minlength': 1,
|
||||
'pattern': ('^([a-fA-F0-9]){8}-([a-fA-F0-9]){4}-'
|
||||
'([a-fA-F0-9]){4}-([a-fA-F0-9]){4}-'
|
||||
'([a-fA-F0-9]){12}$')
|
||||
},
|
||||
'flavor': {
|
||||
'type': 'string',
|
||||
'minlength': 1,
|
||||
},
|
||||
return {
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'resource_id': {
|
||||
'type': 'string',
|
||||
'minlength': 1,
|
||||
'pattern': ('^([a-fA-F0-9]){8}-([a-fA-F0-9]){4}-'
|
||||
'([a-fA-F0-9]){4}-([a-fA-F0-9]){4}-'
|
||||
'([a-fA-F0-9]){12}$')
|
||||
},
|
||||
'required': ['resource_id', 'flavor'],
|
||||
'additionalProperties': False,
|
||||
}
|
||||
'flavor': {
|
||||
'type': 'string',
|
||||
'minlength': 1,
|
||||
},
|
||||
},
|
||||
'required': ['resource_id', 'flavor'],
|
||||
'additionalProperties': False,
|
||||
}
|
||||
|
||||
@property
|
||||
def instance_uuid(self):
|
||||
|
||||
@@ -112,7 +112,7 @@ class DefaultWorkFlowEngine(base.BaseWorkFlowEngine):
|
||||
|
||||
return flow
|
||||
|
||||
except exception.ActionPlanCancelled as e:
|
||||
except exception.ActionPlanCancelled:
|
||||
raise
|
||||
|
||||
except tf_exception.WrappedFailure as e:
|
||||
|
||||
Reference in New Issue
Block a user