-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fixing global parameters for siterecovery and resourcehealth #1753
Changes from all commits
4a49385
7b69658
8983664
024fd4f
a80c2da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -548,13 +548,6 @@ | |
"description": "The name of the resource group.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ResourceTypeParameter": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it appears this wasn't been used in the spec or any others in the repo, right? so removing it shouldn't cause any harm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was not being used and having it in the global parameters section was causing this to be a client property. |
||
"name": "resourceType", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource type." | ||
}, | ||
"FilterParameter": { | ||
"name": "$filter", | ||
"in": "query", | ||
|
@@ -572,4 +565,4 @@ | |
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -564,13 +564,6 @@ | |
"description": "The name of the resource group.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ResourceTypeParameter": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same situation as above here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup |
||
"name": "resourceType", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource type." | ||
}, | ||
"FilterParameter": { | ||
"name": "$filter", | ||
"in": "query", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7399,7 +7399,7 @@ | |
}, | ||
"ServicePlacementPreferPrimaryDomainPolicyDescription": { | ||
"x-ms-discriminator-value": "PreferPrimaryDomain", | ||
"description": "Describes the policy to be used for placement of a Service Fabric service where the service's Primary replicas should optimally be placed in a particular domain.\n\nThis placement policy is usually used with fault domains in scenarios where the Service Fabric cluster is geographically distributed in order to indicate that a service�s primary replica should be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up located in this domain due to failures, capacity limits, or other constraints.\n", | ||
"description": "Describes the policy to be used for placement of a Service Fabric service where the service's Primary replicas should optimally be placed in a particular domain.\n\nThis placement policy is usually used with fault domains in scenarios where the Service Fabric cluster is geographically distributed in order to indicate that a service's primary replica should be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up located in this domain due to failures, capacity limits, or other constraints.\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @samedder - In this commit I have replaced the MS Word style single quote with simple single quote as it generates wonky characters in the generated client documentation. |
||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/ServicePlacementPolicyDescription" | ||
|
@@ -10740,7 +10740,7 @@ | |
}, | ||
"ServicesHealthStateFilterOptionalQueryParam": { | ||
"name": "ServicesHealthStateFilter", | ||
"description": "Allows filtering of the services health state objects returned in the result of services health query based on their health state.\nThe possible values for this parameter include integer value of one of the following health states.\nOnly services that match the filter are returned. All services are used to evaluate the aggregated health state.\nIf not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value\nobtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned. \n \n- Default - Default value. Matches any HealthState. The value is zero. \n- None - Filter that doesn�t match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. \n- Ok - Filter that matches input with HealthState value Ok. The value is 2. \n- Warning - Filter that matches input with HealthState value Warning. The value is 4. \n- Error - Filter that matches input with HealthState value Error. The value is 8. \n- All - Filter that matches input with any HealthState value. The value is 65535. \n", | ||
"description": "Allows filtering of the services health state objects returned in the result of services health query based on their health state.\nThe possible values for this parameter include integer value of one of the following health states.\nOnly services that match the filter are returned. All services are used to evaluate the aggregated health state.\nIf not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value\nobtained using bitwise 'OR' operator. For example, if the provided value is 6 then health state of services with HealthState value of OK (2) and Warning (4) will be returned. \n \n- Default - Default value. Matches any HealthState. The value is zero. \n- None - Filter that doesn't match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. \n- Ok - Filter that matches input with HealthState value Ok. The value is 2. \n- Warning - Filter that matches input with HealthState value Warning. The value is 4. \n- Error - Filter that matches input with HealthState value Error. The value is 8. \n- All - Filter that matches input with any HealthState value. The value is 65535. \n", | ||
"in": "query", | ||
"x-ms-parameter-location": "method", | ||
"type": "integer", | ||
|
@@ -11238,4 +11238,4 @@ | |
"description": "The server timeout for performing the operation in seconds. This specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds." | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3128,27 +3128,25 @@ | |
"api-version": { | ||
"name": "api-version", | ||
"in": "query", | ||
"description": "The version of the API. This is a required parameter and it's value must be \"2016-09-01\".", | ||
"description": "The version of the API. This is a required parameter.", | ||
"required": true, | ||
"type": "string", | ||
"enum": [ | ||
"2016-09-01" | ||
], | ||
"default": "2016-09-01" | ||
"type": "string" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @samedder - Can you please take a look at changes I made in the service fabric resource-manager spec.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chingchenmsft needs to sign off on this. I believe this may break our clients so he should verify. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you fix the description as well? "This is a required parameter and it's value must be "2016-09-01"." |
||
}, | ||
"applicationName": { | ||
"name": "applicationName", | ||
"in": "path", | ||
"description": "The name of the application resource.", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"applicationTypeName": { | ||
"name": "applicationTypeName", | ||
"in": "path", | ||
"description": "The name of the application type name resource", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"clusterNameParameter": { | ||
"name": "clusterName", | ||
|
@@ -3199,7 +3197,8 @@ | |
"in": "path", | ||
"description": "The name of the service resource in the format of {applicationName}~{serviceName}.", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"subscriptionId": { | ||
"name": "subscriptionId", | ||
|
@@ -3213,7 +3212,8 @@ | |
"in": "path", | ||
"description": "The application type version.", | ||
"required": true, | ||
"type": "string" | ||
"type": "string", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"clusterBodyParam": { | ||
"name": "Cluster", | ||
|
@@ -3222,7 +3222,8 @@ | |
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/Cluster" | ||
} | ||
}, | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"clusterUpdateParameterBody": { | ||
"name": "ClusterUpdateParameters", | ||
|
@@ -3231,7 +3232,8 @@ | |
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/ClusterUpdateParameters" | ||
} | ||
}, | ||
"x-ms-parameter-location": "method" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what issue was not having this causing? what's the breaking change on generated code due to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new SiteRecoveryManagementClient(credentials, subscriptionId, resourceGroupName, resourceName);
This makes the client require resourceGroupName and resourceName in the client constructor. Both of these become client properties and that is incorrect. I had filed an issue in the linter repo about this. If it is management-plane swagger then the linter should warn if it sees anything else apart from subscriptionId and apiVersion and does not have x-ms-parameter-location set to method. Azure/azure-openapi-validator#84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As responded over the mail thread:
As per our scenarios, customers are more likely to work in the context of a single ResourceName, so, It makes more sense to have ResourceGroupName and ResourceName in global parameters section for recoveryservicessiterecovery specification. For more context we have:
Moreover, any change as suggested in the thread would be a breaking change for our existing clients like PowerShell and Ibiza (requires passing ResourceGroupName and ResourceName explicitly as input to every call rather than just once at sdk client initialization) as I can understand, which we would not be able to take at this point.
Let us know if we are missing some point to understand here.
Thanks,
Avneesh