Merge "Bump hacking to 3.0.0"
This commit is contained in:
commit
a399d181e4
|
@ -28,9 +28,9 @@ def _determine_and_check_timeout_interval(timeout, default_timeout,
|
|||
timeout = default_timeout
|
||||
if interval is None:
|
||||
interval = default_interval
|
||||
if (not isinstance(timeout, six.integer_types) or
|
||||
not isinstance(interval, six.integer_types) or
|
||||
timeout < 0 or interval < 0):
|
||||
if (not isinstance(timeout, six.integer_types)
|
||||
or not isinstance(interval, six.integer_types)
|
||||
or timeout < 0 or interval < 0):
|
||||
raise AssertionError(
|
||||
'timeout and interval should be >= 0 or None, current values are: '
|
||||
'%(timeout)s, %(interval)s respectively. If timeout and/or '
|
||||
|
|
|
@ -67,8 +67,9 @@ class BaremetalClient(rest_client.RestClient):
|
|||
|
||||
def request(self, *args, **kwargs):
|
||||
resp, resp_body = super(BaremetalClient, self).request(*args, **kwargs)
|
||||
if (BAREMETAL_MICROVERSION and
|
||||
BAREMETAL_MICROVERSION != api_version_utils.LATEST_MICROVERSION):
|
||||
latest_microversion = api_version_utils.LATEST_MICROVERSION
|
||||
if (BAREMETAL_MICROVERSION
|
||||
and BAREMETAL_MICROVERSION != latest_microversion):
|
||||
api_version_utils.assert_version_header_matches_request(
|
||||
self.api_microversion_header_name,
|
||||
BAREMETAL_MICROVERSION,
|
||||
|
|
|
@ -459,8 +459,8 @@ class BaremetalStandaloneScenarioTest(BaremetalStandaloneManager):
|
|||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaremetalStandaloneScenarioTest, cls).skip_checks()
|
||||
if (cls.driver not in CONF.baremetal.enabled_drivers +
|
||||
CONF.baremetal.enabled_hardware_types):
|
||||
if (cls.driver not in CONF.baremetal.enabled_drivers
|
||||
+ CONF.baremetal.enabled_hardware_types):
|
||||
raise cls.skipException(
|
||||
'The driver: %(driver)s used in test is not in the list of '
|
||||
'enabled_drivers %(enabled_drivers)s or '
|
||||
|
|
|
@ -64,10 +64,10 @@ class InspectorScenarioTest(BaremetalScenarioTest):
|
|||
# microversion
|
||||
self.useFixture(IronicMicroversionFixture(self.ironic_api_version))
|
||||
self.flavor = self.baremetal_flavor()
|
||||
self.node_ids = {node['uuid'] for node in
|
||||
self.node_filter(filter=lambda node:
|
||||
node['provision_state'] ==
|
||||
BaremetalProvisionStates.AVAILABLE)}
|
||||
self.node_ids = {
|
||||
node['uuid'] for node in self.node_filter(
|
||||
filter=lambda node:
|
||||
node['provision_state'] == BaremetalProvisionStates.AVAILABLE)}
|
||||
self.rule_purge()
|
||||
|
||||
def item_filter(self, list_method, show_method,
|
||||
|
@ -204,8 +204,8 @@ class InspectorScenarioTest(BaremetalScenarioTest):
|
|||
raise exceptions.IntrospectionFailed(message)
|
||||
not_introspected = not_introspected - {node_id}
|
||||
|
||||
if (int(time.time()) - start >=
|
||||
CONF.baremetal_introspection.introspection_timeout):
|
||||
if (int(time.time()) - start
|
||||
>= CONF.baremetal_introspection.introspection_timeout):
|
||||
message = ('Introspection timed out for nodes: %s' %
|
||||
not_introspected)
|
||||
raise exceptions.IntrospectionTimeout(message)
|
||||
|
@ -228,8 +228,8 @@ class InspectorScenarioTest(BaremetalScenarioTest):
|
|||
raise exceptions.HypervisorUpdateTimeout(message)
|
||||
|
||||
def node_cleanup(self, node_id):
|
||||
if (self.node_show(node_id)['provision_state'] ==
|
||||
BaremetalProvisionStates.AVAILABLE):
|
||||
if (self.node_show(node_id)['provision_state']
|
||||
== BaremetalProvisionStates.AVAILABLE):
|
||||
return
|
||||
# in case when introspection failed we need set provision state
|
||||
# to 'manage' to make it possible transit into 'provide' state
|
||||
|
|
|
@ -44,8 +44,8 @@ class BaremetalMultitenancy(baremetal_manager.BaremetalScenarioTest,
|
|||
if not CONF.baremetal.use_provision_network:
|
||||
msg = 'Ironic/Neutron tenant isolation is not configured.'
|
||||
raise cls.skipException(msg)
|
||||
if (CONF.baremetal.available_nodes is not None and
|
||||
CONF.baremetal.available_nodes < 2):
|
||||
if (CONF.baremetal.available_nodes is not None
|
||||
and CONF.baremetal.available_nodes < 2):
|
||||
msg = ('Not enough baremetal nodes, %d configured, test requires '
|
||||
'a minimum of 2') % CONF.baremetal.available_nodes
|
||||
raise cls.skipException(msg)
|
||||
|
|
|
@ -44,8 +44,8 @@ class BaremetalSingleTenant(baremetal_manager.BaremetalScenarioTest,
|
|||
if not CONF.baremetal.use_provision_network:
|
||||
msg = 'Ironic/Neutron tenant isolation is not configured.'
|
||||
raise cls.skipException(msg)
|
||||
if (CONF.baremetal.available_nodes is not None and
|
||||
CONF.baremetal.available_nodes < 2):
|
||||
if (CONF.baremetal.available_nodes is not None
|
||||
and CONF.baremetal.available_nodes < 2):
|
||||
msg = ('Not enough baremetal nodes, %d configured, test requires '
|
||||
'a minimum of 2') % CONF.baremetal.available_nodes
|
||||
raise cls.skipException(msg)
|
||||
|
|
|
@ -92,9 +92,9 @@ class InspectorDiscoveryTest(introspection_manager.InspectorScenarioTest):
|
|||
|
||||
discovered_node = None
|
||||
for node in nodes:
|
||||
if (node['provision_state'] == ProvisionStates.AVAILABLE or
|
||||
node['provision_state'] == ProvisionStates.ENROLL or
|
||||
node['provision_state'] is ProvisionStates.NOSTATE):
|
||||
if (node['provision_state'] == ProvisionStates.AVAILABLE
|
||||
or node['provision_state'] == ProvisionStates.ENROLL
|
||||
or node['provision_state'] is ProvisionStates.NOSTATE):
|
||||
discovered_node = node['uuid']
|
||||
break
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
hacking>=3.0.0,<3.1.0 # Apache-2.0
|
||||
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -36,7 +36,9 @@ commands = sphinx-build -b latex doc/source doc/build/pdf
|
|||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = E129
|
||||
# [E129] Visually indented line with same indent as next logical line.
|
||||
# [W503] Line break occurred before a binary operator. Conflicts with W504.
|
||||
ignore = E129,W503
|
||||
|
||||
show-source = True
|
||||
builtins = _
|
||||
|
|
Loading…
Reference in New Issue