diff --git a/tacker/db/vnfm/vnfm_db.py b/tacker/db/vnfm/vnfm_db.py index b2e7aa64f..6ca2041eb 100644 --- a/tacker/db/vnfm/vnfm_db.py +++ b/tacker/db/vnfm/vnfm_db.py @@ -265,7 +265,7 @@ class VNFMPluginDb(vnfm.VNFMPluginBase, db_base.CommonDbMixin): self._cos_db_plg.create_event( context, res_id=vnfd_dict['id'], res_type=constants.RES_TYPE_VNFD, - res_state=constants.RES_EVT_VNFD_NA_STATE, + res_state=constants.RES_EVT_VNFD_ONBOARDED, evt_type=constants.RES_EVT_CREATE, tstamp=vnfd_dict[constants.RES_EVT_CREATED_FLD]) return vnfd_dict diff --git a/tacker/plugins/common/constants.py b/tacker/plugins/common/constants.py index e65d4a6fd..b590eb4ae 100644 --- a/tacker/plugins/common/constants.py +++ b/tacker/plugins/common/constants.py @@ -65,6 +65,7 @@ RES_EVT_UPDATE = "UPDATE" RES_EVT_MONITOR = "MONITOR" RES_EVT_SCALE = "SCALE" RES_EVT_VNFD_NA_STATE = "Not Applicable" +RES_EVT_VNFD_ONBOARDED = "OnBoarded" RES_EVT_CREATED_FLD = "created_at" RES_EVT_DELETED_FLD = "deleted_at" diff --git a/tacker/tests/unit/vm/test_plugin.py b/tacker/tests/unit/vm/test_plugin.py index 5d2da2c20..4bddd3aed 100644 --- a/tacker/tests/unit/vm/test_plugin.py +++ b/tacker/tests/unit/vm/test_plugin.py @@ -228,7 +228,7 @@ class TestVNFMPlugin(db_base.SqlTestCase): mock_update_imports.assert_called_once_with(yaml_dict) self._cos_db_plugin.create_event.assert_called_once_with( self.context, evt_type=constants.RES_EVT_CREATE, res_id=mock.ANY, - res_state=constants.RES_EVT_VNFD_NA_STATE, + res_state=constants.RES_EVT_VNFD_ONBOARDED, res_type=constants.RES_TYPE_VNFD, tstamp=mock.ANY) def test_create_vnfd_no_service_types(self):