hcs-cli 0.1.316__py3-none-any.whl → 0.1.317__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hcs_cli/__init__.py +1 -1
- hcs_cli/provider/hcs/edge.py +89 -83
- {hcs_cli-0.1.316.dist-info → hcs_cli-0.1.317.dist-info}/METADATA +2 -2
- {hcs_cli-0.1.316.dist-info → hcs_cli-0.1.317.dist-info}/RECORD +6 -6
- {hcs_cli-0.1.316.dist-info → hcs_cli-0.1.317.dist-info}/WHEEL +0 -0
- {hcs_cli-0.1.316.dist-info → hcs_cli-0.1.317.dist-info}/entry_points.txt +0 -0
hcs_cli/__init__.py
CHANGED
hcs_cli/provider/hcs/edge.py
CHANGED
|
@@ -29,90 +29,96 @@ def deploy(data: dict, state: dict, save_state) -> dict:
|
|
|
29
29
|
id = deployment["id"]
|
|
30
30
|
providerLabel = data.get("providerLabel")
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
32
|
+
_wait = data.get("_wait", True)
|
|
33
|
+
|
|
34
|
+
if _wait:
|
|
35
|
+
|
|
36
|
+
def is_ready(s):
|
|
37
|
+
return s in [
|
|
38
|
+
"CREATE_PENDING",
|
|
39
|
+
"CREATING",
|
|
40
|
+
"READY",
|
|
41
|
+
"POST_PROVISIONING_CONFIG_IN_PROGRESS",
|
|
42
|
+
"UPDATE_PENDING",
|
|
43
|
+
"UPDATING",
|
|
44
|
+
"UPGRADE_PENDING",
|
|
45
|
+
"UPGRADING",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
def is_error(s):
|
|
49
|
+
return s.endswith("_FAILED") or s in [
|
|
50
|
+
# 'CREATE_FAILED',
|
|
51
|
+
"DELETED",
|
|
52
|
+
# 'DELETE_FAILED',
|
|
53
|
+
"DELETE_PENDING",
|
|
54
|
+
"DELETING",
|
|
55
|
+
"FORCE_DELETE_PENDING",
|
|
56
|
+
"FORCE_DELETING",
|
|
57
|
+
"FORCE_REPAIR_ACCEPTED",
|
|
58
|
+
"FORCE_REPAIR_PENDING",
|
|
59
|
+
# CONNECT_PENDING,
|
|
60
|
+
# CREATE_ACCEPTED,
|
|
61
|
+
# CREATE_FAILED,
|
|
62
|
+
# CREATE_PENDING,
|
|
63
|
+
# CREATING,
|
|
64
|
+
"DELETED",
|
|
65
|
+
# 'DELETE_FAILED',
|
|
66
|
+
"DELETE_PENDING",
|
|
67
|
+
"DELETING",
|
|
68
|
+
"FORCE_DELETE_PENDING",
|
|
69
|
+
"FORCE_DELETING",
|
|
70
|
+
"FORCE_REPAIR_ACCEPTED",
|
|
71
|
+
"FORCE_REPAIR_PENDING",
|
|
72
|
+
# 'MIGRATE_FAILED',
|
|
73
|
+
"MIGRATE_PENDING",
|
|
74
|
+
"MIGRATING",
|
|
75
|
+
# POST_PROVISIONING_CONFIG_IN_PROGRESS,
|
|
76
|
+
# READY,
|
|
77
|
+
"REPAIRING",
|
|
78
|
+
"REPAIR_ACCEPTED",
|
|
79
|
+
# 'REPAIR_FAILED',
|
|
80
|
+
"REPAIR_PENDING",
|
|
81
|
+
# 'UPDATE_FAILED',
|
|
82
|
+
# 'UPDATE_PENDING',
|
|
83
|
+
# 'UPDATING',
|
|
84
|
+
# 'UPGRADE_FAILED',
|
|
85
|
+
# 'UPGRADE_PENDING',
|
|
86
|
+
# 'UPGRADING',
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
def is_transition(s):
|
|
90
|
+
return s.endswith("ING") or s in ["CREATE_ACCEPTED"]
|
|
91
|
+
|
|
92
|
+
if providerLabel == "vsphere":
|
|
93
|
+
polling_interval = "5s"
|
|
94
|
+
timeout = "2m"
|
|
95
|
+
elif providerLabel == "azure":
|
|
96
|
+
# azure
|
|
97
|
+
polling_interval = "1m"
|
|
98
|
+
timeout = "20m"
|
|
99
|
+
elif providerLabel == "akka":
|
|
100
|
+
polling_interval = "5s"
|
|
101
|
+
timeout = "2m"
|
|
102
|
+
else:
|
|
103
|
+
polling_interval = "1m"
|
|
104
|
+
timeout = "20m"
|
|
105
|
+
|
|
106
|
+
try:
|
|
107
|
+
deployment = admin.edge.wait_for(
|
|
108
|
+
id,
|
|
109
|
+
org_id,
|
|
110
|
+
is_ready=is_ready,
|
|
111
|
+
is_error=is_error,
|
|
112
|
+
is_transition=is_transition,
|
|
113
|
+
polling_interval=polling_interval,
|
|
114
|
+
timeout=timeout,
|
|
115
|
+
)
|
|
116
|
+
except Exception as e:
|
|
117
|
+
deployment = admin.edge.get(id, org_id)
|
|
118
|
+
save_state(deployment)
|
|
119
|
+
raise PluginException("Error waiting for edge deployment. Status=" + deployment["status"]) from e
|
|
98
120
|
else:
|
|
99
|
-
|
|
100
|
-
timeout = "20m"
|
|
101
|
-
|
|
102
|
-
try:
|
|
103
|
-
deployment = admin.edge.wait_for(
|
|
104
|
-
id,
|
|
105
|
-
org_id,
|
|
106
|
-
is_ready=is_ready,
|
|
107
|
-
is_error=is_error,
|
|
108
|
-
is_transition=is_transition,
|
|
109
|
-
polling_interval=polling_interval,
|
|
110
|
-
timeout=timeout,
|
|
111
|
-
)
|
|
112
|
-
except Exception as e:
|
|
113
|
-
deployment = admin.edge.get(id, org_id)
|
|
114
|
-
save_state(deployment)
|
|
115
|
-
raise PluginException("Error waiting for edge deployment. Status=" + deployment["status"]) from e
|
|
121
|
+
pass # no wait
|
|
116
122
|
|
|
117
123
|
site_id = data.get("siteId")
|
|
118
124
|
if site_id:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hcs-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.317
|
|
4
4
|
Summary: Horizon Cloud Service CLI.
|
|
5
5
|
Project-URL: Homepage, https://github.com/euc-eng/hcs-cli
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/euc-eng/hcs-cli/issues
|
|
@@ -14,7 +14,7 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Requires-Python: >=3.9
|
|
17
|
-
Requires-Dist: hcs-core>=0.1.
|
|
17
|
+
Requires-Dist: hcs-core>=0.1.317
|
|
18
18
|
Requires-Dist: inquirerpy>=0.3.4
|
|
19
19
|
Requires-Dist: matplotlib>=3.8.0
|
|
20
20
|
Requires-Dist: paho-mqtt>=2.1.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
hcs_cli/__init__.py,sha256=
|
|
1
|
+
hcs_cli/__init__.py,sha256=kalA51nvL9r2WycXeW3H-kyqLPN91e0eb_ELOm5f-FM,47
|
|
2
2
|
hcs_cli/__main__.py,sha256=lwPXLjh1OpOs4doVLJJ6_3XHtC-VqDOXiw45hvAQorM,684
|
|
3
3
|
hcs_cli/main.py,sha256=87MoOqaYQ1V7m9LJbek3GR_RojErr4j6watZD8oenk0,3539
|
|
4
4
|
hcs_cli/cmds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -372,7 +372,7 @@ hcs_cli/provider/hcs/ad.py,sha256=Jseu9c8NMMukNz1S6LPq0XJqzACqttAOWgnP3ZQuBqs,19
|
|
|
372
372
|
hcs_cli/provider/hcs/av_entitlement.py,sha256=e2p3BWhYSppthw4pGtd2UHQZeqdH08fqbPW9VhCYQZI,1318
|
|
373
373
|
hcs_cli/provider/hcs/av_fs.py,sha256=UUke07p7cuUc_Kfoymz-EmO0YBj956PmGlYaKok9fB8,1647
|
|
374
374
|
hcs_cli/provider/hcs/cert.py,sha256=KILh7DF6YTeQ_hr07zIBV0U5mHjtSQ28GhTRF8VyM4E,1631
|
|
375
|
-
hcs_cli/provider/hcs/edge.py,sha256=
|
|
375
|
+
hcs_cli/provider/hcs/edge.py,sha256=WfOCMnStlLWXeS_9aDIHDlyIzUv9lSsdLw3ubcrRlc0,5883
|
|
376
376
|
hcs_cli/provider/hcs/entitlement.py,sha256=3LaNSLcVd9wY9AW2CzblR_0LpyuZVX3BmD4ij4U_YpI,1324
|
|
377
377
|
hcs_cli/provider/hcs/gold_pattern.py,sha256=WvFRPNPgrXZdR_W_NN7D5ni803npVrZKJSmLH0wxdI0,2043
|
|
378
378
|
hcs_cli/provider/hcs/identity_provider.py,sha256=kXsu8jhX77Fo_HSNd85V4sMd-uqD9QUm_yVcK0L6pyE,1415
|
|
@@ -489,7 +489,7 @@ hcs_cli/support/vm_table.py,sha256=aNyFtrQb2Cy4JBZx3sPt3_GpOHD7R6x4nITlwc9dZ4Q,2
|
|
|
489
489
|
hcs_cli/support/scm/html_util.py,sha256=clgMpM90HxRRs3D9ORYYNB57AYh7y_-UzJrB4KX3dsY,458
|
|
490
490
|
hcs_cli/support/scm/plan-editor.html.template,sha256=qXhHYjBsG8uaVlMkc0gnCePoSV3w5NyTkaLhXV9jlC0,26874
|
|
491
491
|
hcs_cli/support/scm/plan_editor.py,sha256=pZtm9X_R-vs2JxJ_NX7-wTAoY-nhI-gFqhcyVDdEZVM,3108
|
|
492
|
-
hcs_cli-0.1.
|
|
493
|
-
hcs_cli-0.1.
|
|
494
|
-
hcs_cli-0.1.
|
|
495
|
-
hcs_cli-0.1.
|
|
492
|
+
hcs_cli-0.1.317.dist-info/METADATA,sha256=HMB8zm8jPlN3k2sXbJDFcC98-xfhppGUM5hdm4N2eqs,3568
|
|
493
|
+
hcs_cli-0.1.317.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
494
|
+
hcs_cli-0.1.317.dist-info/entry_points.txt,sha256=5uH-af1WUETSBSer2bu4YMGQNY5RriJHsjepb8ACiX8,42
|
|
495
|
+
hcs_cli-0.1.317.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|