projects
/
osm
/
NBI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Feature 9015: use same names for quotas and roles
[osm/NBI.git]
/
osm_nbi
/
nbi.py
diff --git
a/osm_nbi/nbi.py
b/osm_nbi/nbi.py
index
64f071e
..
3172846
100644
(file)
--- a/
osm_nbi/nbi.py
+++ b/
osm_nbi/nbi.py
@@
-115,6
+115,8
@@
URL: /osm GET POST
/<id> O O O
/k8srepos O O
/<id> O O
/<id> O O O
/k8srepos O O
/<id> O O
+ /osmrepos O O
+ /<id> O O
/nst/v1 O O
/netslice_templates_content O O
/nst/v1 O O
/netslice_templates_content O O
@@
-266,6
+268,12
@@
valid_url_methods = {
"ROLE_PERMISSION": "k8srepos:id:"
}
},
"ROLE_PERMISSION": "k8srepos:id:"
}
},
+ "osmrepos": {"METHODS": ("GET", "POST"),
+ "ROLE_PERMISSION": "osmrepos:",
+ "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
+ "ROLE_PERMISSION": "osmrepos:id:"
+ }
+ },
"domains": {"METHODS": ("GET", ),
"ROLE_PERMISSION": "domains:",
},
"domains": {"METHODS": ("GET", ),
"ROLE_PERMISSION": "domains:",
},
@@
-807,8
+815,9
@@
class Server(object):
return_text += " {}: {}\n".format(k, v)
elif cherrypy.request.method == 'GET':
for k, v in kwargs.items():
return_text += " {}: {}\n".format(k, v)
elif cherrypy.request.method == 'GET':
for k, v in kwargs.items():
- self.engine.msg.write(main_topic, k, yaml.load(v), Loader=yaml.SafeLoader)
- return_text += " {}: {}\n".format(k, yaml.load(v), Loader=yaml.SafeLoader)
+ v_dict = yaml.load(v, Loader=yaml.SafeLoader)
+ self.engine.msg.write(main_topic, k, v_dict)
+ return_text += " {}: {}\n".format(k, v_dict)
except Exception as e:
return_text += "Error: " + str(e)
return_text += "</pre></html>\n"
except Exception as e:
return_text += "Error: " + str(e)
return_text += "</pre></html>\n"