"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ironic/tests/unit/objects/test_node.py" between
ironic-17.0.2.tar.gz and ironic-17.0.3.tar.gz

About: OpenStack Ironic (Optional Service: Bare-Metal Provisioning) aims to provision bare metal machines instead of virtual machines, forked from the Nova baremetal driver.
The "Wallaby" series (latest release).

test_node.py  (ironic-17.0.2):test_node.py  (ironic-17.0.3)
skipping to change at line 63 skipping to change at line 63
self.node.instance_info['configdrive'] = 'data' self.node.instance_info['configdrive'] = 'data'
self.node.driver_internal_info['agent_secret_token'] = 'abc' self.node.driver_internal_info['agent_secret_token'] = 'abc'
d = self.node.as_dict(secure=True) d = self.node.as_dict(secure=True)
self.assertEqual('******', d['driver_info']['ipmi_password']) self.assertEqual('******', d['driver_info']['ipmi_password'])
self.assertEqual('******', d['instance_info']['configdrive']) self.assertEqual('******', d['instance_info']['configdrive'])
self.assertEqual('******', self.assertEqual('******',
d['driver_internal_info']['agent_secret_token']) d['driver_internal_info']['agent_secret_token'])
# Ensure the node can be serialised. # Ensure the node can be serialised.
jsonutils.dumps(d) jsonutils.dumps(d)
def test_as_dict_secure_with_configdrive(self):
self.node.driver_info['ipmi_password'] = 'fake'
self.node.instance_info['configdrive'] = 'data'
self.node.driver_internal_info['agent_secret_token'] = 'abc'
d = self.node.as_dict(secure=True, mask_configdrive=False)
self.assertEqual('******', d['driver_info']['ipmi_password'])
self.assertEqual('data', d['instance_info']['configdrive'])
self.assertEqual('******',
d['driver_internal_info']['agent_secret_token'])
# Ensure the node can be serialised.
jsonutils.dumps(d)
def test_as_dict_with_traits(self): def test_as_dict_with_traits(self):
self.fake_node['traits'] = ['CUSTOM_1'] self.fake_node['traits'] = ['CUSTOM_1']
self.node = obj_utils.get_test_node(self.ctxt, **self.fake_node) self.node = obj_utils.get_test_node(self.ctxt, **self.fake_node)
d = self.node.as_dict() d = self.node.as_dict()
expected_traits = {'objects': [{'trait': 'CUSTOM_1'}]} expected_traits = {'objects': [{'trait': 'CUSTOM_1'}]}
self.assertEqual(expected_traits, d['traits']) self.assertEqual(expected_traits, d['traits'])
# Ensure the node can be serialised. # Ensure the node can be serialised.
jsonutils.dumps(d) jsonutils.dumps(d)
def test_get_by_id(self): def test_get_by_id(self):
 End of changes. 1 change blocks. 
0 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)