projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
all-projects and public general options
[osm/osmclient.git]
/
osmclient
/
sol005
/
sdncontroller.py
diff --git
a/osmclient/sol005/sdncontroller.py
b/osmclient/sol005/sdncontroller.py
index
2a4d409
..
35ad9ee
100644
(file)
--- a/
osmclient/sol005/sdncontroller.py
+++ b/
osmclient/sol005/sdncontroller.py
@@
-20,8
+20,8
@@
OSM SDN controller API handling
from osmclient.common import utils
from osmclient.common import wait as WaitForStatus
from osmclient.common import utils
from osmclient.common import wait as WaitForStatus
+from osmclient.common.exceptions import ClientException
from osmclient.common.exceptions import NotFound
from osmclient.common.exceptions import NotFound
-from osmclient.common.exceptions import OsmHttpException
import json
import logging
import json
import logging
@@
-75,7
+75,7
@@
class SdnController(object):
if resp:
resp = json.loads(resp)
if not resp or 'id' not in resp:
if resp:
resp = json.loads(resp)
if not resp or 'id' not in resp:
- raise
OsmHttp
Exception('unexpected response from server - {}'.format(
+ raise
Client
Exception('unexpected response from server - {}'.format(
resp))
if wait:
# Wait for status for SDNC instance creation
resp))
if wait:
# Wait for status for SDNC instance creation
@@
-106,8
+106,8
@@
class SdnController(object):
wait_id = sdnc_id_for_wait
# Wait for status for VI instance update
self._wait(wait_id)
wait_id = sdnc_id_for_wait
# Wait for status for VI instance update
self._wait(wait_id)
- else:
- pass
+
#
else:
+
#
pass
#else:
# msg = ""
# if resp:
#else:
# msg = ""
# if resp:
@@
-140,13
+140,13
@@
class SdnController(object):
elif resp and 'result' in resp:
print('Deleted')
else:
elif resp and 'result' in resp:
print('Deleted')
else:
- msg = ""
- if resp:
- try:
- msg = json.loads(resp)
- except ValueError:
- msg = resp
- raise
OsmHttp
Exception("failed to delete SDN controller {} - {}".format(name, msg))
+ msg =
resp or
""
+
#
if resp:
+
#
try:
+
#
msg = json.loads(resp)
+
#
except ValueError:
+
#
msg = resp
+ raise
Client
Exception("failed to delete SDN controller {} - {}".format(name, msg))
def list(self, filter=None):
"""Returns a list of SDN controllers
def list(self, filter=None):
"""Returns a list of SDN controllers