Skip to content
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

Added power state to Hana Instance #3570

Merged
merged 3 commits into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -12,6 +12,7 @@
"name": "myHanaInstance",
"type": "Microsoft.HanaOnAzure/hanaInstances",
"location": "westus",
"powerState": "restarting",
"tags": {
"key": "value"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"name": "myHanaInstance1",
"type": "Microsoft.HanaOnAzure/hanaInstances",
"location": "westus",
"powerState": "started",
"tags": {
"key": "value"
},
Expand Down Expand Up @@ -44,6 +45,7 @@
"name": "myHanaInstance2",
"type": "Microsoft.HanaOnAzure/hanaInstances",
"location": "westus",
"powerState": "started",
"tags": {
"key": "value"
},
Expand Down Expand Up @@ -76,6 +78,7 @@
"name": "myHanaInstance3",
"type": "Microsoft.HanaOnAzure/hanaInstances",
"location": "westus",
"powerState": "started",
"properties": {
"hanaInstanceId": "00000000-0000-0000-0000-000000000000",
"hardwareProfile": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"name": "myHanaInstance1",
"type": "Microsoft.HanaOnAzure/hanaInstances",
"location": "westus",
"powerState": "started",
"tags": {
"key": "value"
},
Expand Down Expand Up @@ -45,6 +46,7 @@
"name": "myHanaInstance2",
"type": "Microsoft.HanaOnAzure/hanaInstances",
"location": "westus",
"powerState": "started",
"tags": {
"key": "value"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@
"type": "string",
"description": "Resource location"
},
"powerState": {
Copy link
Contributor

@dsgouda dsgouda Aug 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cannot be a top level resource property. Must be a part of the properties property

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if this is how the service is consuming/returning the resource information

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just updated our API to move the power state. here is a sample:

{
    "id": "/subscriptions/c5c14913-17c5-4bb7-a8d4-5fb40d0a4823/resourceGroups/rg10004/providers/Microsoft.HanaOnAzure/hanaInstances/westusbmiName",
    "name": "westusbmiName",
    "type": "Microsoft.HanaOnAzure/hanaInstances",
    "location": "westus",
    "tags": {
     "owner": "alias4"
    },
    "properties": {
     "hanaInstanceId": "2e30e358-7ceb-42d0-b7f4-cb7e41e1a8bc",
     "powerState": "started",
     "hardwareProfile": {
      "hardwareType": "Cisco_UCS",
      "hanaInstanceSize": "S72"
     },
     "networkProfile": {
      "networkInterfaces": [
       {
        "ipAddress": "123.123.123.123"
       }
      ],
      "circuitId": "/subscriptions/c5c14913-17c5-4bb7-a8d4-5fb40d0a4823/resourceGroups/rg10004/providers/Microsoft.Network/expressRouteCircuits/westusbmiName"
     },
     "storageProfile": {
      "nfsIpAddress": "123.123.123.124"
     },
     "osProfile": {
      "computerName": "westusbmiName",
      "osType": "SLES 12 SP2",
      "version": "12 SP2"
     }
    }
   }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
As a sidenote, it looks like powerstate could be an enum, you could simply use an x-ms-enum

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

powerstate is an enum now

"readOnly": true,
"type": "string",
"description": "Resource power state"
},
"tags": {
"readOnly": true,
"type": "object",
Expand Down