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 IPSec site connection #810

Merged
merged 9 commits into from
Mar 8, 2018

Conversation

simonre
Copy link
Contributor

@simonre simonre commented Mar 6, 2018

conn, err := CreateSiteConnection(t, client, ikepolicy.ID, ipsecpolicy.ID, service.ID, peerEPGroup.ID, localEPGroup.ID)
if err != nil {
t.Fatalf("Unable to create IPSec Site Connection: %v", err)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The resources here don't get deleted because they can't get deleted without deletion of the IPSec site connection. I will change this in a future PR as soon as it's possible to delete Site connections and endpoint groups

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep - that's the way to go here :)

@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 6, 2018

Build succeeded.

@simonre
Copy link
Contributor Author

simonre commented Mar 6, 2018

@jtopjian This is ready for review

@simonre simonre changed the title [WIP] Vpnaas: Create IPSec site connection Vpnaas: Create IPSec site connection Mar 6, 2018
@coveralls
Copy link

coveralls commented Mar 7, 2018

Coverage Status

Coverage increased (+0.002%) to 73.733% when pulling ff51bd5 on simonre:vpnaas-ipsecsiteconn-create into c3bc092 on gophercloud:master.

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 This is a really nice PR! Especially the acceptance test - it's great to see everything coming together 😄

I've left a few notes inline. Let me know if you have any questions.


// The route mode.
// A valid value is static, which is the default.
RouteMode string `json:"route_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.


// The authentication mode.
// A valid value is psk, which is the default.
AuthenticationMode string `json:"auth_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.

DPD DPD `json:"dpd"`

// AuthenticationMode is the authentication mode.
AuthenticationMode string `json:"auth_mode"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Kind of minor, but let's change this to AuthMode to match the JSON string.

conn, err := CreateSiteConnection(t, client, ikepolicy.ID, ipsecpolicy.ID, service.ID, peerEPGroup.ID, localEPGroup.ID)
if err != nil {
t.Fatalf("Unable to create IPSec Site Connection: %v", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Yep - that's the way to go here :)

// A valid value is response-only or bi-directional. Default is bi-directional.
Initiator Initiator `json:"initiator,omitempty"`

// (Deprecated) Unique list of valid peer private CIDRs in the form < net_address > / < prefix > .
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend removing the (Deprecated) part here unless you can give further information about the deprecation (ie: when will it be removed and what is the recommended alternative).

I don't see any notes in the Python code mentioning deprecation. It's always possible the API doc is out of date and maybe this field is no longer deprecated?

@simonre simonre force-pushed the vpnaas-ipsecsiteconn-create branch from 26e2a5e to ff51bd5 Compare March 7, 2018 15:37
@theopenlab-ci
Copy link

theopenlab-ci bot commented Mar 7, 2018

Build succeeded.

@simonre
Copy link
Contributor Author

simonre commented Mar 7, 2018

@jtopjian This is ready for review again

@jtopjian
Copy link
Contributor

jtopjian commented Mar 8, 2018

LGTM! Nice work on this :)

@jtopjian jtopjian merged commit 24d38e2 into gophercloud:master Mar 8, 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