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

update add cabinet flags for vlan and cabinet number #53

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

jacobsalmela
Copy link
Collaborator

@jacobsalmela jacobsalmela commented Jun 6, 2023

Summary and Scope

Adds add cabinet flags that conform to our upcoming plans

% go run main.go alpha add cabinet hpe-ex2000 --auto                                                                                                                                                                       13:34
1:35PM INF Automatically assigning cabinet number and VLAN ID
1:35PM INF Suggested VLAN ID: -1
1:35PM INF Suggested cabinet number: 1001
✗ Would you like to accept the recommendations and add the Cabinet: 
1:35PM WRN Cabinet hpe-ex2000 was NOT added to the inventory                                                                                                                                                                                      ~/git/csminv
% go run main.go alpha add cabinet hpe-ex2000 --auto                                                                                                                                                                       13:35
1:35PM INF Automatically assigning cabinet number and VLAN ID
1:35PM INF Suggested VLAN ID: -1
1:35PM INF Suggested cabinet number: 1001
Would you like to accept the recommendations and add the Cabinet: y
1:35PM INF Added cabinet hpe-ex2000
1:35PM INF UUID: 204e297d-a51f-4863-b2a5-85b84c771cc5
1:35PM INF Cabinet Number: 1001
1:35PM INF VLAN ID: -1                                                                                                                                                                                               ~/git/csminv
% go run main.go alpha add cabinet hpe-ex2000 --vlan-id 1                                                                                                                                                                  13:35
Error: if any flags in the group [cabinet vlan-id] are set they must all be set; missing [cabinet]
exit status 1                                                                                                                                                                                                   ~/git/csminv
% go run main.go alpha add cabinet hpe-ex2000 --cabinet 1                                                                                                                                                                  13:35
Error: if any flags in the group [cabinet vlan-id] are set they must all be set; missing [vlan-id]
exit status 1                                                                                                                                                                                          ~/git/csminv
% go run main.go alpha add cabinet hpe-ex2000 --cabinet 1 --vlan-id 4                                                                                                                                                      13:35
1:35PM INF Added cabinet hpe-ex2000
1:35PM INF UUID: 7ad129c1-cca6-492a-bb00-86e13bbdf59f
1:35PM INF Cabinet Number: 1
1:35PM INF VLAN ID: 4

Risks and Mitigations

Low.

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
@jacobsalmela jacobsalmela merged commit ddffe42 into develop Jun 7, 2023
@jacobsalmela jacobsalmela deleted the topical-the-wasp branch June 7, 2023 14:05
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.

2 participants