Exemple #1
0
 def test_update(self):
     vnf_obj = utils.get_dummy_vnf_config_attr()
     vnf_config_obj = utils.get_dummy_vnf_update_config()
     expected_vnf_update = self._get_expected_vnf_update_obj()
     vnf_id = '4a4c2d44-8a52-4895-9a75-9d1c76c3e738'
     self.infra_driver.update(plugin=None, context=self.context,
                              vnf_id=vnf_id, vnf_dict=vnf_obj,
                              vnf=vnf_config_obj,
                              auth_attr=utils.get_vim_auth_obj())
     expected_vnf_update['attributes']['config'] = yaml.safe_load(
         expected_vnf_update['attributes']['config'])
     vnf_obj['attributes']['config'] = yaml.safe_load(vnf_obj['attributes'][
         'config'])
     self.assertEqual(expected_vnf_update, vnf_obj)
 def test_update(self):
     vnf_obj = utils.get_dummy_vnf_config_attr()
     vnf_config_obj = utils.get_dummy_vnf_update_config()
     expected_vnf_update = self._get_expected_vnf_update_obj()
     vnf_id = '4a4c2d44-8a52-4895-9a75-9d1c76c3e738'
     self.infra_driver.update(plugin=None, context=self.context,
                              vnf_id=vnf_id, vnf_dict=vnf_obj,
                              vnf=vnf_config_obj,
                              auth_attr=utils.get_vim_auth_obj())
     expected_vnf_update['attributes']['config'] = yaml.load(
         expected_vnf_update['attributes']['config'])
     vnf_obj['attributes']['config'] = yaml.load(vnf_obj['attributes'][
         'config'])
     self.assertEqual(expected_vnf_update, vnf_obj)