X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fadmin_topics.py;h=51a696394a4f6bde318e69d6074c8f22a374760d;hp=786d237ec4fba7435e8e6cf1fd0a39f35d1e3517;hb=d1eaf98e0c5ccf46aab538dcd5659ecb23b85559;hpb=f2feafd63f9ca5f5a4aacde951cef64f2e890e6c diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index 786d237..51a6963 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -395,6 +395,53 @@ class CommonVimWimSdn(BaseTopic): # create operation content["_admin"]["operations"] = [self._create_operation("create")] content["_admin"]["current_operation"] = None + # create Resource in Openstack based VIM + if content.get("vim_type"): + if content["vim_type"] == "openstack": + compute = { + "ram": { + "total": None, + "used": None + }, + "vcpus": { + "total": None, + "used": None + }, + "instances": { + "total": None, + "used": None + } + } + storage = { + "volumes": { + "total": None, + "used": None + }, + "snapshots": { + "total": None, + "used": None + }, + "storage": { + "total": None, + "used": None + } + } + network = { + "networks": { + "total": None, + "used": None + }, + "subnets": { + "total": None, + "used": None + }, + "floating_ips": { + "total": None, + "used": None + } + } + content["resources"] = {"compute": compute, "storage": storage, "network": network} + return "{}:0".format(content["_id"])