projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug 2017: Skip exception if model has been removed
[osm/N2VC.git]
/
n2vc
/
k8s_juju_conn.py
diff --git
a/n2vc/k8s_juju_conn.py
b/n2vc/k8s_juju_conn.py
index
f8ed0e0
..
fb15be7
100644
(file)
--- a/
n2vc/k8s_juju_conn.py
+++ b/
n2vc/k8s_juju_conn.py
@@
-13,6
+13,7
@@
# limitations under the License.
import asyncio
# limitations under the License.
import asyncio
+from typing import Union
import os
import uuid
import yaml
import os
import uuid
import yaml
@@
-129,7
+130,7
@@
class K8sJujuConnector(K8sConnector):
cleanup_data.append(
{
"delete": kubectl.delete_cluster_role,
cleanup_data.append(
{
"delete": kubectl.delete_cluster_role,
- "args": (metadata_name),
+ "args": (metadata_name
,
),
}
)
}
)
@@
-140,7
+141,7
@@
class K8sJujuConnector(K8sConnector):
cleanup_data.append(
{
"delete": kubectl.delete_service_account,
cleanup_data.append(
{
"delete": kubectl.delete_service_account,
- "args": (metadata_name),
+ "args": (metadata_name
,
),
}
)
}
)
@@
-151,7
+152,7
@@
class K8sJujuConnector(K8sConnector):
cleanup_data.append(
{
"delete": kubectl.delete_service_account,
cleanup_data.append(
{
"delete": kubectl.delete_service_account,
- "args": (metadata_name),
+ "args": (metadata_name
,
),
}
)
token, client_cert_data = await kubectl.get_secret_data(
}
)
token, client_cert_data = await kubectl.get_secret_data(
@@
-303,6
+304,10
@@
class K8sJujuConnector(K8sConnector):
raise K8sException("bundle must be set")
if bundle.startswith("cs:"):
raise K8sException("bundle must be set")
if bundle.startswith("cs:"):
+ # For Juju Bundles provided by the Charm Store
+ pass
+ elif bundle.startswith("ch:"):
+ # For Juju Bundles provided by the Charm Hub (this only works for juju version >= 2.9)
pass
elif bundle.startswith("http"):
# Download the file
pass
elif bundle.startswith("http"):
# Download the file
@@
-642,7
+647,7
@@
class K8sJujuConnector(K8sConnector):
complete_status: bool = False,
yaml_format: bool = False,
**kwargs,
complete_status: bool = False,
yaml_format: bool = False,
**kwargs,
- ) ->
dict
:
+ ) ->
Union[str, dict]
:
"""Get the status of the KDU
Get the current status of the KDU instance.
"""Get the status of the KDU
Get the current status of the KDU instance.