Skip to content

Conversation

@drigodwin
Copy link
Member

Tested on GCE / Centos 7

Iterable<Integer> inboundPorts = (Iterable<Integer>) setup.get(INBOUND_PORTS);
Iterable<Integer> inboundPorts = Ints.asList(template.getOptions().getInboundPorts());

if (inboundPorts == null || Iterables.isEmpty(inboundPorts)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Very minor: we could now get rid of the null check, given Ints.asList() (and template.getOptions().getInboundPorts()) will never return null.

Also, we don't need to convert it to an Iterable<Integer>. We could leave it as a int[], and change the line below to inboundPorts.length == 0. No strong feelings.

But will merge as-is.

@aledsage
Copy link
Contributor

LGTM - merging now.

@asfgit asfgit merged commit 968a69f into apache:master May 31, 2017
asfgit pushed a commit that referenced this pull request May 31, 2017
@drigodwin drigodwin deleted the brooklyn-510 branch May 31, 2017 10:29
@bostko
Copy link
Contributor

bostko commented May 31, 2017

To what it will transform for the blueprint in BROOKLYN-510?
Will the yaml bellow

    inboundPorts:
    - 22
    - 9100-9200

mean 22, 9101, 9202,..., 9200?

@drigodwin
Copy link
Member Author

@bostko, it should open 22, 9100, 9101... 9199, 9200

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.

4 participants