projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove set_default_params method from client.py
[osm/osmclient.git]
/
osmclient
/
sol005
/
ns.py
diff --git
a/osmclient/sol005/ns.py
b/osmclient/sol005/ns.py
index
00d68d6
..
50a1dba
100644
(file)
--- a/
osmclient/sol005/ns.py
+++ b/
osmclient/sol005/ns.py
@@
-278,10
+278,7
@@
class Ns(object):
)
headers = self._client._headers
headers["Content-Type"] = "application/yaml"
)
headers = self._client._headers
headers["Content-Type"] = "application/yaml"
- http_header = [
- "{}: {}".format(key, val) for (key, val) in list(headers.items())
- ]
- self._http.set_http_header(http_header)
+ self._http.set_http_header(headers)
http_code, resp = self._http.post_cmd(
endpoint=self._apiBase, postfields_dict=ns
)
http_code, resp = self._http.post_cmd(
endpoint=self._apiBase, postfields_dict=ns
)
@@
-589,7
+586,7
@@
class Ns(object):
http_code, resp = self._http.get2_cmd(
"{}/{}".format(self._apiBase, uuid)
)
http_code, resp = self._http.get2_cmd(
"{}/{}".format(self._apiBase, uuid)
)
- if not uuid:
+ else: # if not uuid
http_code, resp = self._http.get2_cmd(
"{}/{}/{}/{}".format(self._apiBase, uuid, project_name, ns_id)
)
http_code, resp = self._http.get2_cmd(
"{}/{}/{}/{}".format(self._apiBase, uuid, project_name, ns_id)
)