Skip to content
Merged
Changes from 3 commits
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 @@ -1145,6 +1145,245 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations": {
"get": {
"tags": [
"migrationConfigurations"
],
"operationId": "migrationConfigurations_List",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

migrationConfigurations [](start = 24, length = 23)

please think about consistency in the operation naming. Here you have migrationConfigurations while the other already existing operation group is named DisasterRecoveryConfigs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

could you please help me on this?
for DisasterRecoveryConfigs operations its 'DisasterRecoveryConfigs' for Namespaces operations its 'Namespaces'.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the thing is that you have already shipped DisasterRecoveryConfigs (I mean shortened form of Configuration) that is why I advice keeping the consistency in names to shorten migrationConfigurations to MigrationConfigs

@v-Ajnava v-Ajnava Apr 20, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@hovsepm changed shortened to 'MigrationConfigs'. Also in URI, DR is 'disasterrecoveryconfigs' so have changed for migration to 'migrationconfigs'. please let me know the URI change is fine or need to revert it.

"description": "Gets all migrationConfigurations",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/namespaceNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the list of migrationConfigurations for servicebus namespace",
"schema": {
"$ref": "#/definitions/MigrationConfigListResult"
}
},
"default": {
"description": "ServiceBus error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}": {
"put": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this operation a LRO? IF so you need to mark it as "x-ms-long-running-operation": true. Otherwise the description is kind of confusing. If this operation initiates migration how does developer check the status of Migration? If it creates the configuration then method/operation Id is confusing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes its LRO, marked its as "x-ms-long-running-operation": true

"tags": [
"migrationConfigurations"
],
"operationId": "migrationConfigurations_CreateOrUpdate",
"description": "Creates or updates a new Migration Config",
"parameters": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like a typo "enties"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved

{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/namespaceNameParameter"
},
{
"$ref": "#/parameters/configNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MigrationConfigProperties"
},
"description": "Parameters required to Migration Config"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Migration Config successfully created",
"schema": {
"$ref": "#/definitions/MigrationConfigProperties"
}
},
"201": {
"description": "Migration Config creation request received"
},
"default": {
"description": "ServiceBus error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"migrationConfigurations"
],
"operationId": "migrationConfigurations_Delete",
"description": "Deletes a MigrationConfiguration",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/namespaceNameParameter"
},
{
"$ref": "#/parameters/configNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Delete Migration Config request accepted"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you should also handle 204: not found the same way as 200

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Otherwise callers will get Exception in C# and Java which is undesired.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved

},
"default": {
"description": "ServiceBus error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"migrationConfigurations"
],
"operationId": "migrationConfigurations_Get",
"description": "Retrieves Migration Config",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/namespaceNameParameter"
},
{
"$ref": "#/parameters/configNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved Migration Config)",
"schema": {
"$ref": "#/definitions/MigrationConfigProperties"
}
},
"default": {
"description": "ServiceBus error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/upgrade": {
"post": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are Migration upgrade and/or revert operations LRO?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no, those are not LRO

"tags": [
"migrationConfigurations"
],
"operationId": "migrationConfigurations_DisableMigration",
"description": "This operation disables the Migration",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be named as "migrationConfigurations_DisableMigration" or something more self explanatory. No need to move it to a separate operation group on the client SDKs;.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed it to 'migrationConfigurations_CompleteMigration' and changed the description. as this operation will complete migration process

"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/namespaceNameParameter"
},
{
"$ref": "#/parameters/configNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "upgrade operation of Migration Config is successful."
},
"default": {
"description": "ServiceBus error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrationConfigurations/{configName}/revert": {
"post": {
"tags": [
"migrationConfigurations"
],
"operationId": "migrationConfigurations_Revert",
"description": "Invokes MigrationConfig Revert",
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$ref": "#/parameters/namespaceNameParameter"
},
{
"$ref": "#/parameters/configNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "MigrationConfig Revert operation is successful."
},
"default": {
"description": "ServiceBus error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues": {
"get": {
"tags": [
Expand Down Expand Up @@ -3986,6 +4225,56 @@
}
},
"description": "The result of the List Alias(Disaster Recovery configuration) operation."
},
"MigrationConfigProperties": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"properties": {
"provisioningState": {
"readOnly": true,
"type": "string",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

provisioningState is a readonly field returned from server and may have additional values in the future. Modeling it as enums will cause client side runtime exceptions if there is a different value received.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

made it read only string

"description": "Provisioning state of Migration Configuration "
},
"primaryNamespaceName": {
"type": "string",
"description": "Existing premium Namespace name which has no entities, will be used for migration"
},
"postMigrationName": {
"type": "string",
"description": "Name to access connection strings of the Primary Namespace after migration"
}
},
"required": [
"primaryNamespaceName",
"postMigrationName"
],
"description": "Properties required to the Create Migration Configuration"
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "Single item in List or Get Migration Config operation"
},
"MigrationConfigListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/MigrationConfigProperties"
},
"description": "List of Migration Configs"
},
"nextLink": {
"type": "string",
"readOnly": true,
"description": "Link to the next set of results. Not empty if Value contains incomplete list of migrationConfigurations"
}
},
"description": "The result of the List migrationConfigurations operation."
}
},
"parameters": {
Expand Down Expand Up @@ -4090,6 +4379,20 @@
"maxLength": 50,
"x-ms-parameter-location": "method",
"description": "The Disaster Recovery configuration name"
},
"configNameParameter": {
"name": "configName",
"in": "path",
"description": "The configuration name. Should always be \"$default\".",
"required": true,
"type": "string",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add "x-ms-parameter-location": "method" annotation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved

"enum": [
"$default"
],
"x-ms-enum": {
"name": "MigrationConfigurationName",
"modelAsString": true
}
}
}
}