azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

ConnectionMonitor: need to update endpoint parameters

Open irrogozh opened this issue 6 years ago • 3 comments

Is your feature request related to a problem? Please describe. We updated some properties in connection monitor endpoint. We will need to update cli cmdlets with regard to this change

Describe the solution you'd like Here is updated swagger interface:

   "ConnectionMonitorEndpoint": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the connection monitor endpoint."
        },
        "type": {
          "type": "string",
          "enum": [
            "AzureVM",
            "AzureVNet",
            "AzureSubnet",
            "ExternalAddress",
            "MMAWorkspaceMachine",
            "MMAWorkspaceNetwork"
          ],
          "x-ms-enum": {
            "name": "EndpointType",
            "modelAsString": true
          },
          "description": "The endpoint type."
        }, **// New parameter. Need to add it into cmdlet**
        "resourceId": {
          "type": "string",
          "description": "Resource ID of the connection monitor endpoint."
        },
        "address": {
          "type": "string",
          "description": "Address of the connection monitor endpoint (IP or domain name)."
        },
        "filter": {
          "$ref": "#/definitions/ConnectionMonitorEndpointFilter",
          "description": "Filter for sub-items within the endpoint."
        },  **// Going to be deprecated (we need to get rid of this parameter in cmdlet**
        "scope": {
          "$ref": "#/definitions/ConnectionMonitorEndpointScope",
          "description": "Endpoint scope."
        }, **// New parameter. Need to use it instead of filter**
        "coverageLevel": {
          "type": "string",
          "enum": [
            "Default",
            "Low",
            "BelowAverage",
            "Average",
            "AboveAverage",
            "Full"
          ],
          "x-ms-enum": {
            "name": "CoverageLevel",
            "modelAsString": true
          },
          "description": "Test coverage for the endpoint."
        } **// New parameter Need to add it into cmdlet**
      },
      "required": [
        "name"
      ],
      "description": "Describes the connection monitor endpoint."
    }

Updated swagger: https://github.com/Azure/azure-rest-api-specs/blob/network-june-release/specification/network/resource-manager/Microsoft.Network/stable/2020-06-01/networkWatcher.json

Existing cmdlet:

az network watcher connection-monitor endpoint add --connection-monitor
                                                   --location
                                                   --name
                                                   [--address]
                                                   [--dest-test-groups]
                                                   **[--filter-item]
                                                   [--filter-type {Include}]**
                                                   [--resource-id]
                                                   [--source-test-groups]
                                                   [--subscription]

Instead of filter we would need to introduce new parameter/parameters.

My suggestion is to use two parameters: --include-item and --exclude-item (which will represent the array of string addresses) Also we would need to add --type and --coverageLevel parameters (see above)

Current cli endpoint cmdlets: https://docs.microsoft.com/en-us/cli/azure/network/watcher/connection-monitor/endpoint?view=azure-cli-latest

irrogozh avatar Jul 26 '20 17:07 irrogozh

add to S174

yonzhan avatar Jul 26 '20 23:07 yonzhan

To be clear, the --include-item and --exclude-item is for ConnectionMonitorEndpointScope

haroldrandom avatar Jul 30 '20 03:07 haroldrandom

@haroldrandom , yes, this is correct

irrogozh avatar Jul 30 '20 03:07 irrogozh