projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Coverity-CWE 330: Use of Insufficiently Random Values
[osm/N2VC.git]
/
n2vc
/
k8s_helm_conn.py
diff --git
a/n2vc/k8s_helm_conn.py
b/n2vc/k8s_helm_conn.py
index
0ea8920
..
bbe4c48
100644
(file)
--- a/
n2vc/k8s_helm_conn.py
+++ b/
n2vc/k8s_helm_conn.py
@@
-78,12
+78,9
@@
class K8sHelmConnector(K8sHelmBaseConnector):
else "--skip-repos",
)
try:
else "--skip-repos",
)
try:
- asyncio.
ensure_future
(
+ asyncio.
create_task
(
self._local_async_exec(command=command, raise_exception_on_error=False)
)
self._local_async_exec(command=command, raise_exception_on_error=False)
)
- # loop = asyncio.get_event_loop()
- # loop.run_until_complete(self._local_async_exec(command=command,
- # raise_exception_on_error=False))
except Exception as e:
self.warning(
msg="helm init failed (it was already initialized): {}".format(e)
except Exception as e:
self.warning(
msg="helm init failed (it was already initialized): {}".format(e)
@@
-164,7
+161,6
@@
class K8sHelmConnector(K8sHelmBaseConnector):
return True
async def inspect_kdu(self, kdu_model: str, repo_url: str = None) -> str:
return True
async def inspect_kdu(self, kdu_model: str, repo_url: str = None) -> str:
-
self.log.debug(
"inspect kdu_model {} from (optional) repo: {}".format(kdu_model, repo_url)
)
self.log.debug(
"inspect kdu_model {} from (optional) repo: {}".format(kdu_model, repo_url)
)
@@
-235,7
+231,6
@@
class K8sHelmConnector(K8sHelmBaseConnector):
return paths, env
async def _get_services(self, cluster_id, kdu_instance, namespace, kubeconfig):
return paths, env
async def _get_services(self, cluster_id, kdu_instance, namespace, kubeconfig):
-
# init config, env
paths, env = self._init_paths_env(
cluster_name=cluster_id, create_if_not_exist=True
# init config, env
paths, env = self._init_paths_env(
cluster_name=cluster_id, create_if_not_exist=True
@@
-422,7
+417,6
@@
class K8sHelmConnector(K8sHelmBaseConnector):
self.log.debug("namespace not found")
async def _instances_list(self, cluster_id):
self.log.debug("namespace not found")
async def _instances_list(self, cluster_id):
-
# init paths, env
paths, env = self._init_paths_env(
cluster_name=cluster_id, create_if_not_exist=True
# init paths, env
paths, env = self._init_paths_env(
cluster_name=cluster_id, create_if_not_exist=True
@@
-469,7
+463,6
@@
class K8sHelmConnector(K8sHelmBaseConnector):
yaml_format: bool = False,
show_error_log: bool = False,
) -> Union[str, dict]:
yaml_format: bool = False,
show_error_log: bool = False,
) -> Union[str, dict]:
-
self.log.debug(
"status of kdu_instance: {}, namespace: {} ".format(kdu_instance, namespace)
)
self.log.debug(
"status of kdu_instance: {}, namespace: {} ".format(kdu_instance, namespace)
)
@@
-606,7
+599,6
@@
class K8sHelmConnector(K8sHelmBaseConnector):
timeout,
kubeconfig,
) -> str:
timeout,
kubeconfig,
) -> str:
-
timeout_str = ""
if timeout:
timeout_str = "--timeout {}".format(timeout)
timeout_str = ""
if timeout:
timeout_str = "--timeout {}".format(timeout)