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

add-public-ip-address sends PortTo even when not specified #98

Open
paulzerkel opened this issue May 25, 2017 · 2 comments
Open

add-public-ip-address sends PortTo even when not specified #98

paulzerkel opened this issue May 25, 2017 · 2 comments

Comments

@paulzerkel
Copy link

When adding a public IP to a server like so:
clc server add-public-ip-address --server-id test --internal-ip-address 10.1.1.1 --ports port=9000,protocol=tcp

the data being POSTed to the API includes the PortTo field even though it was not specified. This results in an invalid port range being sent. The PortTo field should have the tag `json:",omitempty"` added so that it isn't included in the serialized payload.

@richardcase
Copy link
Contributor

I'll have a look and make the change.

@richardcase richardcase self-assigned this May 26, 2017
@richardcase
Copy link
Contributor

Thanks @paulzerkel. Does this actually cause you an issue?

When i use the latest version and use the command line arguments you included it correctly only opens a single port and not a port range:
publicip

The request being sent:
{"InternalIpAddress":"10.146.9.22","Ports":[{"Protocol":"tcp","Port":9000,"PortTo":0}]}

@richardcase richardcase removed their assignment Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants