Skip to content

Add connection draining support to application gateway#913

Merged
amarzavery merged 30 commits intoAzure:masterfrom
jobatzil:feature/jobatzil/connection_draining
Feb 15, 2017
Merged

Add connection draining support to application gateway#913
amarzavery merged 30 commits intoAzure:masterfrom
jobatzil:feature/jobatzil/connection_draining

Conversation

@jobatzil
Copy link
Copy Markdown
Contributor

@jobatzil jobatzil commented Feb 7, 2017

This PR adds the support of connection draining to application gateways.
Starts with api-version 2016-12-01.

@azurecla
Copy link
Copy Markdown

azurecla commented Feb 7, 2017

Hi @jobatzil, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (jobatzil). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@amarzavery
Copy link
Copy Markdown
Contributor

amarzavery commented Feb 7, 2017

@jobatzil - Can you please copy the previous api-version 2016-09-01 and paste it in the "2016-12-01/swagger/applicationGateway.json" file. In the next commit, overwrite the file with new changes. This will help us see the diff and makes reviewing easier.

Update: I noticed different commits.

One more request - Can you please provide examples for request and response using the extension x-ms-examples? This will

  • help us validate the examples against the swagger spec and catch errors early on and
  • it will also form the basis for customer facing REST API documentation on docs.microsoft.com website.

You can more info about the extension and an example swagger spec over here.

@jobatzil
Copy link
Copy Markdown
Contributor Author

jobatzil commented Feb 7, 2017

@amarzavery
The first commit of this PR contains the old version of the applicationgateway.json file, I just copied it and added it to the project (along with some other files that weren't in the project yet). The second commit then contains the changes!

Okay, I can do that.

@amarzavery
Copy link
Copy Markdown
Contributor

@jobatzil - Yeah, I saw that and updated the comment.

@vishrutshah
Copy link
Copy Markdown
Contributor

vishrutshah commented Feb 7, 2017

"backendIPConfigurations": {
"type": "array",
"items": {
"$ref": "./networkInterface.json#/definitions/NetworkInterfaceIPConfiguration"
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.

which is true. Because there is no networkInterface.json file in the 2016-12-01/swagger folder. It is present in 2016-09-01/swagger folder.

The bigger problem here is:

  • Can we reference the "NetworkInterfaceIPConfiguration" model from a swagger that is having api-version "2016-09-01"?
    • If yes then wouldn't it break the theory that "api-version" is a contract. One should return models that represent the schema as per that api-version
  • If one copies over the "networkInterface.json" file to 2016-12-01 api-version folder then is NRP ready to provision that version of the NetworkInterface API in all the regions in AzureProd ?
    • If NRP is indeed ready with this api-version for networkInterface (i.e. they have already deployed this api-version) then why have they not sent a PR with an updated swagger spec for the new api-version ("2016-12-01").

@jobatzil
Copy link
Copy Markdown
Contributor Author

jobatzil commented Feb 7, 2017

@vishrutshah I've talked to @amarzavery about that and sent an email to Deepak Rajendran.
Not quite sure whether creating a copy of that file in the new Api-Version folder or referencing the file of the old api-version is the way to go here. Or should it be automatically resolved to the most recent version?

"modelAsString": true
}
},
"connectionDraining": {
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 connectionDraining optional/required property?

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.

optional.

},
"ApplicationGatewayConnectionDraining": {
"properties": {
"enabled": {
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 enable required/options?

If optional, what is the default value for enabled?

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.

required. Good to know, thanks!

"type": "boolean",
"description": "Defines if connection draining is enabled or not."
},
"drainTimeoutInSec": {
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.

Please leverage minimum: 1 & maximum: 3600 on drainTimeoutInSec property.

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.

done, good to know, thanks!

],
"consumes": [
"application/json",
"text/json"
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.

WARNING: NonAppJsonTypeWarning - Media types other than 'application/json' has limited support

],
"produces": [
"application/json",
"text/json"
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.

WARNING: NonAppJsonTypeWarning - Media types other than 'application/json' has limited support

"backendIPConfigurations": {
"type": "array",
"items": {
"$ref": "./../../2016-09-01/swagger/networkInterface.json#/definitions/NetworkInterfaceIPConfiguration"
Copy link
Copy Markdown
Contributor

@amarzavery amarzavery Feb 9, 2017

Choose a reason for hiding this comment

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

@jobatzil The referenced model "NetworkInterfaceIPConfiguration" has a property named "properties" of type "NetworkInterfaceIPConfigurationPropertiesFormat", which contains a property named "applicationGatewayBackendAddressPools" that references "./applicationGateway.json#/definitions/ApplicationGatewayBackendAddressPool".

The above reference is to the 2016-09-01 version of applicationgateway.json.

Isn't that weird. Shouldn't it be referencing the 2016-12-01 version of applicationgateway.json (I mean circling back to this file)?

/cc @DeepakRajendranMsft, @johanste, @olydis, @vishrutshah

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.

Hey Amar, yah I know. You should have gotten an email about that.

@amarzavery amarzavery closed this Feb 9, 2017
@amarzavery amarzavery reopened this Feb 9, 2017
@azurecla
Copy link
Copy Markdown

azurecla commented Feb 9, 2017

Hi @jobatzil, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (jobatzil). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@vishrutshah
Copy link
Copy Markdown
Contributor

@jobatzil Could you please resolve the merge conflict when you get a chance. Thanks!

@jobatzil
Copy link
Copy Markdown
Contributor Author

The last 5 commits after the merge be4bf42 are the steps to address the issue of applicationGateway referencing networkInterface which didn't have a 2016-12-01 version yet. The solution (based on some discussions with @amarzavery) is to copy over networkInterface.json to the new version folder as well as all files referenced by it.)

"modelAsString": true
}
},
"connectionDraining": {
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.

Adding connectionDraining in the middle, may mess up the signature of the model constructor in the generated code. Please verify this in the generated code. I would suggest adding this new property in the end.

@amarzavery
Copy link
Copy Markdown
Contributor

amarzavery commented Feb 14, 2017

@DeepakRajendranMsft - Can you please make sure that the files moved to 2016-12-01 api-version are good?
Should the pending files checkDnsAvailability, usage, virtualNetworkGateway, networkWathcer be moved to 2016-12-01 as well?
/cc @irrogozh

@DeepakRajendranMsft
Copy link
Copy Markdown
Contributor

Yes, everything needs to be moved

@amarzavery
Copy link
Copy Markdown
Contributor

@jobatzil - Can you please make sure to move all the swagger files from September api-version to December?

jobatzil and others added 14 commits February 14, 2017 12:56
…ettings to the end to avoid issues with the optionality of the property
…face to point to the 2016-12-01 networkInterface.
@amarzavery amarzavery dismissed vishrutshah’s stale review February 15, 2017 00:50

needs to be merged right now

@amarzavery amarzavery merged commit dcd97d4 into Azure:master Feb 15, 2017
@AutorestCI
Copy link
Copy Markdown

@AutorestCI
Copy link
Copy Markdown

@AutorestCI
Copy link
Copy Markdown

No modification for NodeJS

mccleanp pushed a commit that referenced this pull request Mar 23, 2022
* add api version for targeting ppe and dev endpoint

* spelling

* build fixes

* reverting last change

* updating readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants