-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: Added support for Metal Interconnections #321
Conversation
0be70a3
to
106af82
Compare
106af82
to
97fa581
Compare
97fa581
to
d4076e4
Compare
d4076e4
to
a1815cc
Compare
If I run this at all I get 404s:
|
|
||
createInterconnectionsCmd.Flags().StringVarP(&name, "name", "n", "", "Name of the interconnection") | ||
createInterconnectionsCmd.Flags().StringVarP(&metro, "metro", "m", "", "metro in the interconnection") | ||
createInterconnectionsCmd.Flags().StringVarP(&redundancy, "redundancy", "r", "", "Website URL of the organization.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options for -r should be like single or redundant, not a website URL.
I believe we're missing some stuff here, if you make a shared connection (VlanFabricVcCreateInput or VrfFabricVcCreateInput) you need to supply a "service_token_type" which I don't see referenced anywhere in this PR. Here's the spec page I'm looking at: |
we are supporting dedicated port input as of now type: "dedicated" |
inc := []string{} | ||
exc := []string{} | ||
if projectID != "" { | ||
interConnections, proErr = pager.GetAllProjectInterconnections(c.Service, projectID, inc, exc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a new flag in this file that lets people pass in another projectID if they don't want to only check their default project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metal conn create -n "test-conn" -m da -r "primary"|"redundant" -t "dedicated"|"shared" -O <ORG_ID> -p <project_ID>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like it'd be right.
a1815cc
to
1a9896d
Compare
Gotcha, so just -t "dedicated" for now. |
1a9896d
to
378fcc0
Compare
378fcc0
to
4b2843c
Compare
4b2843c
to
6cc19c7
Compare
@@ -0,0 +1,91 @@ | |||
// Copyright © 2023 Jasmin Gacic <[email protected]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this license text at the top of every file
return fmt.Errorf("could not list Project Interconnections: %w", proerr) | ||
} | ||
} else if organizationID != "" { | ||
interConnectionsList, _, err := c.Service.OrganizationListInterconnections(context.Background(), organizationID).Include(inc).Exclude(exc).Execute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pagination is being handled for project interconnections now, but it looks like there is also pagination data available for OrganizationListInterconnections
6cc19c7
to
7c1d647
Compare
7c1d647
to
c2fba89
Compare
Delete
|
c2fba89
to
ea5ec2a
Compare
ea5ec2a
to
0aea2ae
Compare
|
0aea2ae
to
c69a457
Compare
|
c69a457
to
9aae29d
Compare
9aae29d
to
a181169
Compare
a181169
to
039a711
Compare
039a711
to
c4dc1dc
Compare
Test results:
|
c4dc1dc
to
74a5014
Compare
RunE: func(cmd *cobra.Command, args []string) error { | ||
cmd.SilenceUsage = true | ||
|
||
_, _, err := c.Service.DeleteInterconnection(context.Background(), connectionID).Execute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete should require --force
or an interactive prompt.
I'll open this as a new issue to keep this feature unblocked as-is.
Description:
What this PR does / why we need it:
Added support for metal interconnections
What issues has this PR fixed?
#307