Skip to content

Commit 22b7b90

Browse files
removing interface remove option (#24019)
* removing interface remove option * Update the examples and docs --------- Co-authored-by: Yunchi Wang <[email protected]>
1 parent e4e6cdd commit 22b7b90

Some content is hidden

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

44 files changed

+83
-405
lines changed

src/ManagedNetworkFabric/ManagedNetworkFabric.Autorest/Az.ManagedNetworkFabric.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.ManagedNetworkFabric.private.dll'
1313
FormatsToProcess = './Az.ManagedNetworkFabric.format.ps1xml'
14-
FunctionsToExport = 'Get-AzNetworkFabric', 'Get-AzNetworkFabricAcl', 'Get-AzNetworkFabricController', 'Get-AzNetworkFabricDevice', 'Get-AzNetworkFabricExternalNetwork', 'Get-AzNetworkFabricInterface', 'Get-AzNetworkFabricInternalNetwork', 'Get-AzNetworkFabricInternetGateway', 'Get-AzNetworkFabricInternetGatewayRule', 'Get-AzNetworkFabricIPCommunity', 'Get-AzNetworkFabricIPExtendedCommunity', 'Get-AzNetworkFabricIPPrefix', 'Get-AzNetworkFabricL2Domain', 'Get-AzNetworkFabricL3Domain', 'Get-AzNetworkFabricNeighborGroup', 'Get-AzNetworkFabricNni', 'Get-AzNetworkFabricNpb', 'Get-AzNetworkFabricRack', 'Get-AzNetworkFabricRoutePolicy', 'Get-AzNetworkFabricTap', 'Get-AzNetworkFabricTapRule', 'Invoke-AzNetworkFabricDeprovision', 'Invoke-AzNetworkFabricInterfaceUpdateAdminState', 'Invoke-AzNetworkFabricL2DomainUpdateAdminState', 'Invoke-AzNetworkFabricL3DomainUpdateAdminState', 'Invoke-AzNetworkFabricProvision', 'Invoke-AzNetworkFabricTapUpdateAdminState', 'New-AzNetworkFabric', 'New-AzNetworkFabricAcl', 'New-AzNetworkFabricController', 'New-AzNetworkFabricExternalNetwork', 'New-AzNetworkFabricInternalNetwork', 'New-AzNetworkFabricInternetGatewayRule', 'New-AzNetworkFabricIPCommunity', 'New-AzNetworkFabricIPExtendedCommunity', 'New-AzNetworkFabricIPPrefix', 'New-AzNetworkFabricL2Domain', 'New-AzNetworkFabricL3Domain', 'New-AzNetworkFabricNeighborGroup', 'New-AzNetworkFabricNni', 'New-AzNetworkFabricRoutePolicy', 'New-AzNetworkFabricTap', 'New-AzNetworkFabricTapRule', 'Remove-AzNetworkFabric', 'Remove-AzNetworkFabricAcl', 'Remove-AzNetworkFabricController', 'Remove-AzNetworkFabricExternalNetwork', 'Remove-AzNetworkFabricInterface', 'Remove-AzNetworkFabricInternalNetwork', 'Remove-AzNetworkFabricInternetGatewayRule', 'Remove-AzNetworkFabricIPCommunity', 'Remove-AzNetworkFabricIPExtendedCommunity', 'Remove-AzNetworkFabricIPPrefix', 'Remove-AzNetworkFabricL2Domain', 'Remove-AzNetworkFabricL3Domain', 'Remove-AzNetworkFabricNeighborGroup', 'Remove-AzNetworkFabricNni', 'Remove-AzNetworkFabricRoutePolicy', 'Remove-AzNetworkFabricTap', 'Remove-AzNetworkFabricTapRule', 'Update-AzNetworkFabricDevice', 'Update-AzNetworkFabricInternetGateway', 'Update-AzNetworkFabricNeighborGroup'
14+
FunctionsToExport = 'Get-AzNetworkFabric', 'Get-AzNetworkFabricAcl', 'Get-AzNetworkFabricController', 'Get-AzNetworkFabricDevice', 'Get-AzNetworkFabricExternalNetwork', 'Get-AzNetworkFabricInterface', 'Get-AzNetworkFabricInternalNetwork', 'Get-AzNetworkFabricInternetGateway', 'Get-AzNetworkFabricInternetGatewayRule', 'Get-AzNetworkFabricIPCommunity', 'Get-AzNetworkFabricIPExtendedCommunity', 'Get-AzNetworkFabricIPPrefix', 'Get-AzNetworkFabricL2Domain', 'Get-AzNetworkFabricL3Domain', 'Get-AzNetworkFabricNeighborGroup', 'Get-AzNetworkFabricNni', 'Get-AzNetworkFabricNpb', 'Get-AzNetworkFabricRack', 'Get-AzNetworkFabricRoutePolicy', 'Get-AzNetworkFabricTap', 'Get-AzNetworkFabricTapRule', 'Invoke-AzNetworkFabricDeprovision', 'Invoke-AzNetworkFabricInterfaceUpdateAdminState', 'Invoke-AzNetworkFabricL2DomainUpdateAdminState', 'Invoke-AzNetworkFabricL3DomainUpdateAdminState', 'Invoke-AzNetworkFabricProvision', 'Invoke-AzNetworkFabricTapUpdateAdminState', 'New-AzNetworkFabric', 'New-AzNetworkFabricAcl', 'New-AzNetworkFabricController', 'New-AzNetworkFabricExternalNetwork', 'New-AzNetworkFabricInternalNetwork', 'New-AzNetworkFabricInternetGatewayRule', 'New-AzNetworkFabricIPCommunity', 'New-AzNetworkFabricIPExtendedCommunity', 'New-AzNetworkFabricIPPrefix', 'New-AzNetworkFabricL2Domain', 'New-AzNetworkFabricL3Domain', 'New-AzNetworkFabricNeighborGroup', 'New-AzNetworkFabricNni', 'New-AzNetworkFabricRoutePolicy', 'New-AzNetworkFabricTap', 'New-AzNetworkFabricTapRule', 'Remove-AzNetworkFabric', 'Remove-AzNetworkFabricAcl', 'Remove-AzNetworkFabricController', 'Remove-AzNetworkFabricExternalNetwork', 'Remove-AzNetworkFabricInternalNetwork', 'Remove-AzNetworkFabricInternetGatewayRule', 'Remove-AzNetworkFabricIPCommunity', 'Remove-AzNetworkFabricIPExtendedCommunity', 'Remove-AzNetworkFabricIPPrefix', 'Remove-AzNetworkFabricL2Domain', 'Remove-AzNetworkFabricL3Domain', 'Remove-AzNetworkFabricNeighborGroup', 'Remove-AzNetworkFabricNni', 'Remove-AzNetworkFabricRoutePolicy', 'Remove-AzNetworkFabricTap', 'Remove-AzNetworkFabricTapRule', 'Update-AzNetworkFabricDevice', 'Update-AzNetworkFabricInternetGateway', 'Update-AzNetworkFabricNeighborGroup'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ManagedNetworkFabric'

src/ManagedNetworkFabric/ManagedNetworkFabric.Autorest/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ directive:
362362
verb: Update
363363
subject: NetworkTapRuleAdministrativeState
364364
remove: true
365+
- where:
366+
verb: Remove
367+
subject: Interface
368+
remove: true
365369
# Handle 200 status code not exist in swagger spec for DELETE API's
366370
- from: swagger-document
367371
where: $.paths..delete.responses

src/ManagedNetworkFabric/ManagedNetworkFabric.Autorest/UX/Microsoft.ManagedNetworkFabric/l2IsolationDomains.json

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -43,68 +43,6 @@
4343
}
4444
]
4545
},
46-
{
47-
"name": "Invoke-AzNetworkFabricL2DomainUpdateAdminState",
48-
"description": "Enables isolation domain across the fabric or on specified racks.",
49-
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState",
50-
"help": {
51-
"learnMore": {
52-
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabricl2domainupdateadminstate"
53-
},
54-
"parameterSets": [
55-
{
56-
"parameters": [
57-
"-L2IsolationDomainName <String>",
58-
"-ResourceGroupName <String>",
59-
"[-SubscriptionId <String>]"
60-
]
61-
},
62-
{
63-
"parameters": [
64-
"-L2IsolationDomainName <String>",
65-
"-ResourceGroupName <String>",
66-
"[-SubscriptionId <String>]"
67-
]
68-
}
69-
]
70-
},
71-
"examples": [
72-
{
73-
"description": "Enables isolation domain across the fabric or on specified racks.",
74-
"parameters": [
75-
{
76-
"name": "-L2IsolationDomainName",
77-
"value": "[Path.l2IsolationDomainName]"
78-
},
79-
{
80-
"name": "-ResourceGroupName",
81-
"value": "[Path.resourceGroupName]"
82-
},
83-
{
84-
"name": "-SubscriptionId",
85-
"value": "[Path.subscriptionId]"
86-
}
87-
]
88-
},
89-
{
90-
"description": "Enables isolation domain across the fabric or on specified racks.",
91-
"parameters": [
92-
{
93-
"name": "-L2IsolationDomainName",
94-
"value": "[Path.l2IsolationDomainName]"
95-
},
96-
{
97-
"name": "-ResourceGroupName",
98-
"value": "[Path.resourceGroupName]"
99-
},
100-
{
101-
"name": "-SubscriptionId",
102-
"value": "[Path.subscriptionId]"
103-
}
104-
]
105-
}
106-
]
107-
},
10846
{
10947
"name": "Remove-AzNetworkFabricL2Domain",
11048
"description": "Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name.",

src/ManagedNetworkFabric/ManagedNetworkFabric.Autorest/UX/Microsoft.ManagedNetworkFabric/l3IsolationDomains.json

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -43,68 +43,6 @@
4343
}
4444
]
4545
},
46-
{
47-
"name": "Invoke-AzNetworkFabricL3DomainUpdateAdminState",
48-
"description": "Enables racks for this Isolation Domain.",
49-
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState",
50-
"help": {
51-
"learnMore": {
52-
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabricl3domainupdateadminstate"
53-
},
54-
"parameterSets": [
55-
{
56-
"parameters": [
57-
"-L3IsolationDomainName <String>",
58-
"-ResourceGroupName <String>",
59-
"[-SubscriptionId <String>]"
60-
]
61-
},
62-
{
63-
"parameters": [
64-
"-L3IsolationDomainName <String>",
65-
"-ResourceGroupName <String>",
66-
"[-SubscriptionId <String>]"
67-
]
68-
}
69-
]
70-
},
71-
"examples": [
72-
{
73-
"description": "Enables racks for this Isolation Domain.",
74-
"parameters": [
75-
{
76-
"name": "-L3IsolationDomainName",
77-
"value": "[Path.l3IsolationDomainName]"
78-
},
79-
{
80-
"name": "-ResourceGroupName",
81-
"value": "[Path.resourceGroupName]"
82-
},
83-
{
84-
"name": "-SubscriptionId",
85-
"value": "[Path.subscriptionId]"
86-
}
87-
]
88-
},
89-
{
90-
"description": "Enables racks for this Isolation Domain.",
91-
"parameters": [
92-
{
93-
"name": "-L3IsolationDomainName",
94-
"value": "[Path.l3IsolationDomainName]"
95-
},
96-
{
97-
"name": "-ResourceGroupName",
98-
"value": "[Path.resourceGroupName]"
99-
},
100-
{
101-
"name": "-SubscriptionId",
102-
"value": "[Path.subscriptionId]"
103-
}
104-
]
105-
}
106-
]
107-
},
10846
{
10947
"name": "Remove-AzNetworkFabricL3Domain",
11048
"description": "Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name.",

src/ManagedNetworkFabric/ManagedNetworkFabric.Autorest/UX/Microsoft.ManagedNetworkFabric/networkDevices-networkInterfaces.json

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -47,121 +47,6 @@
4747
]
4848
}
4949
]
50-
},
51-
{
52-
"name": "Invoke-AzNetworkFabricInterfaceUpdateAdminState",
53-
"description": "Update the admin state of the Network Interface.",
54-
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState",
55-
"help": {
56-
"learnMore": {
57-
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabricinterfaceupdateadminstate"
58-
},
59-
"parameterSets": [
60-
{
61-
"parameters": [
62-
"-NetworkDeviceName <String>",
63-
"-NetworkInterfaceName <String>",
64-
"-ResourceGroupName <String>",
65-
"[-SubscriptionId <String>]"
66-
]
67-
},
68-
{
69-
"parameters": [
70-
"-NetworkDeviceName <String>",
71-
"-NetworkInterfaceName <String>",
72-
"-ResourceGroupName <String>",
73-
"[-SubscriptionId <String>]"
74-
]
75-
}
76-
]
77-
},
78-
"examples": [
79-
{
80-
"description": "Update the admin state of the Network Interface.",
81-
"parameters": [
82-
{
83-
"name": "-NetworkDeviceName",
84-
"value": "[Path.networkDeviceName]"
85-
},
86-
{
87-
"name": "-NetworkInterfaceName",
88-
"value": "[Path.networkInterfaceName]"
89-
},
90-
{
91-
"name": "-ResourceGroupName",
92-
"value": "[Path.resourceGroupName]"
93-
},
94-
{
95-
"name": "-SubscriptionId",
96-
"value": "[Path.subscriptionId]"
97-
}
98-
]
99-
},
100-
{
101-
"description": "Update the admin state of the Network Interface.",
102-
"parameters": [
103-
{
104-
"name": "-NetworkDeviceName",
105-
"value": "[Path.networkDeviceName]"
106-
},
107-
{
108-
"name": "-NetworkInterfaceName",
109-
"value": "[Path.networkInterfaceName]"
110-
},
111-
{
112-
"name": "-ResourceGroupName",
113-
"value": "[Path.resourceGroupName]"
114-
},
115-
{
116-
"name": "-SubscriptionId",
117-
"value": "[Path.subscriptionId]"
118-
}
119-
]
120-
}
121-
]
122-
},
123-
{
124-
"name": "Remove-AzNetworkFabricInterface",
125-
"description": "Delete the Network Interface resource.",
126-
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}",
127-
"help": {
128-
"learnMore": {
129-
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/remove-aznetworkfabricinterface"
130-
},
131-
"parameterSets": [
132-
{
133-
"parameters": [
134-
"-Name <String>",
135-
"-NetworkDeviceName <String>",
136-
"-ResourceGroupName <String>",
137-
"[-SubscriptionId <String>]"
138-
]
139-
}
140-
]
141-
},
142-
"examples": [
143-
{
144-
"description": "Delete the Network Interface resource.",
145-
"parameters": [
146-
{
147-
"name": "-Name",
148-
"value": "[Path.networkInterfaceName]"
149-
},
150-
{
151-
"name": "-NetworkDeviceName",
152-
"value": "[Path.networkDeviceName]"
153-
},
154-
{
155-
"name": "-ResourceGroupName",
156-
"value": "[Path.resourceGroupName]"
157-
},
158-
{
159-
"name": "-SubscriptionId",
160-
"value": "[Path.subscriptionId]"
161-
}
162-
]
163-
}
164-
]
16550
}
16651
]
16752
}

src/ManagedNetworkFabric/ManagedNetworkFabric.Autorest/UX/Microsoft.ManagedNetworkFabric/networkTaps.json

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -43,68 +43,6 @@
4343
}
4444
]
4545
},
46-
{
47-
"name": "Invoke-AzNetworkFabricTapUpdateAdminState",
48-
"description": "Implements the operation to the underlying resources.",
49-
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState",
50-
"help": {
51-
"learnMore": {
52-
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabrictapupdateadminstate"
53-
},
54-
"parameterSets": [
55-
{
56-
"parameters": [
57-
"-NetworkTapName <String>",
58-
"-ResourceGroupName <String>",
59-
"[-SubscriptionId <String>]"
60-
]
61-
},
62-
{
63-
"parameters": [
64-
"-NetworkTapName <String>",
65-
"-ResourceGroupName <String>",
66-
"[-SubscriptionId <String>]"
67-
]
68-
}
69-
]
70-
},
71-
"examples": [
72-
{
73-
"description": "Implements the operation to the underlying resources.",
74-
"parameters": [
75-
{
76-
"name": "-NetworkTapName",
77-
"value": "[Path.networkTapName]"
78-
},
79-
{
80-
"name": "-ResourceGroupName",
81-
"value": "[Path.resourceGroupName]"
82-
},
83-
{
84-
"name": "-SubscriptionId",
85-
"value": "[Path.subscriptionId]"
86-
}
87-
]
88-
},
89-
{
90-
"description": "Implements the operation to the underlying resources.",
91-
"parameters": [
92-
{
93-
"name": "-NetworkTapName",
94-
"value": "[Path.networkTapName]"
95-
},
96-
{
97-
"name": "-ResourceGroupName",
98-
"value": "[Path.resourceGroupName]"
99-
},
100-
{
101-
"name": "-SubscriptionId",
102-
"value": "[Path.subscriptionId]"
103-
}
104-
]
105-
}
106-
]
107-
},
10846
{
10947
"name": "Remove-AzNetworkFabricTap",
11048
"description": "Deletes Network Tap.",

src/ManagedNetworkFabric/ManagedNetworkFabric.Autorest/custom/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Custom
2-
This directory contains custom implementation for non-generated cmdlets for the `Az.ManagedNetworkFabric` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.ManagedNetworkFabric.custom.psm1`. This file should not be modified.
2+
This directory contains custom implementation for non-generated cmdlets for the `Az.ManagedNetworkFabric` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.ManagedNetworkFabric.custom.psm1`. This file should not be modified.
33

44
## Info
55
- Modifiable: yes
@@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
1515
For script cmdlets, these are loaded via the `Az.ManagedNetworkFabric.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
1616

1717
## Purpose
18-
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.
18+
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
1919

2020
## Usage
21-
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
21+
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
2222
- Break
2323
- DefaultProfile
2424
- HttpPipelineAppend
@@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
3636
- `Microsoft.Azure.PowerShell.Cmdlets.ManagedNetworkFabric.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ManagedNetworkFabric`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.ManagedNetworkFabric.InternalExportAttribute`
39-
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.ManagedNetworkFabric`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
39+
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.ManagedNetworkFabric`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
4040
- `Microsoft.Azure.PowerShell.Cmdlets.ManagedNetworkFabric.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

0 commit comments

Comments
 (0)