projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unnecessary commands in stage-archive.sh
[osm/osmclient.git]
/
osmclient
/
sol005
/
vca.py
diff --git
a/osmclient/sol005/vca.py
b/osmclient/sol005/vca.py
index
763739c
..
211fe0f
100644
(file)
--- a/
osmclient/sol005/vca.py
+++ b/
osmclient/sol005/vca.py
@@
-20,12
+20,14
@@
from osmclient.common import utils
from osmclient.common.exceptions import NotFound
from osmclient.common.exceptions import ClientException
import json
from osmclient.common.exceptions import NotFound
from osmclient.common.exceptions import ClientException
import json
+import logging
class VCA(object):
def __init__(self, http=None, client=None):
self._http = http
self._client = client
class VCA(object):
def __init__(self, http=None, client=None):
self._http = http
self._client = client
+ self._logger = logging.getLogger("osmclient")
self._apiName = "/admin"
self._apiVersion = "/v1"
self._apiResource = "/vca"
self._apiName = "/admin"
self._apiVersion = "/v1"
self._apiResource = "/vca"
@@
-34,6
+36,7
@@
class VCA(object):
)
def create(self, name, vca):
)
def create(self, name, vca):
+ self._logger.debug("")
self._client.get_token()
http_code, resp = self._http.post_cmd(
endpoint=self._apiBase, postfields_dict=vca
self._client.get_token()
http_code, resp = self._http.post_cmd(
endpoint=self._apiBase, postfields_dict=vca
@@
-44,6
+47,7
@@
class VCA(object):
print(resp["id"])
def update(self, name, vca):
print(resp["id"])
def update(self, name, vca):
+ self._logger.debug("")
self._client.get_token()
vca_id = self.get(name)["_id"]
self._http.patch_cmd(
self._client.get_token()
vca_id = self.get(name)["_id"]
self._http.patch_cmd(
@@
-52,6
+56,7
@@
class VCA(object):
)
def get_id(self, name):
)
def get_id(self, name):
+ self._logger.debug("")
"""Returns a VCA id from a VCA name"""
for vca in self.list():
if name == vca["name"]:
"""Returns a VCA id from a VCA name"""
for vca in self.list():
if name == vca["name"]:
@@
-59,6
+64,7
@@
class VCA(object):
raise NotFound("VCA {} not found".format(name))
def delete(self, name, force=False):
raise NotFound("VCA {} not found".format(name))
def delete(self, name, force=False):
+ self._logger.debug("")
self._client.get_token()
vca_id = name
if not utils.validate_uuid4(name):
self._client.get_token()
vca_id = name
if not utils.validate_uuid4(name):
@@
-77,6
+83,7
@@
class VCA(object):
def list(self, cmd_filter=None):
"""Returns a list of K8s clusters"""
def list(self, cmd_filter=None):
"""Returns a list of K8s clusters"""
+ self._logger.debug("")
self._client.get_token()
filter_string = ""
if cmd_filter:
self._client.get_token()
filter_string = ""
if cmd_filter:
@@
-88,6
+95,7
@@
class VCA(object):
def get(self, name):
"""Returns a VCA based on name or id"""
def get(self, name):
"""Returns a VCA based on name or id"""
+ self._logger.debug("")
self._client.get_token()
vca_id = name
if not utils.validate_uuid4(name):
self._client.get_token()
vca_id = name
if not utils.validate_uuid4(name):