Skip to content

Commit

Permalink
VirtualHub : Add Routing State and expose Effective Routes Api (#9385)
Browse files Browse the repository at this point in the history
* Add Routing State and expose Effective Routes Api

* updated opId name and added examples

* prettier fix done

* rename variable to prevent conflict
  • Loading branch information
nagula-ritvika authored May 30, 2020
1 parent f158099 commit 870cc67
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"virtualHubName": "virtualHub1",
"api-version": "2020-05-01",
"effectiveRoutesParameters": {
"resourceId": "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayName/expressRouteConnections/connectionName",
"virtualWanResourceType": "ExpressRouteConnection"
}
},
"responses": {
"200": {
"description": "Request successful. Follow the location header for the effective routes list."
},
"202": {
"description": "Accepted and the operation will complete asynchronously."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"virtualHubName": "virtualHub1",
"api-version": "2020-05-01",
"effectiveRoutesParameters": {
"resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1",
"virtualWanResourceType": "RouteTable"
}
},
"responses": {
"200": {
"description": "Request successful. Follow the location header for the effective routes list."
},
"202": {
"description": "Accepted and the operation will complete asynchronously."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"virtualHubName": "virtualHub1",
"api-version": "2020-05-01",
"effectiveRoutesParameters": null
},
"responses": {
"200": {
"description": "Request successful. Follow the location header for the effective routes list."
},
"202": {
"description": "Accepted and the operation will complete asynchronously."
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"virtualHubRouteTableV2s": [],
"addressPrefix": "10.10.1.0/24",
"sku": "Basic",
"routingState": "Provisioned",
"virtualRouterAsn": 65515,
"virtualRouterIps": [
"10.10.1.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
],
"addressPrefix": "10.10.1.0/24",
"sku": "Basic",
"routingState": "Provisioned",
"virtualRouterAsn": 65515,
"virtualRouterIps": [
"10.10.1.12",
Expand Down Expand Up @@ -112,6 +113,7 @@
],
"addressPrefix": "210.10.1.0/24",
"sku": "Basic",
"routingState": "Provisioned",
"virtualRouterAsn": 65515,
"virtualRouterIps": [
"10.10.1.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
],
"addressPrefix": "10.10.1.0/24",
"sku": "Basic",
"routingState": "Provisioned",
"virtualRouterAsn": 65515,
"virtualRouterIps": [
"10.10.1.12",
Expand Down Expand Up @@ -113,6 +114,7 @@
],
"addressPrefix": "210.10.1.0/24",
"sku": "Basic",
"routingState": "Provisioned",
"virtualRouterAsn": 65515,
"virtualRouterIps": [
"10.10.1.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"virtualHubRouteTableV2s": [],
"addressPrefix": "10.168.0.0/24",
"sku": "Basic",
"routingState": "Provisioned",
"virtualRouterAsn": 65515,
"virtualRouterIps": [
"10.10.1.12",
Expand All @@ -57,6 +58,7 @@
"virtualHubRouteTableV2s": [],
"addressPrefix": "10.168.0.0/24",
"sku": "Basic",
"routingState": "Provisioned",
"virtualRouterAsn": 65515,
"virtualRouterIps": [
"10.10.1.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4480,6 +4480,72 @@
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes": {
"post": {
"operationId": "VirtualHubs_GetEffectiveVirtualHubRoutes",
"x-ms-examples": {
"Effective Routes for the Virtual Hub": {
"$ref": "./examples/EffectiveRoutesListForVirtualHub.json"
},
"Effective Routes for a Route Table resource": {
"$ref": "./examples/EffectiveRoutesListForRouteTable.json"
},
"Effective Routes for a Connection resource": {
"$ref": "./examples/EffectiveRoutesListForConnection.json"
}
},
"description": "Gets the effective routes configured for the Virtual Hub resource or the specified resource .",
"parameters": [
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
},
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The resource group name of the VirtualHub."
},
{
"name": "virtualHubName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VirtualHub."
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"name": "effectiveRoutesParameters",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/EffectiveRoutesParameters"
},
"description": "Parameters supplied to get the effective routes for a specific resource."
}
],
"responses": {
"200": {
"description": "Request successful. Follow the location header for the effective routes list."
},
"202": {
"description": "Accepted and the operation will complete asynchronously."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./network.json#/definitions/CloudError"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -4796,6 +4862,10 @@
"type": "string",
"description": "The sku of this VirtualHub."
},
"routingState": {
"$ref": "#/definitions/RoutingState",
"description": "The routing state."
},
"bgpConnections": {
"type": "array",
"readOnly": true,
Expand Down Expand Up @@ -4831,6 +4901,21 @@
},
"description": "Parameters for VirtualHub."
},
"RoutingState": {
"type": "string",
"description": "The current routing state of the VirtualHub.",
"readOnly": true,
"enum": [
"None",
"Provisioned",
"Provisioning",
"Failed"
],
"x-ms-enum": {
"name": "RoutingState",
"modelAsString": true
}
},
"BgpConnection": {
"properties": {
"properties": {
Expand Down Expand Up @@ -6501,6 +6586,62 @@
"description": "The ip address of the next hop."
}
}
},
"VirtualHubEffectiveRouteEffectiveRouteList": {
"description": "EffectiveRoutes List.",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/VirtualHubEffectiveRoute"
},
"description": "The list of effective routes configured on the virtual hub or the specified resource."
}
}
},
"VirtualHubEffectiveRoute": {
"description": "The effective route configured on the virtual hub or specified resource.",
"properties": {
"addressPrefixes": {
"description": "The list of address prefixes.",
"type": "array",
"items": {
"type": "string"
}
},
"nextHops": {
"description": "The list of next hops.",
"type": "array",
"items": {
"type": "string"
}
},
"nextHopType": {
"description": "The type of the next hop.",
"type": "string"
},
"asPath": {
"description": "The ASPath of this route.",
"type": "string"
},
"routeOrigin": {
"description": "The origin of this route.",
"type": "string"
}
}
},
"EffectiveRoutesParameters": {
"description": "The parameters specifying the resource whose effective routes are being requested.",
"properties": {
"resourceId": {
"$ref": "./network.json#/definitions/Resource",
"description": "The resource whose effective routes are being requested."
},
"virtualWanResourceType": {
"type": "string",
"description": "The type of the specified resource like RouteTable, ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection."
}
}
}
}
}

0 comments on commit 870cc67

Please sign in to comment.