Skip to content

Commit

Permalink
New Partner APIs for ordering service (#13576)
Browse files Browse the repository at this point in the history
* Adding initial files for edge order parther APIs

* Fixes for spec and example validations.

* Fixes for example and spec validations.

* Fixed autorest validation issues.

* Changes for order to order otem and actiontype removal for operationsList API.

* Some fixes from pull request errors

* Fixed tag issue

* Removing swagger file temporarily to fix filename issue

* Adding swagger file with changed name

* Added multiple examples in swagger json for search inventories.

* Fixed some descriptions.

* Changes in the specs and examples as per discussion with Chris.

* fixing secret validation error

Co-authored-by: Pramila Dhaka <prdhaka@microsoft.com>
  • Loading branch information
Pramila-dhaka and Pramila Dhaka authored Apr 1, 2021
1 parent cd3b05d commit 467bc83
Show file tree
Hide file tree
Showing 8 changed files with 1,247 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"parameters": {
"api-version": "2020-12-01-preview",
"User-Agent": [
"vscode-restclient"
],
"Referer": [
"https://localhost/providers/Microsoft.EdgeOrderPartner/operations?api-version=2020-12-01-preview"
]
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.EdgeOrderPartner/operations/read",
"display": {
"provider": "Edge Ordering",
"resource": "Operations",
"operation": "List or Get Operations",
"description": "List or get the Operations"
},
"origin": "user",
"isDataAction": false
},
{
"name": "Microsoft.EdgeOrderPartner/searchInventories/action",
"display": {
"provider": "Edge Ordering",
"resource": "ArmApiRes_Microsoft.EdgeOrderPartner"
},
"origin": "user",
"isDataAction": true
},
{
"name": "Microsoft.EdgeOrderPartner/locations/productFamilies/inventories/manageLink/action",
"display": {
"provider": "Edge Ordering",
"resource": "ArmApiRes_inventories"
},
"origin": "user",
"isDataAction": true
},
{
"name": "Microsoft.EdgeOrderPartner/locations/productFamilies/inventories/manageInventoryMetadata/action",
"display": {
"provider": "Edge Ordering",
"resource": "ArmApiRes_inventories"
},
"origin": "user",
"isDataAction": true
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"subscriptionId": "b783ea86-c85c-4175-b76d-3992656af50d",
"location": "westus",
"serialNumber": "SerialNumber1",
"familyIdentifier": "AzureStackEdge",
"api-version": "2020-12-01-preview",
"User-Agent": [
"vscode-restclient"
],
"Referer": [
"https://localhost/subscriptions/b783ea86-c85c-4175-b76d-3992656af50d/providers/Microsoft.EdgeOrderPartner/locations/westus/productFamilies/AzureStackEdge/inventories/SerialNumber1/manageInventoryMetadata?api-version=2020-12-01-preview"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
"181"
],
"manageInventoryMetadataRequest": {
"inventoryMetadata": "InventoryMetadata",
"configurationOnDevice": {
"configurationIdentifier": "EdgeP_High"
}
}
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parameters": {
"subscriptionId": "b783ea86-c85c-4175-b76d-3992656af50d",
"location": "westus",
"serialNumber": "SerialNumber1",
"familyIdentifier": "AzureStackEdge",
"api-version": "2020-12-01-preview",
"User-Agent": [
"vscode-restclient"
],
"Referer": [
"https://localhost/subscriptions/b783ea86-c85c-4175-b76d-3992656af50d/providers/Microsoft.EdgeOrderPartner/locations/westus/productFamilies/AzureStackEdge/inventories/SerialNumber1/manageLink?api-version=2020-12-01-preview"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
"144"
],
"manageLinkRequest": {
"managementResourceArmId": "/subscriptions/c783ea86-c85c-4175-b76d-3992656af50d/resourceGroups/EdgeTestRG/providers/Microsoft.DataBoxEdge/DataBoxEdgeDevices/TestEdgeDeviceName1",
"operation": "Link",
"tenantId": "a783ea86-c85c-4175-b76d-3992656af50d"
}
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"parameters": {
"subscriptionId": "b783ea86-c85c-4175-b76d-3992656af50d",
"api-version": "2020-12-01-preview",
"User-Agent": [
"vscode-restclient"
],
"Referer": [
"https://localhost/subscriptions/b783ea86-c85c-4175-b76d-3992656af50d/providers/Microsoft.EdgeOrderPartner/searchInventories?api-version=2020-12-01-preview"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
"75"
],
"searchInventoriesRequest": {
"serialNumber": "SerialNumber1",
"familyIdentifier": "AzureStackEdge"
}
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"serialNumber": "SerialNumber1",
"location": "westus",
"orderItem": {
"armId": "/subscriptions/b783ea86-c85c-4175-b76d-3992656af50d/resourceGroups/TestRG/providers/Microsoft.EdgeOrder/orders/TestOrderName1",
"orderItemType": "Rental"
},
"configuration": {
"familyIdentifier": "AzureStackEdge",
"productLineIdentifier": "AzureStackEdgePL",
"productIdentifier": "AzureStackEdgeProGPU",
"configurationIdentifier": "EdgeP_Base",
"configurationIdentifierOnDevice": "EdgeP_High"
},
"managementResource": {
"armId": "/subscriptions/c783ea86-c85c-4175-b76d-3992656af50d/resourceGroups/EdgeTestRG/providers/Microsoft.DataBoxEdge/DataBoxEdgeDevices/TestEdgeDeviceName1",
"tenantId": "a783ea86-c85c-4175-b76d-3992656af50d"
},
"inventory": {
"status": "Healthy",
"location": "Rack",
"registrationAllowed": true
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"parameters": {
"subscriptionId": "b783ea86-c85c-4175-b76d-3992656af50d",
"api-version": "2020-12-01-preview",
"$expand": "details",
"User-Agent": [
"vscode-restclient"
],
"Referer": [
"https://localhost/subscriptions/b783ea86-c85c-4175-b76d-3992656af50d/providers/Microsoft.EdgeOrderPartner/searchInventories?api-version=2020-12-01-preview&$expand=details"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
"75"
],
"searchInventoriesRequest": {
"serialNumber": "SerialNumber1",
"familyIdentifier": "AzureStackEdge"
}
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"serialNumber": "SerialNumber1",
"location": "westus",
"orderItem": {
"armId": "/subscriptions/b783ea86-c85c-4175-b76d-3992656af50d/resourceGroups/TestRG/providers/Microsoft.EdgeOrder/orders/TestOrderName1",
"orderItemType": "Rental"
},
"configuration": {
"familyIdentifier": "AzureStackEdge",
"productLineIdentifier": "AzureStackEdgePL",
"productIdentifier": "AzureStackEdgeProGPU",
"configurationIdentifier": "EdgeP_Base",
"configurationIdentifierOnDevice": "EdgeP_High"
},
"managementResource": {
"armId": "/subscriptions/c783ea86-c85c-4175-b76d-3992656af50d/resourceGroups/EdgeTestRG/providers/Microsoft.DataBoxEdge/DataBoxEdgeDevices/TestEdgeDeviceName1",
"tenantId": "a783ea86-c85c-4175-b76d-3992656af50d"
},
"inventory": {
"status": "Healthy",
"location": "Rack",
"registrationAllowed": true
},
"details": {
"orderItem": {
"status": {
"stageStatus": "Succeeded",
"stageName": "Delivered",
"displayName": "Delivered - Succeeded",
"startTime": "2020-08-07T10:50:36.3341513+05:30"
},
"subscription": {
"id": "b783ea86-c85c-4175-b76d-3992656af50d",
"state": "Registered",
"quotaId": "Internal_2014-09-01"
}
},
"inventoryMetadata": "This is currently in Japan",
"configuration": {
"specifications": [
{
"name": "Cores",
"value": "24"
},
{
"name": "Memory",
"value": "128 GB"
},
{
"name": "Storage",
"value": "~8 TB"
}
]
},
"inventory": {
"additionalData": {
"SourceCountry": "USA",
"ManuacturingYear": "2020"
}
},
"billing": {
"billingType": "Pav2",
"status": "InProgress"
},
"inventorySecrets": {
"PublicCert": "<PublicCert>"
}
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## AzureResourceSchema

These settings apply only when `--azureresourceschema` is specified on the command line.

### AzureResourceSchema multi-api

``` yaml $(azureresourceschema) && $(multiapi)
batch:
- tag: schema-edgeorderpartner-2020-12-01-preview

```

Please also specify `--azureresourceschema-folder=<path to the root directory of your azure-resource-manager-schemas clone>`.

### Tag: schema-edgeorderpartner-2020-12-01-preview and azureresourceschema

``` yaml $(tag) == 'schema-edgeorderpartner-2020-12-01-preview' && $(azureresourceschema)
output-folder: $(azureresourceschema-folder)/schemas

# all the input files in this apiVersion
input-file:
- Microsoft.EdgeOrderPartner/preview/2020-12-01-preview/edgeorderpartner.json

```
41 changes: 41 additions & 0 deletions specification/edgeorderpartner/resource-manager/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# EdgeOrderPartner

> see https://aka.ms/autorest
This is the AutoRest configuration file for EdgeOrderPartner.



---
## Getting Started
To build the SDK for EdgeOrderPartner, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`
To see additional help and options, run:

> `autorest --help`
---

## Configuration



### Basic Information
These are the global settings for the EdgeOrderPartner API.

``` yaml
title: Edge Order Partner API's
openapi-type: arm
tag: package-2020-12-preview
```
### Tag: package-2020-12-preview
These settings apply only when `--tag=package-2020-12-preview` is specified on the command line.

``` yaml $(tag) == 'package-2020-12-preview'
input-file:
- Microsoft.EdgeOrderPartner/preview/2020-12-01-preview/edgeorderpartner.json
```
---

0 comments on commit 467bc83

Please sign in to comment.