X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_nbi%2Fadmin_topics.py;h=9f6f6d7de0ec75485da62deeeec221514b0a20b6;hb=refs%2Fchanges%2F68%2F12968%2F1;hp=b695693a65869c88b0289f9723911e7e16181fbe;hpb=44f5ec188a1b89ecec4e0e6dd85216b67d6c04cd;p=osm%2FNBI.git diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index b695693..9f6f6d7 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -345,7 +345,6 @@ class CommonVimWimSdn(BaseTopic): schema_version ) or self.config_to_encrypt.get("default") if edit_content.get("config") and config_to_encrypt_keys: - for p in config_to_encrypt_keys: if edit_content["config"].get(p): final_content["config"][p] = self.db.encrypt( @@ -399,48 +398,25 @@ class CommonVimWimSdn(BaseTopic): 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 - } + "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 - } + "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 - } + "networks": {"total": None, "used": None}, + "subnets": {"total": None, "used": None}, + "floating_ips": {"total": None, "used": None}, + } + content["resources"] = { + "compute": compute, + "storage": storage, + "network": network, } - content["resources"] = {"compute": compute, "storage": storage, "network": network} return "{}:0".format(content["_id"]) @@ -1097,7 +1073,6 @@ class UserTopicAuth(UserTopic): mapping["role"], mapping["role_name"], ): - if mapping in mappings_to_remove: # do not remove mappings_to_remove.remove(mapping) break # do not add, it is already at user