hcs-cli 0.1.332__py3-none-any.whl → 0.1.334__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/cmds/dev/fs/clear.py +10 -10
- hcs_cli/cmds/dev/fs/helper/credential_helper.py +4 -1
- hcs_cli/cmds/dev/fs/init.py +60 -23
- hcs_cli/cmds/dev/fs/provided_files/azure.plan.yml +71 -70
- hcs_cli/cmds/vm/log.py +1 -0
- hcs_cli/service/vmm/dct.py +2 -2
- {hcs_cli-0.1.332.dist-info → hcs_cli-0.1.334.dist-info}/METADATA +2 -2
- {hcs_cli-0.1.332.dist-info → hcs_cli-0.1.334.dist-info}/RECORD +11 -18
- hcs_cli/cmds/uag/__init__.py +0 -5
- hcs_cli/cmds/uag/delete.py +0 -41
- hcs_cli/cmds/uag/get.py +0 -21
- hcs_cli/cmds/uag/list.py +0 -19
- hcs_cli/provider/hcs/uag.py +0 -61
- hcs_cli/service/admin/uag.py +0 -34
- hcs_cli/service/uag.py +0 -108
- {hcs_cli-0.1.332.dist-info → hcs_cli-0.1.334.dist-info}/WHEEL +0 -0
- {hcs_cli-0.1.332.dist-info → hcs_cli-0.1.334.dist-info}/entry_points.txt +0 -0
hcs_cli/__init__.py
CHANGED
hcs_cli/cmds/dev/fs/clear.py
CHANGED
|
@@ -49,33 +49,33 @@ def clear(only_default: bool, **kwargs):
|
|
|
49
49
|
|
|
50
50
|
def _delete_all():
|
|
51
51
|
# all lcm templates
|
|
52
|
-
lcm_template_ids = run_cli("hcs lcm template list --ids", output_json=True)
|
|
52
|
+
lcm_template_ids = run_cli("hcs lcm template list --ids", output_json=True, raise_on_error=False)
|
|
53
53
|
for tid in lcm_template_ids:
|
|
54
54
|
run_cli("hcs lcm template delete -y --force " + tid)
|
|
55
55
|
# all pools
|
|
56
|
-
pool_ids = run_cli("hcs pool list --ids", output_json=True)
|
|
56
|
+
pool_ids = run_cli("hcs pool list --ids", output_json=True, raise_on_error=False)
|
|
57
57
|
for pid in pool_ids:
|
|
58
|
-
run_cli("hcs pool delete -y --delete-templates " + pid)
|
|
58
|
+
run_cli("hcs pool delete -y --delete-templates " + pid, raise_on_error=False)
|
|
59
59
|
# wait for template deletion, from admin perspective
|
|
60
60
|
for tid in lcm_template_ids:
|
|
61
|
-
run_cli("hcs template delete -y --force --wait 5m " + tid)
|
|
61
|
+
run_cli("hcs template delete -y --force --wait 5m " + tid, raise_on_error=False)
|
|
62
62
|
# all images
|
|
63
|
-
image_ids = run_cli("hcs ims list --ids", output_json=True)
|
|
63
|
+
image_ids = run_cli("hcs ims list --ids", output_json=True, raise_on_error=False)
|
|
64
64
|
for iid in image_ids:
|
|
65
65
|
run_cli("hcs ims delete " + iid)
|
|
66
66
|
# all image gold patterns
|
|
67
|
-
gold_pattern_ids = run_cli("hcs ims gold-pattern list --ids", output_json=True)
|
|
67
|
+
gold_pattern_ids = run_cli("hcs ims gold-pattern list --ids", output_json=True, raise_on_error=False)
|
|
68
68
|
for gid in gold_pattern_ids:
|
|
69
69
|
run_cli("hcs ims gold-pattern delete -y " + gid)
|
|
70
70
|
# all edges
|
|
71
|
-
edge_ids = run_cli("hcs edge list --ids", output_json=True)
|
|
71
|
+
edge_ids = run_cli("hcs edge list --ids", output_json=True, raise_on_error=False)
|
|
72
72
|
for eid in edge_ids:
|
|
73
|
-
run_cli("hcs edge delete -y --force --delete-all --field id,status " + eid)
|
|
73
|
+
run_cli("hcs edge delete -y --force --delete-all --field id,status " + eid, raise_on_error=False)
|
|
74
74
|
# wait for edge deletion
|
|
75
75
|
for eid in edge_ids:
|
|
76
|
-
run_cli("hcs edge delete -y --force --delete-all -w 5m " + eid)
|
|
76
|
+
run_cli("hcs edge delete -y --force --delete-all -w 5m " + eid, raise_on_error=False)
|
|
77
77
|
# all sites
|
|
78
|
-
site_ids = run_cli("hcs site list --ids", output_json=True)
|
|
78
|
+
site_ids = run_cli("hcs site list --ids", output_json=True, raise_on_error=False)
|
|
79
79
|
for sid in site_ids:
|
|
80
80
|
run_cli("hcs site delete -y " + sid)
|
|
81
81
|
# all providers
|
|
@@ -65,7 +65,10 @@ def get_client_credential_from_k8s_and_update_profile():
|
|
|
65
65
|
|
|
66
66
|
# get auth service info
|
|
67
67
|
app_properties = _get_application_properties_from_configmap("common-config")
|
|
68
|
-
auth_service_token_url = app_properties
|
|
68
|
+
auth_service_token_url = app_properties.get(
|
|
69
|
+
"spring.security.oauth2.client.provider.auth-service.token-uri",
|
|
70
|
+
"https://dev1b-westus2-cp103.azcp.horizon.omnissa.com/auth/v1/oauth/token",
|
|
71
|
+
)
|
|
69
72
|
profile_data.setdefault("auth", {})["tokenUrl"] = auth_service_token_url
|
|
70
73
|
|
|
71
74
|
# get secrets
|
hcs_cli/cmds/dev/fs/init.py
CHANGED
|
@@ -33,8 +33,7 @@ from hcs_cli.cmds.dev.fs.helper.step_util import step as step
|
|
|
33
33
|
from hcs_cli.cmds.dev.util import log
|
|
34
34
|
from hcs_cli.cmds.dev.util.log import fail as fail
|
|
35
35
|
from hcs_cli.cmds.dev.util.log import warn as warn
|
|
36
|
-
|
|
37
|
-
from hcs_cli.service.admin.uag import list as list_uags
|
|
36
|
+
import hcs_cli.service as hcs
|
|
38
37
|
from hcs_cli.support.exec_util import exec, run_cli
|
|
39
38
|
from hcs_cli.support.template_util import with_template_file
|
|
40
39
|
|
|
@@ -92,6 +91,7 @@ def _common_init():
|
|
|
92
91
|
_reg_datacenter()
|
|
93
92
|
_create_org_details()
|
|
94
93
|
_create_org_location_mapping()
|
|
94
|
+
_init_for_dct_collection()
|
|
95
95
|
_patch_mqtt_alias()
|
|
96
96
|
_update_mqtt()
|
|
97
97
|
_show_mqtt_info()
|
|
@@ -103,6 +103,41 @@ def _common_init():
|
|
|
103
103
|
_touch_fs_to_avoid_recycle()
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
@step
|
|
107
|
+
def _init_for_dct_collection():
|
|
108
|
+
hv2_org_id = "e7923078-6663-4178-9555-bcd5a036693e"
|
|
109
|
+
super_client = _super_auth_client()
|
|
110
|
+
# create org details
|
|
111
|
+
payload = {
|
|
112
|
+
"customerName": "Horizon v2",
|
|
113
|
+
"customerType": "INTERNAL",
|
|
114
|
+
"orgId": hv2_org_id,
|
|
115
|
+
"wsOneOrgId": "pseudo-ws1-org-id2",
|
|
116
|
+
}
|
|
117
|
+
try:
|
|
118
|
+
ret = super_client.post("/org-service/v1/org-details", payload)
|
|
119
|
+
print(ret)
|
|
120
|
+
log.trivial("Org details created for service org: Horizon v2 " + hv2_org_id)
|
|
121
|
+
except Exception as e:
|
|
122
|
+
if "already exist" in error_details(e):
|
|
123
|
+
log.trivial("Org details already exist. Skipping creation.")
|
|
124
|
+
else:
|
|
125
|
+
raise
|
|
126
|
+
# create org location mapping
|
|
127
|
+
try:
|
|
128
|
+
payload = {"location": "US", "orgId": hv2_org_id}
|
|
129
|
+
ret = super_client.post("/org-service/v1/orglocationmapping", payload)
|
|
130
|
+
log.trivial("Org location mapping created for service org: Horizon v2 " + hv2_org_id)
|
|
131
|
+
except Exception as e:
|
|
132
|
+
if "already exist" in error_details(e):
|
|
133
|
+
log.trivial("Org location mapping already exist. Skipping creation.")
|
|
134
|
+
else:
|
|
135
|
+
raise
|
|
136
|
+
log.trivial("Granting user org the ops access conscent")
|
|
137
|
+
user_org = os.getenv("ORG_ID")
|
|
138
|
+
hcs.api.post(f"/org-service/v1/diagnostic/ops-access?access_perf=true&org_id={user_org}")
|
|
139
|
+
|
|
140
|
+
|
|
106
141
|
@step
|
|
107
142
|
def _prepare_profile(fs_name: str):
|
|
108
143
|
api_token = os.getenv("HCS_API_TOKEN")
|
|
@@ -524,12 +559,12 @@ def _write_env_file(data, props, env_file):
|
|
|
524
559
|
INFRA_VNET=horizonv2-sg-dev-vnet
|
|
525
560
|
PRIMARY_BIND_USER_NAME={ad_username}
|
|
526
561
|
PRIMARY_BIND_PASSWORD={ad_password}
|
|
527
|
-
AUXILIARY_BIND_USER_NAME={ad_username}
|
|
528
|
-
AUXILIARY_BIND_PASSWORD={ad_password}
|
|
529
|
-
PRIMARY_JOIN_USER_NAME={ad_username}
|
|
530
|
-
PRIMARY_JOIN_PASSWORD={ad_password}
|
|
531
|
-
AUXILIARY_JOIN_USER_NAME={ad_username}
|
|
532
|
-
AUXILIARY_JOIN_PASSWORD={ad_password}
|
|
562
|
+
AUXILIARY_BIND_USER_NAME={ad_username}
|
|
563
|
+
AUXILIARY_BIND_PASSWORD={ad_password}
|
|
564
|
+
PRIMARY_JOIN_USER_NAME={ad_username}
|
|
565
|
+
PRIMARY_JOIN_PASSWORD={ad_password}
|
|
566
|
+
AUXILIARY_JOIN_USER_NAME={ad_username}
|
|
567
|
+
AUXILIARY_JOIN_PASSWORD={ad_password}
|
|
533
568
|
ENTITLEMENT_USER_1={ad_username}
|
|
534
569
|
ENTITLEMENT_USER_2={ad_username}-2
|
|
535
570
|
IMAGE_USER_NAME={ad_username}
|
|
@@ -791,7 +826,7 @@ def _retrieve_mqtt_server_ip_address(service_name, timeout=300, interval=5):
|
|
|
791
826
|
@step
|
|
792
827
|
def _validate_fs_auth():
|
|
793
828
|
try:
|
|
794
|
-
org_service.datacenter.list()
|
|
829
|
+
hcs.org_service.datacenter.list()
|
|
795
830
|
log.good("Auth to feature stack")
|
|
796
831
|
except Exception as e:
|
|
797
832
|
fail(
|
|
@@ -984,14 +1019,7 @@ def _reg_datacenter():
|
|
|
984
1019
|
}
|
|
985
1020
|
try:
|
|
986
1021
|
# ret = org_service.datacenter.create(payload1)
|
|
987
|
-
|
|
988
|
-
from hcs_core.sglib.hcs_client import hcs_client
|
|
989
|
-
|
|
990
|
-
profile_data = profile.current()
|
|
991
|
-
url = profile_data.hcs.url
|
|
992
|
-
custom_auth = profile_data.csp
|
|
993
|
-
custom_client = hcs_client(url=url, custom_auth=custom_auth)
|
|
994
|
-
ret = custom_client.post("/org-service/v1/datacenters", payload1)
|
|
1022
|
+
ret = _super_auth_client().post("/org-service/v1/datacenters", payload1)
|
|
995
1023
|
print(ret)
|
|
996
1024
|
log.good("Datacenter registered.")
|
|
997
1025
|
except Exception as e:
|
|
@@ -1001,6 +1029,15 @@ def _reg_datacenter():
|
|
|
1001
1029
|
raise
|
|
1002
1030
|
|
|
1003
1031
|
|
|
1032
|
+
def _super_auth_client():
|
|
1033
|
+
from hcs_core.sglib.hcs_client import hcs_client
|
|
1034
|
+
|
|
1035
|
+
profile_data = profile.current()
|
|
1036
|
+
super_auth = {"url": profile_data.csp.url, "clientId": os.environ["HCS_CLIENT_ID"], "clientSecret": os.environ["HCS_CLIENT_SECRET"]}
|
|
1037
|
+
url = profile_data.hcs.url
|
|
1038
|
+
return hcs_client(url=url, custom_auth=super_auth)
|
|
1039
|
+
|
|
1040
|
+
|
|
1004
1041
|
@step
|
|
1005
1042
|
def _create_org_details():
|
|
1006
1043
|
namespace = profile.name()
|
|
@@ -1011,7 +1048,7 @@ def _create_org_details():
|
|
|
1011
1048
|
"wsOneOrgId": "pseudo-ws1-org-id",
|
|
1012
1049
|
}
|
|
1013
1050
|
try:
|
|
1014
|
-
ret =
|
|
1051
|
+
ret = _super_auth_client().post("/org-service/v1/org-details", payload2)
|
|
1015
1052
|
print(ret)
|
|
1016
1053
|
log.good("Org details created.")
|
|
1017
1054
|
except Exception as e:
|
|
@@ -1024,7 +1061,7 @@ def _create_org_details():
|
|
|
1024
1061
|
@step
|
|
1025
1062
|
def _create_org_location_mapping():
|
|
1026
1063
|
payload3 = {"location": "US", "orgId": os.getenv("ORG_ID")}
|
|
1027
|
-
ret =
|
|
1064
|
+
ret = _super_auth_client().post("/org-service/v1/orglocationmapping", payload3)
|
|
1028
1065
|
print(ret)
|
|
1029
1066
|
log.good("Org location mapping created.")
|
|
1030
1067
|
|
|
@@ -1033,7 +1070,7 @@ def _create_org_location_mapping():
|
|
|
1033
1070
|
def _create_idp():
|
|
1034
1071
|
org_id = os.getenv("ORG_ID")
|
|
1035
1072
|
try:
|
|
1036
|
-
existing_map = auth.admin.get_org_idp_map(org_id=org_id)
|
|
1073
|
+
existing_map = hcs.auth.admin.get_org_idp_map(org_id=org_id)
|
|
1037
1074
|
except Exception as e:
|
|
1038
1075
|
fail(f"Failed to fetch existing IDP map: {error_details(e)}")
|
|
1039
1076
|
# Check if IDP mapping already exists
|
|
@@ -1051,12 +1088,12 @@ def _create_idp():
|
|
|
1051
1088
|
"orgId": org_id,
|
|
1052
1089
|
"idpTenantDomain": os.getenv("IDP_TENANT_DOMAIN"),
|
|
1053
1090
|
}
|
|
1054
|
-
ret = auth.admin.create_org_idp_map_internal(payload)
|
|
1091
|
+
ret = hcs.auth.admin.create_org_idp_map_internal(payload)
|
|
1055
1092
|
print(ret)
|
|
1056
1093
|
log.good("IDP set up.")
|
|
1057
1094
|
except Exception as e:
|
|
1058
1095
|
print(e)
|
|
1059
|
-
|
|
1096
|
+
warn(
|
|
1060
1097
|
"IDP credentials require 2FA, which is currently not supported via API calls. Please manually set up "
|
|
1061
1098
|
"your IDP in Astro. Once you have completed set up, re-run the 'hcs dev fs init' command skipping the"
|
|
1062
1099
|
"Common Init step."
|
|
@@ -1087,7 +1124,7 @@ def _wait_for_services_restart():
|
|
|
1087
1124
|
def _map_fqdn_to_lb(fs_name):
|
|
1088
1125
|
orgId = os.getenv("ORG_ID")
|
|
1089
1126
|
deployment_id = os.getenv("DEPLOYMENT_ID")
|
|
1090
|
-
for uag in
|
|
1127
|
+
for uag in hcs.admin.uag.list(orgId):
|
|
1091
1128
|
if uag.get("name") == deployment_id and uag.get("orgId") == orgId:
|
|
1092
1129
|
print("The next step requires adding FQDN mapping. Run the following command in another window:")
|
|
1093
1130
|
print(f'echo "{uag["loadBalancer"]["ipAddress"]} {os.getenv("UAG_FQDN")}" | sudo tee -a /etc/hosts')
|
|
@@ -180,50 +180,51 @@ resource:
|
|
|
180
180
|
data:
|
|
181
181
|
certificate: |
|
|
182
182
|
-----BEGIN CERTIFICATE-----
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
/
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
183
|
+
MIIDFjCCAf6gAwIBAgIUP8VbTRccnywpa8e05p/twnTl2C4wDQYJKoZIhvcNAQEL
|
|
184
|
+
BQAwGjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMB4XDTI2MDQxNDIxNDMxNFoX
|
|
185
|
+
DTM2MDQxMTIxNDMxNFowGjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMIIBIjAN
|
|
186
|
+
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA08Ekw54tG1YV9s2vjQryiR3Wkc+W
|
|
187
|
+
xnn9p5icaNVzgbpGPnUSL14b07TbC4nh04sZcaYjPb2oP0YNnDsuJ0Dx5eW2YmGg
|
|
188
|
+
vRyetNT6UQuoFQZTv+XuBT6ILqxduIRNuyGKHjXO9M+F6w2ubtmh9E+3H5BSkKVk
|
|
189
|
+
WbbHvGdXPJnKm+DXLyG3X2fsXhSNMhnzHtFuFNWs5MXfBQwRpcScvcAWVv0nx9xk
|
|
190
|
+
Jw2eULY1efDBIfWfKLeQLCxvHbCz6DYa/fnZgquc1VX/HC8/oexuroMWHhHcHVXo
|
|
191
|
+
VzYAaK4CgJ9+nh3TjiLNZEURA7rikAb1a2R8+v7WPv8VRwb7Ohs4xuG+pQIDAQAB
|
|
192
|
+
o1QwUjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggr
|
|
193
|
+
BgEFBQcDATAdBgNVHQ4EFgQUHYFD2uCCDq/A5/rlaEoo0bxx4fEwDQYJKoZIhvcN
|
|
194
|
+
AQELBQADggEBAEWZi+sn7/Rdogc7UDVHCRV6lhKWDtEV6PWKTGDi7co6u7p6FBLj
|
|
195
|
+
cZCBiqAhwGTcUUz07WaK227gNNSnAJxCEDsq7b8k3GEDzo81EBRtquCC4F+F2cD/
|
|
196
|
+
cy/laiTgcdcsNins7oYe/MqjXE1y3Lr7X7/uLThLOpcLu51M5LDxoX4g1VSWdg0r
|
|
197
|
+
Z+6aElI6y4wW9Z0Nd/hDCUgXyuDiuxY64WMfVLGNkJjMX/HQHVg85MpnWJpxT/o+
|
|
198
|
+
N0jddWbVZyxLSXs9dC5hvepHcMRO3zmeQVgN9ZFvO1BaFlbSDrJIzqbXHGYvY410
|
|
199
|
+
sz9vYKXmiAxlhRf2AhfxbLpc3MgEBFRpuhM=
|
|
199
200
|
-----END CERTIFICATE-----
|
|
200
201
|
-----BEGIN PRIVATE KEY-----
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
202
|
+
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDTwSTDni0bVhX2
|
|
203
|
+
za+NCvKJHdaRz5bGef2nmJxo1XOBukY+dRIvXhvTtNsLieHTixlxpiM9vag/Rg2c
|
|
204
|
+
Oy4nQPHl5bZiYaC9HJ601PpRC6gVBlO/5e4FPogurF24hE27IYoeNc70z4XrDa5u
|
|
205
|
+
2aH0T7cfkFKQpWRZtse8Z1c8mcqb4NcvIbdfZ+xeFI0yGfMe0W4U1azkxd8FDBGl
|
|
206
|
+
xJy9wBZW/SfH3GQnDZ5QtjV58MEh9Z8ot5AsLG8dsLPoNhr9+dmCq5zVVf8cLz+h
|
|
207
|
+
7G6ugxYeEdwdVehXNgBorgKAn36eHdOOIs1kRREDuuKQBvVrZHz6/tY+/xVHBvs6
|
|
208
|
+
GzjG4b6lAgMBAAECggEAIpx3PeIkzUsM3AJSp2MasX7HC546rsZRx4sSRbBd6N5h
|
|
209
|
+
jOPlzQg81CXDh+dJmiIqToExUW4mifERWG/z40aiQ0mAviPm+gIrjrMhFw4oswcN
|
|
210
|
+
uVgDx6eo6rgRuY8mhWe+A6IX6bvhz8G0uTmpVx2QeQBF/o6KEH/ntcvOXoFktIWH
|
|
211
|
+
h28mgn8CZv8lvYiZ+eRF1DufT8Yslnc7Qb/c71uOaBlj3XffKEAygaieU3SfI7q9
|
|
212
|
+
azfAZVT5+OZRycfg7rWaaEr10SJjylu/kxxiv/xaHn4RuVuvHrMVaMx4TIHlegM8
|
|
213
|
+
7vCRyWZDqnbUPD9gRcaRsgwLfpkP8AlRi4oWlQ+wAQKBgQDscBN+qJvXGT6R1NGa
|
|
214
|
+
gAuArh0e10UcJptDFeBSmV5APeeDcQFL96w8fxBf3NzJ7V9CJQPQoHbZuRe+Jwbu
|
|
215
|
+
heZEMaUJjMB2XD5mlrACLC3UpC70AffBgYEZAI0mQT+U9TrEToKCB56vJmHh2sGJ
|
|
216
|
+
L2tEuroWMTdOp7xHIb1XPx9IJQKBgQDlRkGzOdHkkFFgMxHelUFw7RdMleE05Z1P
|
|
217
|
+
+PhlTzJIuR0A5rsOPYsvrvfaraQPGHAZMRTI+87WQZps3KzpA3y1rW6gYKs2PAhR
|
|
218
|
+
U/vah1NLKKCPN+qpvcFsklX79hjvTUqEZPemUfE06w20u69sflfewrZf0skmMJBy
|
|
219
|
+
+bCdS/WUgQKBgQCGUXlRuBmoTegU0rEss1dViBR1A9h4EJqdttzUL9qyZjiSnG0f
|
|
220
|
+
KhnH2GuF+iPX9yjpm7uaFr7OG2+Yj/VJJfpVfVqDnVltJCQzBaIB6fUzWv5tknyc
|
|
221
|
+
iqS7fmuxctnbFqGHCg7sLcYBPK3Yr/zIoY6v4eB7YQRJg9LbGhjFas+rnQKBgQCD
|
|
222
|
+
DpQDtStrsasyiD7QsxTDTmOhHZOsPwybaD/k+U5PD7GqkDmgvEFRsnxvfg5nqpp5
|
|
223
|
+
a/rroDTteHajf8k/MQUafNbdyiRUTiCbDJzMn8pXDhQpidcTzCpCu6t26Yf7Un0k
|
|
224
|
+
DOsbIX/1td8Rzq9KHzZvWXISeFUPBXesoVn5sC/jAQKBgQC1K+zlpYhTI1qcI/zJ
|
|
225
|
+
ZHMhbh9yNVogN9Iz6xApz2pg4gaakRMdPZAsRPqmj/h0NPyD3SG1DnoyXGFFa0kZ
|
|
226
|
+
VQzwaQfw6s4soi5rCXLGeZeMxq2yOJLlF1hYCFdk3OdgB5LGXa2F+D1kwoF1TfvI
|
|
227
|
+
j4spDbrt03r4bXP+DFX0eF1ZPg==
|
|
227
228
|
-----END PRIVATE KEY-----
|
|
228
229
|
type: PEM
|
|
229
230
|
resourceTags: ${var.resourceTag}
|
|
@@ -312,17 +313,17 @@ resource:
|
|
|
312
313
|
versionType: MAJOR
|
|
313
314
|
gpuType: NONE
|
|
314
315
|
sourceStreamType: AZURE_MARKET_PLACE
|
|
315
|
-
os: Windows
|
|
316
|
+
os: Windows 11 Enterprise, 22H2
|
|
316
317
|
osType: WINDOWS
|
|
317
318
|
markers:
|
|
318
319
|
- name: default
|
|
319
320
|
assetDetails:
|
|
320
321
|
data:
|
|
321
|
-
generationType:
|
|
322
|
+
generationType: V2
|
|
322
323
|
licenseType: Windows_Client
|
|
323
|
-
offer: windows-
|
|
324
|
+
offer: windows-11
|
|
324
325
|
publisher: microsoftwindowsdesktop
|
|
325
|
-
sku:
|
|
326
|
+
sku: win11-22h2-ent
|
|
326
327
|
vmSize: Standard_DS2_v2
|
|
327
328
|
subNet: /subscriptions/${var.provider.subscriptionId}/resourceGroups/${var.desktop.resourceGroup}/providers/Microsoft.Network/virtualNetworks/${var.desktop.vnet}/subnets/${var.desktop.subnet}
|
|
328
329
|
vNet: /subscriptions/${var.provider.subscriptionId}/resourceGroups/${var.desktop.resourceGroup}/providers/Microsoft.Network/virtualNetworks/${var.desktop.vnet}
|
|
@@ -769,27 +770,27 @@ resource:
|
|
|
769
770
|
templates:
|
|
770
771
|
- id: ${myTemplateMulti.id}
|
|
771
772
|
resourceTags: ${var.resourceTag}
|
|
772
|
-
myEntitlementDedicated:
|
|
773
|
-
kind: hcs/entitlement
|
|
774
|
-
data:
|
|
775
|
-
orgId: ${var.orgId}
|
|
776
|
-
poolIds: ["${myPoolDedicated.id}"]
|
|
777
|
-
resourceDetails:
|
|
778
|
-
- poolId: ${myPoolDedicated.id}
|
|
779
|
-
userIds: ["${env.ENTITLEMENT_USER_1}"
|
|
780
|
-
myEntitlementFloating:
|
|
781
|
-
kind: hcs/entitlement
|
|
782
|
-
data:
|
|
783
|
-
orgId: ${var.orgId}
|
|
784
|
-
poolIds: ["${myPoolFloating.id}"]
|
|
785
|
-
resourceDetails:
|
|
786
|
-
- poolId: ${myPoolFloating.id}
|
|
787
|
-
userIds: ["${env.ENTITLEMENT_USER_1}", "${env.ENTITLEMENT_USER_2}"]
|
|
788
|
-
myEntitlementMulti:
|
|
789
|
-
kind: hcs/entitlement
|
|
790
|
-
data:
|
|
791
|
-
orgId: ${var.orgId}
|
|
792
|
-
poolIds: ["${myPoolMulti.id}"]
|
|
793
|
-
resourceDetails:
|
|
794
|
-
- poolId: ${myPoolMulti.id}
|
|
795
|
-
userIds: ["${env.ENTITLEMENT_USER_1}", "${env.ENTITLEMENT_USER_2}"]
|
|
773
|
+
# myEntitlementDedicated:
|
|
774
|
+
# kind: hcs/entitlement
|
|
775
|
+
# data:
|
|
776
|
+
# orgId: ${var.orgId}
|
|
777
|
+
# poolIds: ["${myPoolDedicated.id}"]
|
|
778
|
+
# resourceDetails:
|
|
779
|
+
# - poolId: ${myPoolDedicated.id}
|
|
780
|
+
# userIds: ["${env.ENTITLEMENT_USER_1}"]
|
|
781
|
+
# myEntitlementFloating:
|
|
782
|
+
# kind: hcs/entitlement
|
|
783
|
+
# data:
|
|
784
|
+
# orgId: ${var.orgId}
|
|
785
|
+
# poolIds: ["${myPoolFloating.id}"]
|
|
786
|
+
# resourceDetails:
|
|
787
|
+
# - poolId: ${myPoolFloating.id}
|
|
788
|
+
# userIds: ["${env.ENTITLEMENT_USER_1}", "${env.ENTITLEMENT_USER_2}"]
|
|
789
|
+
# myEntitlementMulti:
|
|
790
|
+
# kind: hcs/entitlement
|
|
791
|
+
# data:
|
|
792
|
+
# orgId: ${var.orgId}
|
|
793
|
+
# poolIds: ["${myPoolMulti.id}"]
|
|
794
|
+
# resourceDetails:
|
|
795
|
+
# - poolId: ${myPoolMulti.id}
|
|
796
|
+
# userIds: ["${env.ENTITLEMENT_USER_1}", "${env.ENTITLEMENT_USER_2}"]
|
hcs_cli/cmds/vm/log.py
CHANGED
|
@@ -47,6 +47,7 @@ def log(recreate: bool, verbose: bool, save_path, vm_path: str, org: str, **kwar
|
|
|
47
47
|
is_ops = has_any_permission(["sgadm:supportw", "sgadm:supportlog", "sgadm:service", "sgadm:support"])
|
|
48
48
|
|
|
49
49
|
dct_info = dct_service.latest(org_id, template_id, vm_id, is_ops)
|
|
50
|
+
|
|
50
51
|
if not dct_info:
|
|
51
52
|
if verbose:
|
|
52
53
|
click.echo("No DCT log found for VM.")
|
hcs_cli/service/vmm/dct.py
CHANGED
|
@@ -30,7 +30,7 @@ def request(org_id: str, template_id: str, vm_id: str, is_ops: bool):
|
|
|
30
30
|
if is_ops:
|
|
31
31
|
url = f"/vm-manager/v1/ops/agentdct?customer_org_id={org_id}&action=create"
|
|
32
32
|
else:
|
|
33
|
-
url = f"/vm-manager/v1/agentdct?
|
|
33
|
+
url = f"/vm-manager/v1/agentdct?org_id={org_id}&action=create"
|
|
34
34
|
body = {"requestList": [{"templateId": template_id, "vmId": vm_id}]}
|
|
35
35
|
|
|
36
36
|
try:
|
|
@@ -119,7 +119,7 @@ def search(
|
|
|
119
119
|
if is_ops:
|
|
120
120
|
url = f"/vm-manager/v2/ops/dct/status/search?search={search}&customer_org_id={org_id}"
|
|
121
121
|
else:
|
|
122
|
-
url = f"/vm-manager/v2/dct/status/search?search={search}&
|
|
122
|
+
url = f"/vm-manager/v2/dct/status/search?search={search}&org_id={org_id}"
|
|
123
123
|
items = hcs_api.get(url, all_pages=True)
|
|
124
124
|
|
|
125
125
|
# client filter to work around service bugs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hcs-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.334
|
|
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.334
|
|
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=iUweVOjx1CIJELlL0BQdgjjNCtk8aGl3iYtnl9mKp6s,72
|
|
2
2
|
hcs_cli/__main__.py,sha256=mReIxxxuvlcxzSdPfIgptZ_Qkrg0MPOgT37utukr65g,125
|
|
3
3
|
hcs_cli/main.py,sha256=CzGoya6yabf5akJ3l0gEzxBmMKznIhxGRXbsngtuPWc,3014
|
|
4
4
|
hcs_cli/cmds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -73,12 +73,12 @@ hcs_cli/cmds/dev/onboard.py,sha256=7guWRWbJIDOBiDMdWghAilyERmxQY3HCdt6atnauYXA,1
|
|
|
73
73
|
hcs_cli/cmds/dev/test.py,sha256=dh3fnrF12Un5mG0C2T_pQthYIajq4VxxamaYcAWwBt4,422
|
|
74
74
|
hcs_cli/cmds/dev/fs/__init__.py,sha256=TDtKnDCcd28-XUpIpPeqCIOJAcZPJ9sI43TARpXy6lQ,79
|
|
75
75
|
hcs_cli/cmds/dev/fs/auth.py,sha256=GsjT-ATwD_G_BUma0PK114KME3RnF_lDKHB0HrjGQKs,909
|
|
76
|
-
hcs_cli/cmds/dev/fs/clear.py,sha256=
|
|
77
|
-
hcs_cli/cmds/dev/fs/init.py,sha256=
|
|
76
|
+
hcs_cli/cmds/dev/fs/clear.py,sha256=e7dfmfnNhfvxh4HYgLsDfJ1DohbesOMSu30TDJa3zlw,3631
|
|
77
|
+
hcs_cli/cmds/dev/fs/init.py,sha256=myvdA2Lh146h52mVNv7ECH-mkXiHLI01s8ztKF49JXw,41129
|
|
78
78
|
hcs_cli/cmds/dev/fs/profiler.py,sha256=3IPhiCsYebVKaqvmXUocNJXQAX4yQBjxQWPxrRriaRE,3564
|
|
79
79
|
hcs_cli/cmds/dev/fs/tailor.py,sha256=84oTXmasoJanlnOhNVEG4pqFrBsZ31yGtMRZKxGnpwc,6415
|
|
80
80
|
hcs_cli/cmds/dev/fs/helper/__init__.py,sha256=AC-hl0F-5R4V2uejk5FzFDlvT7uKGfjQyWq0quSznQs,14
|
|
81
|
-
hcs_cli/cmds/dev/fs/helper/credential_helper.py,sha256=
|
|
81
|
+
hcs_cli/cmds/dev/fs/helper/credential_helper.py,sha256=HEjZjXSIP8kNe_XCQLOkla-rKV0y3W0SgkKp4CLZ_8Y,3406
|
|
82
82
|
hcs_cli/cmds/dev/fs/helper/jenkins_util.py,sha256=YFms6tEQBVZc8Svh0OFOIXXxrzNPo8Gu44FqBKby1Ow,3208
|
|
83
83
|
hcs_cli/cmds/dev/fs/helper/k8s_util.py,sha256=Y5KScOEDDjkSlpv9yk1C7QvTDkGBu4cmLHpwufMMOWQ,2875
|
|
84
84
|
hcs_cli/cmds/dev/fs/helper/license_info.py,sha256=BJR6hCZFf_1A1DsAill4ZpOgRRopo899RQ9QIZPt4Yk,4953
|
|
@@ -89,7 +89,7 @@ hcs_cli/cmds/dev/fs/helper/util.py,sha256=4qc6MT45Os3dZopNhngidIKj7sa5nBYt9lKl2E
|
|
|
89
89
|
hcs_cli/cmds/dev/fs/provided_files/__init__.py,sha256=AC-hl0F-5R4V2uejk5FzFDlvT7uKGfjQyWq0quSznQs,14
|
|
90
90
|
hcs_cli/cmds/dev/fs/provided_files/akka.plan.yml,sha256=IBBuxU-oxiFfEMhpOB7uK9IMoHsRVwlcnKwPPfbPnyw,12486
|
|
91
91
|
hcs_cli/cmds/dev/fs/provided_files/azsim.plan.yml,sha256=rnjNWSnhaYr19tlKoxGjvKTlhs2pYA2NRC-dC3kIzYE,17220
|
|
92
|
-
hcs_cli/cmds/dev/fs/provided_files/azure.plan.yml,sha256=
|
|
92
|
+
hcs_cli/cmds/dev/fs/provided_files/azure.plan.yml,sha256=U2FWSW7S37yBDU8H7jui7C0IEbFCM-Irrna0-aK4TfU,31663
|
|
93
93
|
hcs_cli/cmds/dev/fs/provided_files/mqtt-secret.yaml,sha256=lJI6N4e3ogiZ9BpyjWUHqj3KfbGs7WUdYuaPt1D8TLw,14939
|
|
94
94
|
hcs_cli/cmds/dev/fs/provided_files/mqtt-server-external.yaml,sha256=gtYLY9pgMCeJthYmTXrLjd3xITf4b2keesyQ8VBAar8,612
|
|
95
95
|
hcs_cli/cmds/dev/fs/provided_files/patch-mqtt-hostname.yml,sha256=YuwUPj5QtZo1dKOqNsh72EVXdVBxr2ZQBcW4gyX0agY,212
|
|
@@ -271,16 +271,12 @@ hcs_cli/cmds/template/update.py,sha256=Gtk8XUfJFWStT2GWv0e34X5M1rBTwN-PurFQvkbNM
|
|
|
271
271
|
hcs_cli/cmds/template/usage.py,sha256=ZmF_M6XwW5qnFJHzFhrGKlsH_OEZgd3oP5IspCPKaJ8,8819
|
|
272
272
|
hcs_cli/cmds/template/use.py,sha256=h6jvE5yPr8AlPzKxKTr911FUmD6IfmWDjac3z0fPcyM,908
|
|
273
273
|
hcs_cli/cmds/template/wait.py,sha256=6V5NTnEJWYbpbH5TuMdc3PhqhwiI8Dduf-k1C5HTzBk,1905
|
|
274
|
-
hcs_cli/cmds/uag/__init__.py,sha256=nCAdrp7CBtOPvLR9oCOQJpM8ht4hg5NKsRrgkZMAS0Q,69
|
|
275
|
-
hcs_cli/cmds/uag/delete.py,sha256=OFK1lmZi9nRdAuvt6Kuwji--hNbjLlkuWCORkVJNpaU,918
|
|
276
|
-
hcs_cli/cmds/uag/get.py,sha256=HMxICmLWv-73biAWjihK1Y1Zv15KkPIEKN6MMl0U2-o,438
|
|
277
|
-
hcs_cli/cmds/uag/list.py,sha256=5g9wgBBRK3m0vb83nvnkHRb97haMxRI89ytDUFrVeak,393
|
|
278
274
|
hcs_cli/cmds/vm/__init__.py,sha256=yRZ-WbEQSw2-L3mdcHh8SMolWYIFpwluWvRfnBni1oY,68
|
|
279
275
|
hcs_cli/cmds/vm/actions.py,sha256=PdwqGc8rjX7QabhnTZR6do4NaGjvDZotx22LeiE1HJw,3367
|
|
280
276
|
hcs_cli/cmds/vm/delete.py,sha256=n6e4pPc26nujJN93bwFBE4rV00hNJZEQhlRMdakJwLU,934
|
|
281
277
|
hcs_cli/cmds/vm/get.py,sha256=IJqxnuIXEBTDxBS2-SbqNFU-sKKn0tzOX5blaVFpxrU,483
|
|
282
278
|
hcs_cli/cmds/vm/list.py,sha256=tMFs7VcVE-7MphtiqTlwGP41JWjIsbFnQFc0wHKF-J0,6044
|
|
283
|
-
hcs_cli/cmds/vm/log.py,sha256=
|
|
279
|
+
hcs_cli/cmds/vm/log.py,sha256=qBBXAsBjewSdOlCzF0qdBD_PiXV8Nx610dX3JyEa1Lk,5317
|
|
284
280
|
hcs_cli/cmds/vm/pairing_info.py,sha256=Oq4bXWXj_GP_ejnK5fouc7928PDFk11-vGUjRXQnT6w,623
|
|
285
281
|
hcs_cli/cmds/vm/put.py,sha256=bOqwdEVqI3_6F6C_3WH7P4PZP0iAhkJmm6Y9RHBVgl8,645
|
|
286
282
|
hcs_cli/cmds/vm/use.py,sha256=EONJqWcF176tUyQ9OnkSpR92HBzTgFNwB__Dt10WAVU,1276
|
|
@@ -387,7 +383,6 @@ hcs_cli/provider/hcs/pool_group.py,sha256=15UL8txnUmDm1GE3Oa9x67cnpsN5PHv2xK2Pod
|
|
|
387
383
|
hcs_cli/provider/hcs/pool_template.py,sha256=IOXctsF0S5wRmd73oEk_mCKEUx9zf9XMrYdYMsEAbQc,1583
|
|
388
384
|
hcs_cli/provider/hcs/provider.py,sha256=wF9v2jqQZcZSOjZXua7gL8L8yxz9iBWfV6aBzPMqado,1651
|
|
389
385
|
hcs_cli/provider/hcs/site.py,sha256=O1itBz9lCz20Y3r5Z1IyRp3zC6nyzmrCulGZFQr74i0,861
|
|
390
|
-
hcs_cli/provider/hcs/uag.py,sha256=EIs1tzd8YjuWf0fRJtYVPtuKK-K-4EF8ecgAivmd-p8,1487
|
|
391
386
|
hcs_cli/provider/hcs/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
392
387
|
hcs_cli/provider/hcs/runtime/password.py,sha256=HF8Cxdc3gcBE96iGDgdwZTgsU5aomQEOAlIuAa7g6eA,390
|
|
393
388
|
hcs_cli/provider/hcs/runtime/wait_for.py,sha256=yyENsW-cjFf8_h4H-bFwHM3QSzE3cGdMpZ3ft5HlDlk,1766
|
|
@@ -400,7 +395,6 @@ hcs_cli/service/pool.py,sha256=aWdW0bRGlE58z95HvdSs7i8kwM79_dzqsrGjtnLv7lA,712
|
|
|
400
395
|
hcs_cli/service/site.py,sha256=CMKMAhKaXZ67tFGkg5bPPBHsD3Ud76mOZKh4Vw_nx5g,1014
|
|
401
396
|
hcs_cli/service/task.py,sha256=uyewZ4FctrAcdEUbt_mxhcS4iCf3mXz_QAuqdAl8kCE,16912
|
|
402
397
|
hcs_cli/service/template.py,sha256=qKJ09Toe5NmApgd2H0TcVIoFshz-8fh2j3hDtvMO7z4,2242
|
|
403
|
-
hcs_cli/service/uag.py,sha256=HabShUiLzZN-VM_UlPbfb4cQiWcgvsn3eB4CVPOzee0,3193
|
|
404
398
|
hcs_cli/service/vm.py,sha256=Aw1AKvFSPlNTh1VWCdQXf21Yu_tDDao2NhMj5muGzwc,4839
|
|
405
399
|
hcs_cli/service/admin/__init__.py,sha256=ASx6VsdgNleP9frkrKadkEg1G2NS0FyC0pAUN2ivssg,88
|
|
406
400
|
hcs_cli/service/admin/ad.py,sha256=WF6XIhwtLTQQ3m78rBhhr-oNARai579MBRmpDUbZR8k,297
|
|
@@ -409,7 +403,6 @@ hcs_cli/service/admin/edge.py,sha256=1qC4_NcGm6CuB31xlj7h23j37peT8aMycbVwoF4toFY
|
|
|
409
403
|
hcs_cli/service/admin/helper.py,sha256=mz97uLhaDtGpZE7piZwmqCofnmtv2JRbJ5kCuZJY940,775
|
|
410
404
|
hcs_cli/service/admin/provider.py,sha256=SNNZldKG_3GjITWRi6P3iqQMqNlDIm7tHg64RE24azc,1332
|
|
411
405
|
hcs_cli/service/admin/template.py,sha256=UF-yhWviy0xhiz77WvMyhhm7c4SqI9517HK2tg3jlk8,518
|
|
412
|
-
hcs_cli/service/admin/uag.py,sha256=bgNXcqXg49eAP31uD1r0HtEmEsDsRG8SUJGIibSYpPc,1298
|
|
413
406
|
hcs_cli/service/admin/vm.py,sha256=yMALLduOtqXROykvZaxViCEFFGCmSmizclpYF3XkbFs,118
|
|
414
407
|
hcs_cli/service/app_management/__init__.py,sha256=61iK5J3VA_Zaro5NoORIax1-Iqyjx02CfGLl7Ofa1Uw,25
|
|
415
408
|
hcs_cli/service/app_management/manual_app.py,sha256=cUHIO6oTFnmvoqI9QlQXSYHRm22WFGAgbSgjpemracM,486
|
|
@@ -477,7 +470,7 @@ hcs_cli/service/vmhub/__init__.py,sha256=U2qmptlN0gggefF1zvj-JBTdqUYsPazH0jG02sR
|
|
|
477
470
|
hcs_cli/service/vmhub/credentials.py,sha256=54oS7QdGR4wWQuiVrEQTz_Bv9vuxHguM_oeQrhyPkOE,1021
|
|
478
471
|
hcs_cli/service/vmhub/mqtt.py,sha256=BNYP-nBjO6GW_WBB63ShLKVYVsXEVCKGaTefc4ehi_k,2626
|
|
479
472
|
hcs_cli/service/vmm/__init__.py,sha256=iMujDYcu4l2_itHGn9IVq04m974qhDWSZOi8GpiHA5c,24
|
|
480
|
-
hcs_cli/service/vmm/dct.py,sha256=
|
|
473
|
+
hcs_cli/service/vmm/dct.py,sha256=r6X5yYnnRHjichhcZfyecChkhtOhL7FNMLItUYZfKIc,8170
|
|
481
474
|
hcs_cli/service/vmm/hoc_event.py,sha256=NSU8Wj2cc8vWod-YDTEMuUXD4ToEKhgIrj3u1lTv_kE,7604
|
|
482
475
|
hcs_cli/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
483
476
|
hcs_cli/support/constant.py,sha256=dVOiIaiH4rhC-cZJhTruXyv5ieS1j32YUhF8wEFjbEw,171
|
|
@@ -497,7 +490,7 @@ hcs_cli/support/vm_table.py,sha256=hqNUKLVUuBiuDwlqcAQ7uAT1-4z6ZYOIGRcFWn8lnAo,2
|
|
|
497
490
|
hcs_cli/support/scm/html_util.py,sha256=clgMpM90HxRRs3D9ORYYNB57AYh7y_-UzJrB4KX3dsY,458
|
|
498
491
|
hcs_cli/support/scm/plan-editor.html.template,sha256=HtXMmvIvTixVEYN1gblCeqFTt_F8JF6ltDC11Eb_GMw,46975
|
|
499
492
|
hcs_cli/support/scm/plan_editor.py,sha256=TxfHyyozoQ_DCyaPrYXFG9n8AnBuUD8753009FUD0GU,8722
|
|
500
|
-
hcs_cli-0.1.
|
|
501
|
-
hcs_cli-0.1.
|
|
502
|
-
hcs_cli-0.1.
|
|
503
|
-
hcs_cli-0.1.
|
|
493
|
+
hcs_cli-0.1.334.dist-info/METADATA,sha256=pe35-BXbHMMztuWG8BqQQoRjGoF71EuX3Q1j3LTzHrg,3222
|
|
494
|
+
hcs_cli-0.1.334.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
495
|
+
hcs_cli-0.1.334.dist-info/entry_points.txt,sha256=5uH-af1WUETSBSer2bu4YMGQNY5RriJHsjepb8ACiX8,42
|
|
496
|
+
hcs_cli-0.1.334.dist-info/RECORD,,
|
hcs_cli/cmds/uag/__init__.py
DELETED
hcs_cli/cmds/uag/delete.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright © 2025-2026 Omnissa, LLC.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import click
|
|
6
|
-
import hcs_core.sglib.cli_options as cli
|
|
7
|
-
import httpx
|
|
8
|
-
from hcs_core.ctxp import recent
|
|
9
|
-
|
|
10
|
-
from hcs_cli.service import admin
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@click.command()
|
|
14
|
-
@click.argument("id", type=str, required=False)
|
|
15
|
-
@cli.org_id
|
|
16
|
-
@cli.wait
|
|
17
|
-
@cli.force
|
|
18
|
-
@cli.confirm
|
|
19
|
-
def delete(id: str, org: str, wait: str, force: bool, confirm: bool):
|
|
20
|
-
"""Delete UAG by ID"""
|
|
21
|
-
|
|
22
|
-
org_id = cli.get_org_id(org)
|
|
23
|
-
id = recent.require("uag", id)
|
|
24
|
-
|
|
25
|
-
ret = admin.uag.get(id, org_id)
|
|
26
|
-
|
|
27
|
-
if not confirm:
|
|
28
|
-
click.confirm(f"Delete UAG {ret['name']} ({id})?", abort=True)
|
|
29
|
-
|
|
30
|
-
try:
|
|
31
|
-
ret = admin.uag.delete(id, org_id, force=force)
|
|
32
|
-
if not ret:
|
|
33
|
-
return "", 1
|
|
34
|
-
except httpx.HTTPStatusError as e:
|
|
35
|
-
if e.response.status_code == 409:
|
|
36
|
-
pass
|
|
37
|
-
else:
|
|
38
|
-
raise
|
|
39
|
-
if wait == "0":
|
|
40
|
-
return ret
|
|
41
|
-
admin.uag.wait_for_deleted(id, org_id, wait)
|
hcs_cli/cmds/uag/get.py
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright © 2025-2026 Omnissa, LLC.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import click
|
|
6
|
-
import hcs_core.sglib.cli_options as cli
|
|
7
|
-
from hcs_core.ctxp import recent
|
|
8
|
-
|
|
9
|
-
from hcs_cli.service import admin
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@click.command()
|
|
13
|
-
@click.argument("id", type=str, required=False)
|
|
14
|
-
@cli.org_id
|
|
15
|
-
def get(id: str, org: str):
|
|
16
|
-
"""Get UAG by ID"""
|
|
17
|
-
id = recent.require("uag", id)
|
|
18
|
-
ret = admin.uag.get(id, org_id=cli.get_org_id(org))
|
|
19
|
-
if ret:
|
|
20
|
-
return ret
|
|
21
|
-
return "", 1
|
hcs_cli/cmds/uag/list.py
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright © 2025-2026 Omnissa, LLC.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import click
|
|
6
|
-
import hcs_core.sglib.cli_options as cli
|
|
7
|
-
from hcs_core.ctxp import recent
|
|
8
|
-
|
|
9
|
-
from hcs_cli.service import admin
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@click.command()
|
|
13
|
-
@cli.org_id
|
|
14
|
-
@cli.search
|
|
15
|
-
def list(**kwargs):
|
|
16
|
-
"""List UAG deployments"""
|
|
17
|
-
ret = admin.uag.list(org_id=cli.get_org_id(kwargs["org"]), **kwargs)
|
|
18
|
-
recent.helper.default_list(ret, "uag")
|
|
19
|
-
return ret
|
hcs_cli/provider/hcs/uag.py
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright © 2025-2026 Omnissa, LLC.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from hcs_core.plan import PluginException, actions
|
|
6
|
-
|
|
7
|
-
from hcs_cli.service import admin
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def deploy(data: dict, state: dict, save_state) -> dict:
|
|
11
|
-
org_id = data["orgId"]
|
|
12
|
-
if not state:
|
|
13
|
-
deployment = admin.uag.create(data)
|
|
14
|
-
save_state(deployment)
|
|
15
|
-
else:
|
|
16
|
-
deployment = state
|
|
17
|
-
id = deployment["id"]
|
|
18
|
-
|
|
19
|
-
_wait = data.get("_wait", True)
|
|
20
|
-
if not _wait:
|
|
21
|
-
return deployment
|
|
22
|
-
|
|
23
|
-
try:
|
|
24
|
-
deployment = admin.uag.wait_for_ready(id, org_id, "10m")
|
|
25
|
-
except Exception as e:
|
|
26
|
-
deployment = admin.uag.get(id, org_id)
|
|
27
|
-
save_state(deployment)
|
|
28
|
-
raise PluginException("Fail waiting for UAG deployment.") from e
|
|
29
|
-
return deployment
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def refresh(data: dict, state: dict) -> dict:
|
|
33
|
-
org_id = data["orgId"]
|
|
34
|
-
if state:
|
|
35
|
-
id = state.get("id")
|
|
36
|
-
if id:
|
|
37
|
-
ret = admin.uag.get(id, org_id)
|
|
38
|
-
if ret:
|
|
39
|
-
return ret
|
|
40
|
-
search = f"name $eq {data['name']}"
|
|
41
|
-
uags = admin.uag.list(org_id, search=search)
|
|
42
|
-
if uags:
|
|
43
|
-
return uags[0]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def decide(data: dict, state: dict):
|
|
47
|
-
if state["status"] in ["READY"]:
|
|
48
|
-
return actions.skip
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def destroy(data: dict, state: dict, force: bool) -> dict:
|
|
52
|
-
id = state["id"]
|
|
53
|
-
org_id = data["orgId"]
|
|
54
|
-
admin.uag.safe_delete(id, org_id)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def eta(action: str, data: dict, state: dict):
|
|
58
|
-
if action == actions.create:
|
|
59
|
-
return "10m"
|
|
60
|
-
if action == actions.delete:
|
|
61
|
-
return "10m"
|
hcs_cli/service/admin/uag.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright © 2025-2026 Omnissa, LLC.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import logging
|
|
6
|
-
|
|
7
|
-
from ..uag import _client, base_context
|
|
8
|
-
from ..uag import create as create
|
|
9
|
-
from ..uag import delete as delete
|
|
10
|
-
from ..uag import get as get
|
|
11
|
-
from ..uag import get_by_edge_deployment_id as get_by_edge_deployment_id
|
|
12
|
-
from ..uag import get_by_provider_id as get_by_provider_id
|
|
13
|
-
from ..uag import list as list
|
|
14
|
-
from ..uag import safe_delete as safe_delete
|
|
15
|
-
from ..uag import wait_for_deleted as wait_for_deleted
|
|
16
|
-
from ..uag import wait_for_ready as wait_for_ready
|
|
17
|
-
|
|
18
|
-
log = logging.getLogger(__name__)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def refresh_certs_on_uag_vms(id: str, org_id: str, diagnostic_type: str, verbose: bool):
|
|
22
|
-
payload = {"diagnosticType": diagnostic_type, "applyToAllGatewayVMs": True}
|
|
23
|
-
url = f"{base_context}/{id}/diagnose?org_id={org_id}"
|
|
24
|
-
if verbose:
|
|
25
|
-
log.info(f"cert refresh on all uag vms; url: {url}, payload: {payload}")
|
|
26
|
-
return _client.post(url, payload, timeout=120.0)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def get_certs_on_uag_vm(id: str, org_id: str, gateway_id: str, verbose: bool):
|
|
30
|
-
payload = {"diagnosticType": "GET_PKI_CERTIFICATE", "gatewayId": gateway_id}
|
|
31
|
-
url = f"{base_context}/{id}/diagnose?org_id={org_id}"
|
|
32
|
-
if verbose:
|
|
33
|
-
log.info(f"Get cert refresh on uag vm; url: {url}, payload: {payload}")
|
|
34
|
-
return _client.post(url, payload, timeout=120.0)
|
hcs_cli/service/uag.py
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright © 2025-2026 Omnissa, LLC.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
import logging
|
|
6
|
-
|
|
7
|
-
import httpx
|
|
8
|
-
from hcs_core.sglib.client_util import default_crud, hdc_service_client, wait_for_res_status
|
|
9
|
-
|
|
10
|
-
log = logging.getLogger(__name__)
|
|
11
|
-
|
|
12
|
-
_client = hdc_service_client("admin")
|
|
13
|
-
base_context = "/v2/uag-deployments"
|
|
14
|
-
_crud = default_crud(_client, base_context, "uag")
|
|
15
|
-
get = _crud.get
|
|
16
|
-
list = _crud.list
|
|
17
|
-
create = _crud.create
|
|
18
|
-
delete = _crud.delete
|
|
19
|
-
wait_for_deleted = _crud.wait_for_deleted
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def wait_for_ready(id, org_id, timeout):
|
|
23
|
-
name = "uag/" + id
|
|
24
|
-
|
|
25
|
-
def fn_get():
|
|
26
|
-
return get(id, org_id)
|
|
27
|
-
|
|
28
|
-
status_map = {
|
|
29
|
-
"ready": "READY",
|
|
30
|
-
"error": ["FAILED", "DELETION_FAILED"],
|
|
31
|
-
"transition": [
|
|
32
|
-
"DEPLOYING",
|
|
33
|
-
"PENDING",
|
|
34
|
-
],
|
|
35
|
-
# Other
|
|
36
|
-
# 'ADDING_EXTERNAL_ACCESS',
|
|
37
|
-
# 'ADDING_EXTERNAL_ACCESS_FAILED',
|
|
38
|
-
# 'ADDING_EXTERNAL_ACCESS_ROLLBACK',
|
|
39
|
-
# 'ADDING_EXTERNAL_ACCESS_ROLLBACK_FAILED',
|
|
40
|
-
# 'ADDING_INTERNAL_ACCESS',
|
|
41
|
-
# 'ADDING_INTERNAL_ACCESS_FAILED',
|
|
42
|
-
# 'ADDING_INTERNAL_ACCESS_ROLLBACK',
|
|
43
|
-
# 'ADDING_INTERNAL_ACCESS_ROLLBACK_FAILED',
|
|
44
|
-
# 'DELETED',
|
|
45
|
-
# 'DELETE_PENDING',
|
|
46
|
-
# 'DELETING',
|
|
47
|
-
# 'DELETION_FAILED',
|
|
48
|
-
# 'PARTIALLY_READY',
|
|
49
|
-
# 'REMOVING_EXTERNAL_ACCESS',
|
|
50
|
-
# 'REMOVING_EXTERNAL_ACCESS_FAILED',
|
|
51
|
-
# 'REMOVING_EXTERNAL_ACCESS_ROLLBACK',
|
|
52
|
-
# 'REMOVING_EXTERNAL_ACCESS_ROLLBACK_FAILED',
|
|
53
|
-
# 'REMOVING_INTERNAL_ACCESS',
|
|
54
|
-
# 'REMOVING_INTERNAL_ACCESS_FAILED',
|
|
55
|
-
# 'REMOVING_INTERNAL_ACCESS_ROLLBACK',
|
|
56
|
-
# 'REMOVING_INTERNAL_ACCESS_ROLLBACK_FAILED',
|
|
57
|
-
# 'UPDATE_FAILED',
|
|
58
|
-
# 'UPDATE_PENDING',
|
|
59
|
-
# 'UPDATING',
|
|
60
|
-
# 'UPGRADE_FAILED',
|
|
61
|
-
# 'UPGRADE_PENDING',
|
|
62
|
-
# 'UPGRADING'
|
|
63
|
-
}
|
|
64
|
-
return wait_for_res_status(resource_name=name, fn_get=fn_get, get_status="status", status_map=status_map, timeout=timeout)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def _wait_for_terminal_state(id, org_id, timeout):
|
|
68
|
-
name = "uag/" + id
|
|
69
|
-
terminal_status = ["READY", "FAILED", "DELETED", "DELETION_FAILED"]
|
|
70
|
-
|
|
71
|
-
def fn_get():
|
|
72
|
-
return get(id, org_id)
|
|
73
|
-
|
|
74
|
-
status_map = {"ready": terminal_status, "error": [], "transition": ["DELETE_PENDING"]}
|
|
75
|
-
|
|
76
|
-
wait_for_res_status(
|
|
77
|
-
resource_name=name,
|
|
78
|
-
fn_get=fn_get,
|
|
79
|
-
get_status="status",
|
|
80
|
-
status_map=status_map,
|
|
81
|
-
timeout=timeout,
|
|
82
|
-
not_found_as_success=True,
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
def safe_delete(id: str, org_id: str, timeout: str = "20m"):
|
|
87
|
-
try:
|
|
88
|
-
delete(id, org_id=org_id, force=True)
|
|
89
|
-
except httpx.HTTPStatusError as e:
|
|
90
|
-
if e.response.status_code != 409:
|
|
91
|
-
raise
|
|
92
|
-
_wait_for_terminal_state(id, org_id, timeout)
|
|
93
|
-
delete(id, org_id=org_id, force=True)
|
|
94
|
-
|
|
95
|
-
def fn_is_error(uag):
|
|
96
|
-
return uag["status"] == "DELETION_FAILED"
|
|
97
|
-
|
|
98
|
-
wait_for_deleted(id, org_id, "10m", fn_is_error=fn_is_error)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
def get_by_provider_id(provider_id: str, org_id: str):
|
|
102
|
-
url = f"{base_context}?org_id={org_id}&search=providerInstanceId $eq {provider_id}"
|
|
103
|
-
return _client.get(url)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
def get_by_edge_deployment_id(edge_id: str, org_id: str):
|
|
107
|
-
url = f"{base_context}?org_id={org_id}&search=edgeDeploymentId $eq {edge_id}"
|
|
108
|
-
return _client.get(url)
|
|
File without changes
|
|
File without changes
|