Skip to content

Commit

Permalink
Add virtual hub bgp connections subresources virtualRouterPeerAdverti… (
Browse files Browse the repository at this point in the history
#10434)

* Add virtual hub bgp connections subresources virtualRouterPeerAdvertisedRoute and virtualRouterPeerLearnedRoute with POST opertion

* Add examples

* Change name of operationid

* change output of advertised route
  • Loading branch information
litchiyangMSFT committed Aug 24, 2020
1 parent 8c7fcf4 commit e52be70
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"api-version": "2020-06-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"hubName": "virtualRouter1",
"connectionName": "peer1"
},
"responses": {
"202": {},
"200": {
"body": {
"value": [
{
"localAddress": "10.85.3.4",
"network": "10.45.0.0/16",
"nextHop": "10.85.3.4",
"sourcePeer": "10.85.3.4",
"origin": "Igp",
"asPath": "65515",
"weight": 0
},
{
"localAddress": "10.85.3.4",
"network": "10.85.0.0/16",
"nextHop": "10.85.3.4",
"sourcePeer": "10.85.3.4",
"origin": "Igp",
"asPath": "65515",
"weight": 0
},
{
"localAddress": "10.85.3.4",
"network": "10.100.0.0/16",
"nextHop": "10.85.3.4",
"sourcePeer": "10.85.3.4",
"origin": "Igp",
"asPath": "65515",
"weight": 0
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"api-version": "2020-06-01",
"subscriptionId": "subid",
"resourceGroupName": "rg1",
"hubName": "virtualRouter1",
"connectionName": "peer1"
},
"responses": {
"202": {},
"200": {
"body": {
"value": [
{
"localAddress": "10.85.3.4",
"network": "10.101.0.0/16",
"nextHop": "10.85.4.4",
"sourcePeer": "10.85.4.4",
"origin": "EBgp",
"asPath": "65002-65001",
"weight": 32768
},
{
"localAddress": "10.85.3.5",
"network": "10.101.0.0/16",
"nextHop": "10.85.4.4",
"sourcePeer": "10.85.4.4",
"origin": "EBgp",
"asPath": "65002-65001",
"weight": 32768
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4362,6 +4362,128 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes": {
"post": {
"operationId": "VirtualHubBgpConnections_ListLearnedRoutes",
"description": "Retrieves a list of routes the virtual hub bgp connection has learned.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "hubName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual hub."
},
{
"name": "connectionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual hub bgp connection."
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "List of advertised BGP routes.",
"schema": {
"$ref": "#/definitions/PeerRouteList"
}
},
"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-examples": {
"VirtualRouterPeerListLearnedRoutes": {
"$ref": "./examples/VirtualRouterPeerListLearnedRoute.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes": {
"post": {
"operationId": "VirtualHubBgpConnections_ListAdvertisedRoutes",
"description": "Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "hubName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual hub."
},
{
"name": "connectionName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the virtual hub bgp connection."
},
{
"$ref": "./network.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./network.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "List of learned BGP routes.",
"schema": {
"$ref": "#/definitions/PeerRouteList"
}
},
"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-examples": {
"VirtualRouterPeerListAdvertisedRoutes": {
"$ref": "./examples/VirtualRouterPeerListAdvertisedRoute.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}": {
"get": {
"operationId": "VirtualHubIpConfiguration_Get",
Expand Down Expand Up @@ -5342,6 +5464,59 @@
},
"description": "Properties of the bgp connection."
},
"PeerRoute": {
"properties": {
"localAddress": {
"type": "string",
"readOnly": true,
"description": "The peer's local address."
},
"network": {
"type": "string",
"readOnly": true,
"description": "The route's network prefix."
},
"nextHop": {
"type": "string",
"readOnly": true,
"description": "The route's next hop."
},
"sourcePeer": {
"type": "string",
"readOnly": true,
"description": "The peer this route was learned from."
},
"origin": {
"type": "string",
"readOnly": true,
"description": "The source this route was learned from."
},
"asPath": {
"type": "string",
"readOnly": true,
"description": "The route's AS path sequence."
},
"weight": {
"type": "integer",
"format": "int32",
"readOnly": true,
"description": "The route's weight."
}
},
"description": "Peer routing details."
},
"PeerRouteList": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/PeerRoute"
},
"description": "List of peer routes."
}
},
"description": "List of virtual router peer routes."
},
"HubIpConfiguration": {
"properties": {
"properties": {
Expand Down

0 comments on commit e52be70

Please sign in to comment.