Skip to content

Commit 7f99817

Browse files
author
Jianping Zeng
committed
show more details for aks machine show/list
1 parent 3b3c846 commit 7f99817

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

src/aks-preview/azext_aks_preview/_format.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,21 @@ def parser(entry):
6262
entry["ipv4"] = ipv4_addresses
6363
entry["ipv6"] = ipv6_addresses
6464
parsed = compile_jmes("""{
65-
name: name,
66-
ipv4: ipv4,
67-
ipv6: ipv6
68-
}""")
65+
name: name,
66+
zones: zones,
67+
ipv4: ipv4,
68+
ipv6: ipv6,
69+
nodeImageVersion: nodeImageVersion,
70+
orchestratorVersion: orchestratorVersion,
71+
currentOrchestratorVersion: currentOrchestratorVersion,
72+
provisioningState: provisioningState,
73+
vmSize: vmSize,
74+
priority: priority,
75+
mode: mode,
76+
osType: osType,
77+
osSku: osSku,
78+
enableFIPS: enableFIPS
79+
}""")
6980
return parsed.search(entry, Options(dict_cls=OrderedDict))
7081
return parser(result)
7182

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2372,22 +2372,22 @@
23722372

23732373
helps['aks machine list'] = """
23742374
type: command
2375-
short-summary: Get information about IP Addresses, Hostname for all machines in an agentpool
2375+
short-summary: List the details for all machines in an agentpool
23762376
parameters:
23772377
- name: --cluster-name
23782378
type: string
23792379
short-summary: Name of the managed cluster
23802380
- name: --nodepool-name
23812381
type: string
23822382
short-summary: Name of the agentpool of a managed cluster
2383-
exmaples:
2384-
- name: Get information about IP Addresses, Hostname for all machines in an agentpool
2383+
examples:
2384+
- name: List the details for all machines in an agentpool
23852385
text: az aks machine list --cluster-name <clusterName> --nodepool-name <apName>
23862386
"""
23872387

23882388
helps['aks machine show'] = """
23892389
type: command
2390-
short-summary: Show IP Addresses, Hostname for a specific machine in an agentpool for a managedcluster.
2390+
short-summary: Show the details of a specific machine in an agentpool of a managedcluster.
23912391
parameters:
23922392
- name: --cluster-name
23932393
type: string
@@ -2398,8 +2398,8 @@
23982398
- name: --machine-name
23992399
type: string
24002400
short-summary: Get IP Addresses, Hostname for a specific machine in an agentpool
2401-
exmaples:
2402-
- name: Get IP Addresses, Hostname for a specific machine in an agentpool
2401+
examples:
2402+
- name: Show the details of a specific machine in an agentpool of a managedcluster.
24032403
text: az aks machine show --cluster-name <clusterName> --nodepool-name <apName> --machine-name <machineName>
24042404
"""
24052405

src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,6 +2561,8 @@ def test_aks_machine_cmds(self, resource_group, resource_group_location):
25612561
)
25622562
machine_show = self.cmd(show_cmd).get_output_in_json()
25632563
assert machine_show["name"] == machine_name
2564+
assert machine_show["provisioningState"] == "Succeeded"
2565+
assert machine_show["osType"] == "Linux"
25642566
print(machine_show)
25652567

25662568
@AllowLargeResponse()

0 commit comments

Comments
 (0)