Skip to content

Commit 5daacfa

Browse files
author
Nafiz Haider
committed
updated existing example verbiage and added new examples:
1 parent 498ca9f commit 5daacfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+170
-48
lines changed

src/managednetworkfabric/HISTORY.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
33
Release History
44
===============
5+
8.0.0b7
6+
* Added missing examples and updated verbiage on existing examples
57

68
8.0.0b6
79
* Enables the 'device refresh-configuration' command that was previously disabled/removed.

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/acl/_create.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
class Create(AAZCommand):
1818
"""Create a Access Control List resource
1919
20-
:example: Creates an Access Control List with Configuration type as "File".
20+
:example: Create an Access Control List with Configuration type as "File".
2121
az networkfabric acl create --resource-group "example-rg" --location "westus3" --resource-name "example-accesscontrollist" --configuration-type "File" --acls-url "https://ACL-Storage-URL"
2222
23-
:example: Creates an Access Control List with Configuration type as "Inline".
23+
:example: Create an Access Control List with Configuration type as "Inline".
2424
az networkfabric acl create --resource-group "example-rg" --location "westus3" --resource-name "example-accesscontrollist" --configuration-type "Inline" --default-action "Permit" --dynamic-match-configurations "[{ipGroups:[{name:'example-ipGroup',ipAddressType:IPv4,ipPrefixes:['10.20.3.1/20']}],vlanGroups:[{name:'example-vlanGroup',vlans:['20-30']}],portGroups:[{name:'example-portGroup',ports:['100-200']}]}]" --match-configurations "[{matchConfigurationName:'example-match',sequenceNumber:123,ipAddressType:IPv4,matchConditions:[{etherTypes:['0x1'],fragments:['0xff00-0xffff'],ipLengths:['4094-9214'],ttlValues:[23],dscpMarkings:[32],portCondition:{flags:[established],portType:SourcePort,layer4Protocol:TCP,ports:['1-20'],portGroupNames:['example-portGroup']},protocolTypes:[TCP],vlanMatchCondition:{vlans:['20-30'],innerVlans:[30],vlanGroupNames:['example-vlanGroup']},ipCondition:{type:SourceIP,prefixType:Prefix,ipPrefixValues:['10.20.20.20/12'],ipGroupNames:['example-ipGroup']}}],actions:[{type:Count,counterName:'example-counter'}]}]"
2525
2626
:example: Help text for sub parameters under the specific parent can be viewed by using the shorthand syntax '??'. See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about shorthand syntax.

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_reboot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class Reboot(AAZCommand):
1818
"""Reboot the Network Device.
1919
20-
:example: NetworkDevices_Reboot_MaximumSet_Gen
20+
:example: Reboot the Network Device
2121
az networkfabric device reboot --resource-group example-rg --resource-name example-device --reboot-type GracefulRebootWithZTP
2222
"""
2323

@@ -246,13 +246,16 @@ def _build_schema_error_detail_read(cls, _schema):
246246
additional_info.Element = AAZObjectType()
247247

248248
_element = _schema_error_detail_read.additional_info.Element
249-
_element.info = AAZFreeFormDictType(
249+
_element.info = AAZDictType(
250250
flags={"read_only": True},
251251
)
252252
_element.type = AAZStrType(
253253
flags={"read_only": True},
254254
)
255255

256+
info = _schema_error_detail_read.additional_info.Element.info
257+
info.Element = AAZAnyType()
258+
256259
details = _schema_error_detail_read.details
257260
details.Element = AAZObjectType()
258261
cls._build_schema_error_detail_read(details.Element)

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_refresh_configuration.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class RefreshConfiguration(AAZCommand):
1818
"""Refreshes the configuration the Network Device.
1919
20-
:example: NetworkDevices_RefreshConfiguration_MaximumSet_Gen
20+
:example: Run refresh configuration on the Network Device
2121
az networkfabric device refresh-configuration --resource-group example-rg --resource-name example-device
2222
"""
2323

@@ -222,13 +222,16 @@ def _build_schema_error_detail_read(cls, _schema):
222222
additional_info.Element = AAZObjectType()
223223

224224
_element = _schema_error_detail_read.additional_info.Element
225-
_element.info = AAZFreeFormDictType(
225+
_element.info = AAZDictType(
226226
flags={"read_only": True},
227227
)
228228
_element.type = AAZStrType(
229229
flags={"read_only": True},
230230
)
231231

232+
info = _schema_error_detail_read.additional_info.Element.info
233+
info.Element = AAZAnyType()
234+
232235
details = _schema_error_detail_read.details
233236
details.Element = AAZObjectType()
234237
cls._build_schema_error_detail_read(details.Element)

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_run_ro.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class RunRo(AAZCommand):
1818
"""Run the RO Command on the Network Device.
1919
20-
:example: Run ro on the network device
20+
:example: Run ro on the Network Device
2121
az networkfabric device run-ro --resource-name "example-device" --resource-group "example-rg" --ro-command "example command"
2222
"""
2323

@@ -275,13 +275,16 @@ def _build_schema_error_detail_read(cls, _schema):
275275
additional_info.Element = AAZObjectType()
276276

277277
_element = _schema_error_detail_read.additional_info.Element
278-
_element.info = AAZFreeFormDictType(
278+
_element.info = AAZDictType(
279279
flags={"read_only": True},
280280
)
281281
_element.type = AAZStrType(
282282
flags={"read_only": True},
283283
)
284284

285+
info = _schema_error_detail_read.additional_info.Element.info
286+
info.Element = AAZAnyType()
287+
285288
details = _schema_error_detail_read.details
286289
details.Element = AAZObjectType()
287290
cls._build_schema_error_detail_read(details.Element)

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_run_rw.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class RunRw(AAZCommand):
1818
"""Run the RW Command on the Network Device.
1919
20-
:example: Run rw on the network device
20+
:example: Run rw on the Network Device
2121
az networkfabric device run-rw --resource-name "example-device" --resource-group "example-rg" --rw-command "example command"
2222
"""
2323

@@ -248,13 +248,16 @@ def _build_schema_error_detail_read(cls, _schema):
248248
additional_info.Element = AAZObjectType()
249249

250250
_element = _schema_error_detail_read.additional_info.Element
251-
_element.info = AAZFreeFormDictType(
251+
_element.info = AAZDictType(
252252
flags={"read_only": True},
253253
)
254254
_element.type = AAZStrType(
255255
flags={"read_only": True},
256256
)
257257

258+
info = _schema_error_detail_read.additional_info.Element.info
259+
info.Element = AAZAnyType()
260+
258261
details = _schema_error_detail_read.details
259262
details.Element = AAZObjectType()
260263
cls._build_schema_error_detail_read(details.Element)

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_update_admin_state.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class UpdateAdminState(AAZCommand):
1818
"""Updates the Administrative state of the Network Device.
1919
20-
:example: Update admin state
20+
:example: Update the admin state of the Network Device
2121
az networkfabric device update-admin-state --resource-name "example-device-name" --resource-group "example-RG" --state "UnderMaintenance"
2222
"""
2323

@@ -259,13 +259,16 @@ def _build_schema_error_detail_read(cls, _schema):
259259
additional_info.Element = AAZObjectType()
260260

261261
_element = _schema_error_detail_read.additional_info.Element
262-
_element.info = AAZFreeFormDictType(
262+
_element.info = AAZDictType(
263263
flags={"read_only": True},
264264
)
265265
_element.type = AAZStrType(
266266
flags={"read_only": True},
267267
)
268268

269+
info = _schema_error_detail_read.additional_info.Element.info
270+
info.Element = AAZAnyType()
271+
269272
details = _schema_error_detail_read.details
270273
details.Element = AAZObjectType()
271274
cls._build_schema_error_detail_read(details.Element)

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/device/_upgrade.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
)
1717
class Upgrade(AAZCommand):
1818
"""Upgrades the version of the Network Device.
19+
20+
:example: Upgrade the Network Device
21+
az networkfabric device upgrade --resource-group example-rg --resource-name example-device --version 1.0.0
1922
"""
2023

2124
_aaz_info = {
@@ -242,13 +245,16 @@ def _build_schema_error_detail_read(cls, _schema):
242245
additional_info.Element = AAZObjectType()
243246

244247
_element = _schema_error_detail_read.additional_info.Element
245-
_element.info = AAZFreeFormDictType(
248+
_element.info = AAZDictType(
246249
flags={"read_only": True},
247250
)
248251
_element.type = AAZStrType(
249252
flags={"read_only": True},
250253
)
251254

255+
info = _schema_error_detail_read.additional_info.Element.info
256+
info.Element = AAZAnyType()
257+
252258
details = _schema_error_detail_read.details
253259
details.Element = AAZObjectType()
254260
cls._build_schema_error_detail_read(details.Element)

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/externalnetwork/_update_bfd_administrative_state.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
)
1717
class UpdateBfdAdministrativeState(AAZCommand):
1818
"""BFD administrative state for either static or bgp for internalNetwork.
19+
20+
:example: Update bfd admin state of External Network
21+
az networkfabric externalnetwork update-bfd-administrative-state --resource-group example-rg --l3-isolation-domain-name example-externalnetwork --external-network-name example-ext --route-type Static --administrative-state Enable
1922
"""
2023

2124
_aaz_info = {
@@ -265,13 +268,16 @@ def _build_schema_error_detail_read(cls, _schema):
265268
additional_info.Element = AAZObjectType()
266269

267270
_element = _schema_error_detail_read.additional_info.Element
268-
_element.info = AAZFreeFormDictType(
271+
_element.info = AAZDictType(
269272
flags={"read_only": True},
270273
)
271274
_element.type = AAZStrType(
272275
flags={"read_only": True},
273276
)
274277

278+
info = _schema_error_detail_read.additional_info.Element.info
279+
info.Element = AAZAnyType()
280+
275281
details = _schema_error_detail_read.details
276282
details.Element = AAZObjectType()
277283
cls._build_schema_error_detail_read(details.Element)

src/managednetworkfabric/azext_managednetworkfabric/aaz/latest/networkfabric/fabric/_arm_configuration_diff.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
)
1717
class ArmConfigurationDiff(AAZCommand):
1818
"""Post action: Triggers diff of NetworkFabric ARM Configuration.
19+
20+
:example: Run arm configuration diff on the Network Fabric
21+
az networkfabric fabric arm-configuration-diff --resource-group example-rg --network-fabric-name example-fabric
1922
"""
2023

2124
_aaz_info = {
@@ -218,13 +221,16 @@ def _build_schema_error_detail_read(cls, _schema):
218221
additional_info.Element = AAZObjectType()
219222

220223
_element = _schema_error_detail_read.additional_info.Element
221-
_element.info = AAZFreeFormDictType(
224+
_element.info = AAZDictType(
222225
flags={"read_only": True},
223226
)
224227
_element.type = AAZStrType(
225228
flags={"read_only": True},
226229
)
227230

231+
info = _schema_error_detail_read.additional_info.Element.info
232+
info.Element = AAZAnyType()
233+
228234
details = _schema_error_detail_read.details
229235
details.Element = AAZObjectType()
230236
cls._build_schema_error_detail_read(details.Element)

0 commit comments

Comments
 (0)