projects
/
osm
/
NBI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feature 10999: Dual-Stack IP Support for VNFs in SOL003 VNFM Interface
[osm/NBI.git]
/
osm_nbi
/
admin_topics.py
diff --git
a/osm_nbi/admin_topics.py
b/osm_nbi/admin_topics.py
index
c2767c8
..
de0ad1f
100644
(file)
--- 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:
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(
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 = {
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 = {
}
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 = {
}
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"])
return "{}:0".format(content["_id"])
@@
-464,7
+440,7
@@
class CommonVimWimSdn(BaseTopic):
# remove reference from project_read if there are more projects referencing it. If it last one,
# do not remove reference, but order via kafka to delete it
# remove reference from project_read if there are more projects referencing it. If it last one,
# do not remove reference, but order via kafka to delete it
- if session["project_id"]
and session["project_id"]
:
+ if session["project_id"]:
other_projects_referencing = next(
(
p
other_projects_referencing = next(
(
p
@@
-568,7
+544,7
@@
class WimAccountTopic(CommonVimWimSdn):
schema_new = wim_account_new_schema
schema_edit = wim_account_edit_schema
multiproject = True
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 = {}
config_to_encrypt = {}
@@
-1024,6
+1000,8
@@
class UserTopicAuth(UserTopic):
or indata.get("project_role_mappings")
or indata.get("projects")
or indata.get("add_projects")
or indata.get("project_role_mappings")
or indata.get("projects")
or indata.get("add_projects")
+ or indata.get("unlock")
+ or indata.get("renew")
):
return _id
if indata.get("project_role_mappings") and (
):
return _id
if indata.get("project_role_mappings") and (
@@
-1097,7
+1075,6
@@
class UserTopicAuth(UserTopic):
mapping["role"],
mapping["role_name"],
):
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
if mapping in mappings_to_remove: # do not remove
mappings_to_remove.remove(mapping)
break # do not add, it is already at user
@@
-1144,8
+1121,12
@@
class UserTopicAuth(UserTopic):
"_id": _id,
"username": indata.get("username"),
"password": indata.get("password"),
"_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,
"add_project_role_mappings": mappings_to_add,
"remove_project_role_mappings": mappings_to_remove,
+ "system_admin_id": indata.get("system_admin_id"),
+ "unlock": indata.get("unlock"),
+ "renew": indata.get("renew"),
}
)
data_to_send = {"_id": _id, "changes": indata}
}
)
data_to_send = {"_id": _id, "changes": indata}