Bump hacking to 3.0.0
Change-Id: I6979eacbb9b4d062d7f0fb8228dbef6b97da416e
This commit is contained in:
parent
d8191f9ab2
commit
ec13cbad48
|
@ -24,5 +24,5 @@ class IntelNMHardware(ipmi.IPMIHardware):
|
||||||
@property
|
@property
|
||||||
def supported_vendor_interfaces(self):
|
def supported_vendor_interfaces(self):
|
||||||
"""List of supported vendor interfaces."""
|
"""List of supported vendor interfaces."""
|
||||||
return (super(IntelNMHardware, self).supported_vendor_interfaces +
|
return (super(IntelNMHardware, self).supported_vendor_interfaces
|
||||||
[nm_vendor.IntelNMVendorPassthru])
|
+ [nm_vendor.IntelNMVendorPassthru])
|
||||||
|
|
|
@ -245,8 +245,8 @@ def set_policy(policy):
|
||||||
policy['trigger_limit'] = 0
|
policy['trigger_limit'] = 0
|
||||||
|
|
||||||
cmd = _create_command_head(POLICY_SET)
|
cmd = _create_command_head(POLICY_SET)
|
||||||
_append_to_command(cmd, _hex(DOMAINS[policy['domain_id']] |
|
_append_to_command(cmd, _hex(DOMAINS[policy['domain_id']]
|
||||||
0x10 if policy['enable'] else 0x00))
|
| 0x10 if policy['enable'] else 0x00))
|
||||||
_append_to_command(cmd, _hex(policy['policy_id']))
|
_append_to_command(cmd, _hex(policy['policy_id']))
|
||||||
# 0x10 is policy add flag
|
# 0x10 is policy add flag
|
||||||
flags = TRIGGERS[policy['policy_trigger']]
|
flags = TRIGGERS[policy['policy_trigger']]
|
||||||
|
@ -341,10 +341,9 @@ def get_capabilities(data):
|
||||||
cmd = _create_command_head(CAPABILITIES_GET)
|
cmd = _create_command_head(CAPABILITIES_GET)
|
||||||
_append_to_command(cmd, _hex(DOMAINS[data['domain_id']]))
|
_append_to_command(cmd, _hex(DOMAINS[data['domain_id']]))
|
||||||
power_policy = 0x10
|
power_policy = 0x10
|
||||||
_append_to_command(cmd, _hex(TRIGGERS[data['policy_trigger']] |
|
_append_to_command(cmd, _hex(TRIGGERS[data['policy_trigger']]
|
||||||
power_policy |
|
| power_policy
|
||||||
POWER_DOMAIN[data['power_domain']]))
|
| POWER_DOMAIN[data['power_domain']]))
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ class IntelNMVendorPassthru(base.VendorInterface):
|
||||||
'communication_failures')
|
'communication_failures')
|
||||||
|
|
||||||
if kwargs['scope'] == 'policy' and 'policy_id' not in kwargs:
|
if kwargs['scope'] == 'policy' and 'policy_id' not in kwargs:
|
||||||
raise exception.MissingParameterValue(_('Missing "policy_id"'))
|
raise exception.MissingParameterValue(_('Missing "policy_id"'))
|
||||||
|
|
||||||
if kwargs.get('parameter_name') not in global_params:
|
if kwargs.get('parameter_name') not in global_params:
|
||||||
if 'domain_id' not in kwargs:
|
if 'domain_id' not in kwargs:
|
||||||
|
@ -197,11 +197,11 @@ class IntelNMVendorPassthru(base.VendorInterface):
|
||||||
_('Parameter name is mandatory for getting statistics'))
|
_('Parameter name is mandatory for getting statistics'))
|
||||||
# valid parameters depend on scope
|
# valid parameters depend on scope
|
||||||
if (kwargs['parameter_name'] not in
|
if (kwargs['parameter_name'] not in
|
||||||
nm_commands.STATISTICS[kwargs['scope']]):
|
nm_commands.STATISTICS[kwargs['scope']]):
|
||||||
raise exception.InvalidParameterValue(
|
raise exception.InvalidParameterValue(
|
||||||
_('Invalid parameter name %(param)s for scope '
|
_('Invalid parameter name %(param)s for scope '
|
||||||
'%(scope)s') % {'param': kwargs['parameter_name'],
|
'%(scope)s') % {'param': kwargs['parameter_name'],
|
||||||
'scope': kwargs['scope']})
|
'scope': kwargs['scope']})
|
||||||
|
|
||||||
def get_properties(self):
|
def get_properties(self):
|
||||||
"""Returns the properties of the interface.."""
|
"""Returns the properties of the interface.."""
|
||||||
|
|
|
@ -118,8 +118,8 @@ def _parse_driver_info(node):
|
||||||
insecure = driver_info['ovirt_insecure']
|
insecure = driver_info['ovirt_insecure']
|
||||||
ovirt_ca_file = driver_info['ovirt_ca_file']
|
ovirt_ca_file = driver_info['ovirt_ca_file']
|
||||||
if not insecure and ovirt_ca_file is None:
|
if not insecure and ovirt_ca_file is None:
|
||||||
msg = _("Missing ovirt_ca_file in the node's driver_info")
|
msg = _("Missing ovirt_ca_file in the node's driver_info")
|
||||||
raise exception.MissingParameterValue(msg)
|
raise exception.MissingParameterValue(msg)
|
||||||
return driver_info
|
return driver_info
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -114,8 +114,8 @@ class IntelNMPoliciesCommandTestCase(base.TestCase):
|
||||||
|
|
||||||
def test_remove_policy(self):
|
def test_remove_policy(self):
|
||||||
data = {'domain_id': 'platform', 'policy_id': 123}
|
data = {'domain_id': 'platform', 'policy_id': 123}
|
||||||
expected = (['0x2E', '0xC1', '0x57', '0x01', '0x00', '0x00', '0x7B'] +
|
expected = (['0x2E', '0xC1', '0x57', '0x01', '0x00', '0x00', '0x7B']
|
||||||
['0x00'] * 12)
|
+ ['0x00'] * 12)
|
||||||
result = commands.remove_policy(data)
|
result = commands.remove_policy(data)
|
||||||
self.assertEqual(expected, result)
|
self.assertEqual(expected, result)
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,8 @@ class IntelNMPassthruTestCase(db_base.DbTestCase):
|
||||||
enabled_management_interfaces=['ipmitool'])
|
enabled_management_interfaces=['ipmitool'])
|
||||||
self.node = obj_utils.create_test_node(self.context,
|
self.node = obj_utils.create_test_node(self.context,
|
||||||
driver='staging-nm')
|
driver='staging-nm')
|
||||||
self.temp_filename = os.path.join(CONF.tempdir, self.node.uuid +
|
self.temp_filename = os.path.join(CONF.tempdir, self.node.uuid
|
||||||
'.sdr')
|
+ '.sdr')
|
||||||
|
|
||||||
@mock.patch.object(ironic_utils, 'unlink_without_raise', spec_set=True,
|
@mock.patch.object(ironic_utils, 'unlink_without_raise', spec_set=True,
|
||||||
autospec=True)
|
autospec=True)
|
||||||
|
|
|
@ -19,7 +19,7 @@ flake8-import-order==0.11
|
||||||
flake8==2.5.5
|
flake8==2.5.5
|
||||||
future==0.16.0
|
future==0.16.0
|
||||||
greenlet==0.4.13
|
greenlet==0.4.13
|
||||||
hacking==0.12.0
|
hacking==3.0.0
|
||||||
idna==2.6
|
idna==2.6
|
||||||
imagesize==1.0.0
|
imagesize==1.0.0
|
||||||
ironic-lib==2.5.0
|
ironic-lib==2.5.0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# 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
|
||||||
flake8-import-order==0.11 # LGPLv3
|
flake8-import-order==0.11 # LGPLv3
|
||||||
|
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
|
|
|
@ -29,8 +29,8 @@ def filter_ep_names(eps, ep_type, skips=None, filters=None):
|
||||||
filters = []
|
filters = []
|
||||||
|
|
||||||
def filter_func(name):
|
def filter_func(name):
|
||||||
return (all([s not in name for s in skips]) and
|
return (all([s not in name for s in skips])
|
||||||
all([f in name for f in filters]))
|
and all([f in name for f in filters]))
|
||||||
|
|
||||||
return filter(filter_func, list(eps.get(ep_type, {}).keys()))
|
return filter(filter_func, list(eps.get(ep_type, {}).keys()))
|
||||||
|
|
||||||
|
|
3
tox.ini
3
tox.ini
|
@ -52,7 +52,8 @@ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenote
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# [E129] visually indented line with same indent as next logical line
|
# [E129] visually indented line with same indent as next logical line
|
||||||
ignore = E129
|
# [W503] Line break before binary operator.
|
||||||
|
ignore = E129,W503
|
||||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
import-order-style = pep8
|
import-order-style = pep8
|
||||||
application-import-names = ironic_staging_drivers
|
application-import-names = ironic_staging_drivers
|
||||||
|
|
Loading…
Reference in New Issue