Skip to content

Arm-Network swagger: added support for IPSec parameters for connection#956

Merged
olydis merged 16 commits into
Azure:masterfrom
henry416:master
Mar 18, 2017
Merged

Arm-Network swagger: added support for IPSec parameters for connection#956
olydis merged 16 commits into
Azure:masterfrom
henry416:master

Conversation

@henry416
Copy link
Copy Markdown
Member

@henry416 henry416 commented Feb 22, 2017

  • VirtualNetworkGatewayConnection resource changes:
  • UseNarrowTrafficSelectors option for connections
  • IpsecPolicies list for connections
  • IpsecPolicy subresource containing enums defining individual IPSec
    parameters

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

  • I have read the contribution guidelines.
  • My spec meets the review criteria:
    • The spec conforms to the Swagger 2.0 specification.
    • Validation errors from the Linter extension for VS Code have all been fixed for this spec. (Note: for large, previously checked in specs, there will likely be many errors shown. Please contact our team so we can set a timeframe for fixing these errors if your PR is not going to address them).
    • The spec follows the patterns described in the Swagger good patterns document unless the service API makes this impossible.

@azurecla
Copy link
Copy Markdown

Hi @henry416, 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 (henche). 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;

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Feb 23, 2017

@henry416 There are references to ./network.json in this Swagger file, which does not exist. @amarzavery what is the current story regarding this, I got a little disconnected regarding the final decision and implications: Move everything over to the new version/folder?

@henry416
Copy link
Copy Markdown
Member Author

henry416 commented Feb 23, 2017

@olydis I was under the impression that api changes were partial - I have moved everything applicable over into the new folder.

@henry416
Copy link
Copy Markdown
Member Author

@olydis Is there any issues remaining with this PR?

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Feb 27, 2017

@henry416 Will review shortly!

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.

make sure that the version property in every swagger matches the api-version in file path.

@amarzavery
Copy link
Copy Markdown
Contributor

@henry416 - This file also needs to be updated https://github.com/Azure/azure-rest-api-specs/blob/master/arm-network/compositeNetworkClient.json.

Btw, why did you blindly move everything to 2017-03-01 api-version? Shouldn't you move only those parts that are on the new api-verison?
@DeepakRajendranMsft - please take a look into this.

@henry416
Copy link
Copy Markdown
Member Author

henry416 commented Mar 1, 2017

@amarzavery My changes are in NRP 2017-03-01. Since this is a new api version, I moved everything applicable into the new directory in order for the check to pass. Am I mistaken in doing so? What is the procedure for new api versions? I really only change the VirtualNetworkGatewayConnection model.

@amarzavery
Copy link
Copy Markdown
Contributor

talk to @DeepakRajendranMsft from the Networking team.

@henry416
Copy link
Copy Markdown
Member Author

henry416 commented Mar 2, 2017

@DeepakRajendranMsft any input on this?

@henry416
Copy link
Copy Markdown
Member Author

henry416 commented Mar 6, 2017

I put changes into the current version instead

@henry416
Copy link
Copy Markdown
Member Author

henry416 commented Mar 6, 2017

@amarzavery Can you review the changes while I get the versioning sorted out? The diff will make it easier to see what I have changed.

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 would like to callout few things:

  1. These changes are applied to an api-version for which I believe an SDK has already been published. This will call breaking changes in the sdk
  2. The new properties that you have added are in PascalCase. All the other properties are in camelCase. Please double check what is present on the wire using Fiddler. Looking at the server side code in C# will not help.

@DeepakRajendranMsft - Please take a look.

Copy link
Copy Markdown
Member Author

@henry416 henry416 Mar 6, 2017

Choose a reason for hiding this comment

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

@amarzavery I'm actually putting the changes in 2016-12-01 so that it's easier for you to see which parts are being changed through diff. I have discussed with @DeepakRajendranMsft already about how to move to new api-version - I will move all the changes to a new api version once everything is clear.

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.

missing description

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

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 Security Association payload size in KB for a site to site VPN tunnel.

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.

All the properties are in PascalCase. On the wire everything should be in camelCase as per the convention. JSON object is like a case sensitive dictionary.
"SALifeTimeSeconds" --> "s ALifeTimeSeconds"

Copy link
Copy Markdown
Member Author

@henry416 henry416 Mar 6, 2017

Choose a reason for hiding this comment

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

Okay noted. Although a heads up, it seems that there are some schemas that seem to break this convention (see processor architecture under vpnclientparameters).

@henry416
Copy link
Copy Markdown
Member Author

henry416 commented Mar 7, 2017

@amarzavery Changes have been made according to your feedback. Let me know if it is good and I will put it in the appropriate api version.

@henry416
Copy link
Copy Markdown
Member Author

henry416 commented Mar 8, 2017

@amarzavery @olydis Please review the changes made according to feedback.

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 9, 2017

on it

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 don't specify the enum values in the description. Some generators will even auto-gen such description and append it (if appropriate), so this is over-specification. Same applies to other enums below.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@olydis I have changed the descriptions to match. Comment to let me know if that is all and I will move the changes into the new api version.

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.

what's the deal with these two names?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The names in NRP are SALifeTimeSeconds

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.

note that the properties in here have to be called precisely as provided/expected on the wire by your service! if your service sends/expects SALifeTimeSeconds, name it that way :-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If that is the case, then the entire network api is named incorrectly. The network service uses upper camel case. But I have done testing with the rest specs and the existing jsons do work with our service.

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.

@amarzavery this smells like a problem - shouldn't the Swagger match precisely the wire? This will blow up as soon as they provide examples, correct? @henry416 have you tested all generated programming languages/SDKs?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@olydis I can run the tests for the entire network group, but that will take some time to do.
@DeepakRajendranMsft Do you know why this is the case?

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.

If that is the case, then the entire network api is named incorrectly. The network service uses upper camel case. But I have done testing with the rest specs and the existing jsons do work with our service.

@henry416 - Please do not take a look at the C# code on the service side. That is what confuses new people all the time. Please open Fiddler and see the actual stuff on the wire and you will find that NRP is sending properties of the request body or the response body in camelCase.

Copy link
Copy Markdown
Contributor

@olydis olydis Mar 14, 2017

Choose a reason for hiding this comment

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

If that is the case, then the entire network api is named incorrectly.

Just synced with the team. If this is true, this is a HUGE ISSUE. Note that we have tons of things depending on those Swagger definitions, and you are basically saying they are wrong. Swaggers must be accurate all the way down. What have you tested for? Someone may write their own client to your service, look at the Swagger, go JSON.parse(rawBody)["someProp"] but whooops, too bad, your service returned { "SomeProp": 42 }.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@olydis Ok thanks, I checked the actual responses. False alarm.
@amarzavery Is there any reason why NRP differentiates the actual request properties from the server model?

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 10, 2017

I will put it in the appropriate api version.

@henry416 You mean you will handle it as a breaking change? If yes, good. :-)

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 10, 2017

      "format": "in64",

BUG! #Resolved


Refers to: arm-network/2016-12-01/swagger/virtualNetworkGateway.json:1274 in 67325a1. [](commit_id = 67325a13ff3b2d9211225fbb33c61c15ac467974, deletion_comment = False)

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 10, 2017

  "properties": {

please add a description #Resolved


Refers to: arm-network/2016-12-01/swagger/virtualNetworkGateway.json:1204 in 67325a1. [](commit_id = 67325a13ff3b2d9211225fbb33c61c15ac467974, deletion_comment = False)

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 10, 2017

  "properties": {

add a description #Resolved


Refers to: arm-network/2016-12-01/swagger/virtualNetworkGateway.json:1222 in 67325a1. [](commit_id = 67325a13ff3b2d9211225fbb33c61c15ac467974, deletion_comment = False)

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 10, 2017

  "properties": {

description missing


Refers to: arm-network/2016-12-01/swagger/virtualNetworkGateway.json:1281 in 67325a1. [](commit_id = 67325a13ff3b2d9211225fbb33c61c15ac467974, deletion_comment = False)

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 10, 2017

"ConnectionResetSharedKey": {

description missing


Refers to: arm-network/2016-12-01/swagger/virtualNetworkGateway.json:1588 in 67325a1. [](commit_id = 67325a13ff3b2d9211225fbb33c61c15ac467974, deletion_comment = False)

@henry416
Copy link
Copy Markdown
Member Author

@olydis Can I create the new api version now?

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 14, 2017

See #956 (comment)

We will not accept inaccurate Swaggers. While services should absolutely adhere to the casing guidelines (i.e. no pascal case), but if they don't, do not create an inaccurate Swagger.

Copy link
Copy Markdown
Contributor

@olydis olydis left a comment

Choose a reason for hiding this comment

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

Swagger apparently inaccurate

@henry416
Copy link
Copy Markdown
Member Author

@olydis I have tested changes with camelcase and confirmed. Please let me know if that is all that is required. If so, I will move all network swagger to a new API version (2017-03-01) and revert the 2016 version to its original state.

@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 15, 2017

@henry416 Okay, so the Swagger's properties are now spelled precisely as sent/expected by the service? Alright then :-)

@henry416
Copy link
Copy Markdown
Member Author

@olydis @DeepakRajendranMsft I have created the new api version (2017-03-01) and moved all of the IPsec changes into it. Please verify.

@cormacpayne
Copy link
Copy Markdown
Member

Spec used to generate Azure/azure-sdk-for-net#2943

@olydis olydis removed the In-Review label Mar 17, 2017
@olydis
Copy link
Copy Markdown
Contributor

olydis commented Mar 17, 2017

If @DeepakRajendranMsft is okay with this I will merge. 👍

@DeepakRajendranMsft
Copy link
Copy Markdown
Contributor

DeepakRajendranMsft commented Mar 17, 2017 via email

@henry416
Copy link
Copy Markdown
Member Author

@DeepakRajendranMsft Hi Deepak, what is the status on this PR?

@henry416
Copy link
Copy Markdown
Member Author

@DeepakRajendranMsft Hi, can I get a sign off on this so that I can proceed on the powershell pipeline?

@DeepakRajendranMsft
Copy link
Copy Markdown
Contributor

DeepakRajendranMsft commented Mar 17, 2017 via email

@DeepakRajendranMsft
Copy link
Copy Markdown
Contributor

@henry416 @olydis i have signed off

@olydis olydis merged commit d5d33d9 into Azure:master Mar 18, 2017
@AutorestCI
Copy link
Copy Markdown

No modification for NodeJS

@AutorestCI
Copy link
Copy Markdown

@AutorestCI
Copy link
Copy Markdown

@AutorestCI
Copy link
Copy Markdown

No modification for Ruby

@AutorestCI
Copy link
Copy Markdown

No modification for NodeJS

@AutorestCI
Copy link
Copy Markdown

No modification for Python

mccleanp pushed a commit that referenced this pull request Mar 23, 2022
…iew-update

Update/add parameters for WindowsESU MAK key RP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants