X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_nbi%2Fadmin_topics.py;h=b695693a65869c88b0289f9723911e7e16181fbe;hb=refs%2Ftags%2Fv12.0.8;hp=786d237ec4fba7435e8e6cf1fd0a39f35d1e3517;hpb=5758955b7b394517ff5caf5506a4400cdc5aa372;p=osm%2FNBI.git diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index 786d237..b695693 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -395,6 +395,52 @@ 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"]) @@ -522,7 +568,7 @@ class WimAccountTopic(CommonVimWimSdn): schema_new = wim_account_new_schema schema_edit = wim_account_edit_schema multiproject = True - password_to_encrypt = "wim_password" + password_to_encrypt = "password" config_to_encrypt = {} @@ -1098,6 +1144,7 @@ class UserTopicAuth(UserTopic): "_id": _id, "username": indata.get("username"), "password": indata.get("password"), + "old_password": indata.get("old_password"), "add_project_role_mappings": mappings_to_add, "remove_project_role_mappings": mappings_to_remove, }