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

Vpnaas: Create IKE policy #785

Merged
merged 8 commits into from
Feb 27, 2018

Conversation

simonre
Copy link
Contributor

@simonre simonre commented Feb 21, 2018

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 21, 2018

Build succeeded.

@coveralls
Copy link

coveralls commented Feb 21, 2018

Coverage Status

Coverage increased (+0.003%) to 73.549% when pulling 5476bd1 on simonre:vpnaas-ikepolicy-create into 47e78c6 on gophercloud:master.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 21, 2018

Build succeeded.

@simonre simonre changed the title [WIP] Vpnaas: Create IKE policy Vpnaas: Create IKE policy Feb 21, 2018
@simonre
Copy link
Contributor Author

simonre commented Feb 21, 2018

@jtopjian This is ready for review

Copy link
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

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

@simonre The usual rebase stuff. It might make sense to maybe hold off on so many pending PRs to cut down on the amount of rebasing? Up to you, though :)

I've left some comments inline, mostly about some fields which I don't think are valid for IKE policies - but let me know if I'm wrong.

// EncapsulationMode is the encapsulation mode.
// A valid value is tunnel or transport.
// Default is tunnel.
EncapsulationMode EncapsulationMode `json:"encapsulation_mode,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like this is a valid field for IKE?

"github.com/gophercloud/gophercloud/acceptance/tools"
)

func TestPolicyCRUD(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned in the IPSec PR, this test name clashes so we'll want to change it.

// TransformProtocol is the transform protocol.
// A valid value is ESP, AH, or AH- ESP.
// Default is ESP.
TransformProtocol TransformProtocol `json:"transform_protocol,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like this is a valid field, either?

Phase1NegotiationMode string `json:"phase1_negotiation_mode"`

// IkeVersion is the IKE version.
IkeVersion string `json:"ike_version"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rename this to IKEVersion.

@simonre
Copy link
Contributor Author

simonre commented Feb 23, 2018

Sorry about the invalid fields, that was a result of some sloppy copy/pasting of the fields from the IPSecPolicy Create function

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 23, 2018

Build succeeded.

@simonre
Copy link
Contributor Author

simonre commented Feb 23, 2018

@jtopjian I've rebased this and addressed your comments. I think this is ready for re-review

Copy link
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

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

@simonre One small nit. Otherwise really nice work.

I also wanted to confirm if ProjectID should also be included anywhere here, per discussion in the other PR.

@@ -63,6 +64,30 @@ func CreateIPSecPolicy(t *testing.T, client *gophercloud.ServiceClient) (*ipsecp
}

t.Logf("Successfully created IPSec policy %s", policyName)
t.Logf("Successfully created IKE policy %s", policyName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Really minor nit, but looks like this line should be removed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 26, 2018

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

@simonre
Copy link
Contributor Author

simonre commented Feb 26, 2018

@jtopjian The projectID field is returned by my working environment. I added it to the result and changed the unit tests.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 26, 2018

Build succeeded.

@jtopjian
Copy link
Contributor

@simonre Thank you for checking into that!

This looks good. Nice work on this. Thank you again for all of your patience and work on this suite.

@jtopjian jtopjian merged commit eedbafa into gophercloud:master Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants