Skip to content

Commit

Permalink
update random function generator
Browse files Browse the repository at this point in the history
Signed-off-by: Ayush Rangwala <[email protected]>
  • Loading branch information
aayushrangwala committed Dec 19, 2023
1 parent 60a600a commit 8453157
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
18 changes: 10 additions & 8 deletions docs/metal_interconnections_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ metal interconnections create -n <name> [-m <metro>] [-r <redundancy> ] [-t <typ
### Options

```
-h, --help help for create
-m, --metro string metro in the interconnection
-n, --name string Name of the interconnection
-O, --organizationID string Org ID
-p, --projectID string project ID
-r, --redundancy string Website URL of the organization.
-t, --type string type of of interconnection.
-v, --vrfs strings Return only the specified vrfs.
-h, --help help for create
-m, --metro string metro in the interconnection
-n, --name string Name of the interconnection
-O, --organizationID string Org ID
-p, --projectID string project ID
-r, --redundancy string Website URL of the organization.
--service-token-type string Type of service token for shared connection. Enum: 'a_side', 'z_side'
-t, --type string type of of interconnection.
--vlans int32Slice Array of int vLANs (default [])
--vrfs strings Array of strings VRF <uuid>.
```

### Options inherited from parent commands
Expand Down
13 changes: 2 additions & 11 deletions internal/interconnections/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ func (c *Client) Create() *cobra.Command {
metal.VlanFabricVcCreateInputType(connType),
)
in.Vlans = vlans

createOrganizationInterconnectionRequest.
VlanFabricVcCreateInput = in
case vrfsFabricVcCreate(vrfs):
Expand Down Expand Up @@ -95,19 +94,11 @@ func (c *Client) Create() *cobra.Command {
}

func vlanFabricVcCreate(vlans []int32) bool {
if vlans != nil && len(vlans) > 0 {
return true
}

return false
return len(vlans) > 0
}

func vrfsFabricVcCreate(vrfs []string) bool {
if vrfs != nil && len(vrfs) > 0 {
return true
}

return false
return len(vrfs) > 0
}

func (c *Client) handleCreate(projectID, organizationID string,
Expand Down

0 comments on commit 8453157

Please sign in to comment.