Skip to content

removing interface remove option #24019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ManagedNetworkFabric.private.dll'
FormatsToProcess = './Az.ManagedNetworkFabric.format.ps1xml'
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'
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'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ManagedNetworkFabric'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ directive:
verb: Update
subject: NetworkTapRuleAdministrativeState
remove: true
- where:
verb: Remove
subject: Interface
remove: true
# Handle 200 status code not exist in swagger spec for DELETE API's
- from: swagger-document
where: $.paths..delete.responses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,68 +43,6 @@
}
]
},
{
"name": "Invoke-AzNetworkFabricL2DomainUpdateAdminState",
"description": "Enables isolation domain across the fabric or on specified racks.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/updateAdministrativeState",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabricl2domainupdateadminstate"
},
"parameterSets": [
{
"parameters": [
"-L2IsolationDomainName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
},
{
"parameters": [
"-L2IsolationDomainName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Enables isolation domain across the fabric or on specified racks.",
"parameters": [
{
"name": "-L2IsolationDomainName",
"value": "[Path.l2IsolationDomainName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
},
{
"description": "Enables isolation domain across the fabric or on specified racks.",
"parameters": [
{
"name": "-L2IsolationDomainName",
"value": "[Path.l2IsolationDomainName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzNetworkFabricL2Domain",
"description": "Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,68 +43,6 @@
}
]
},
{
"name": "Invoke-AzNetworkFabricL3DomainUpdateAdminState",
"description": "Enables racks for this Isolation Domain.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateAdministrativeState",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabricl3domainupdateadminstate"
},
"parameterSets": [
{
"parameters": [
"-L3IsolationDomainName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
},
{
"parameters": [
"-L3IsolationDomainName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Enables racks for this Isolation Domain.",
"parameters": [
{
"name": "-L3IsolationDomainName",
"value": "[Path.l3IsolationDomainName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
},
{
"description": "Enables racks for this Isolation Domain.",
"parameters": [
{
"name": "-L3IsolationDomainName",
"value": "[Path.l3IsolationDomainName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzNetworkFabricL3Domain",
"description": "Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,121 +47,6 @@
]
}
]
},
{
"name": "Invoke-AzNetworkFabricInterfaceUpdateAdminState",
"description": "Update the admin state of the Network Interface.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/updateAdministrativeState",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabricinterfaceupdateadminstate"
},
"parameterSets": [
{
"parameters": [
"-NetworkDeviceName <String>",
"-NetworkInterfaceName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
},
{
"parameters": [
"-NetworkDeviceName <String>",
"-NetworkInterfaceName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Update the admin state of the Network Interface.",
"parameters": [
{
"name": "-NetworkDeviceName",
"value": "[Path.networkDeviceName]"
},
{
"name": "-NetworkInterfaceName",
"value": "[Path.networkInterfaceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
},
{
"description": "Update the admin state of the Network Interface.",
"parameters": [
{
"name": "-NetworkDeviceName",
"value": "[Path.networkDeviceName]"
},
{
"name": "-NetworkInterfaceName",
"value": "[Path.networkInterfaceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzNetworkFabricInterface",
"description": "Delete the Network Interface resource.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/remove-aznetworkfabricinterface"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-NetworkDeviceName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete the Network Interface resource.",
"parameters": [
{
"name": "-Name",
"value": "[Path.networkInterfaceName]"
},
{
"name": "-NetworkDeviceName",
"value": "[Path.networkDeviceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,68 +43,6 @@
}
]
},
{
"name": "Invoke-AzNetworkFabricTapUpdateAdminState",
"description": "Implements the operation to the underlying resources.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.managednetworkfabric/invoke-aznetworkfabrictapupdateadminstate"
},
"parameterSets": [
{
"parameters": [
"-NetworkTapName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
},
{
"parameters": [
"-NetworkTapName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Implements the operation to the underlying resources.",
"parameters": [
{
"name": "-NetworkTapName",
"value": "[Path.networkTapName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
},
{
"description": "Implements the operation to the underlying resources.",
"parameters": [
{
"name": "-NetworkTapName",
"value": "[Path.networkTapName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzNetworkFabricTap",
"description": "Deletes Network Tap.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Custom
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.
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.

## Info
- Modifiable: yes
Expand All @@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
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.

## Purpose
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.
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.

## Usage
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:
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:
- Break
- DefaultProfile
- HttpPipelineAppend
Expand All @@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.ManagedNetworkFabric.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ManagedNetworkFabric`.
- `Microsoft.Azure.PowerShell.Cmdlets.ManagedNetworkFabric.InternalExportAttribute`
- 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.
- 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.
- `Microsoft.Azure.PowerShell.Cmdlets.ManagedNetworkFabric.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
Loading