Modified the VNFD Resource state to OnBoarded

Currently, in Horizon and CLI, the display for the the VNFD state
is set to "Not Applicable".Modified to display "OnBoarded" once the
VNFD is created..

Change-Id: I1a67638b488895378b16662625cab0f8bca90e53
Closes-Bug: #1623067
This commit is contained in:
Manikantha Srinivas Tadi 2016-09-20 06:42:00 -04:00 committed by bharaththiruveedula
parent d601ac6cdb
commit 6f2c152434
3 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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"

View File

@ -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):