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

Support port creation through workspace name #662

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

kishen-v
Copy link
Contributor

Add support to create port by --workspace-name. Added flags to parse --workspace-name for ease of usage.

./pvsadm create port --workspace-name XXX-test-csi-k8s --network c922fe46-4b71-XXXX-XXXX-168e0794419e
Error: unknown flag: --workspace-name

Tests:

Using workspace name

./pvsadm create port --workspace-name XXX-test-csi-k8s --network c922fe46-4b71-XXXX-XXXX-168e0794419e
W0912 14:41:26.223930   55924 root.go:54] IBMCLOUD_API_KEY will be deprecated in future releases. Use IBMCLOUD_APIKEY instead.
I0912 14:41:32.615848   55924 port.go:89] Successfully created a port, id: a4f7a177-eb14-4552-9123-fb61bf7XXXX
I0912 14:41:32.615848   55924 port.go:89] Successfully created a port, id: a4f7a177-eb14-4552-9123-fb61bf70XXXX
+-------------+------------+------+---------------+-------------------+--------------------------------------+-------------+--------+
| DESCRIPTION | EXTERNALIP | HREF |   IPADDRESS   |    MACADDRESS     |                PORTID                | PVMINSTANCE | STATUS |
+-------------+------------+------+---------------+-------------------+--------------------------------------+-------------+--------+
|             |            |      | 192.168.232.3 | fa:16:3e:d4:25:ae | a4f7a177-eb14-4552-9123-fb61bf70XXXX |             | DOWN   |
+-------------+------------+------+---------------+-------------------+--------------------------------------+-------------+--------+

Using workspace ID

./pvsadm create port --workspace-id 45489157-XXXX-XXXX-XXXX-54a2d96b0233 --network c922fe46-XXXX-XXXX-8c1c-168e0794419e
W0912 14:45:46.354622   57573 root.go:54] IBMCLOUD_API_KEY will be deprecated in future releases. Use IBMCLOUD_APIKEY instead.
I0912 14:45:51.514981   57573 port.go:89] Successfully created a port, id: 563472d6-1225-4c9e-b4ce-c45a472cXXXX
+-------------+------------+------+---------------+-------------------+--------------------------------------+-------------+--------+
| DESCRIPTION | EXTERNALIP | HREF |   IPADDRESS   |    MACADDRESS     |                PORTID                | PVMINSTANCE | STATUS |
+-------------+------------+------+---------------+-------------------+--------------------------------------+-------------+--------+
|             |            |      | 192.168.232.4 | fa:16:3e:29:a0:ec | 563472d6-1225-4c9e-b4ce-c45a472XXXX |             | DOWN   |
+-------------+------------+------+---------------+-------------------+--------------------------------------+-------------+--------+

Missing workspace id/name

./pvsadm create port
W0912 14:48:13.027461   58383 root.go:54] IBMCLOUD_API_KEY will be deprecated in future releases. Use IBMCLOUD_APIKEY instead.
Error: --workspace-id or --workspace-name required

@ppc64le-cloud-bot ppc64le-cloud-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 12, 2024
Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

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

/lgtm

@ppc64le-cloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kishen-v, mkumatag

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ppc64le-cloud-bot ppc64le-cloud-bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 12, 2024
@ppc64le-cloud-bot ppc64le-cloud-bot merged commit 602f144 into ppc64le-cloud:main Sep 12, 2024
4 of 5 checks passed
@kishen-v kishen-v deleted the support-ws-name branch September 13, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants