Commit graph

17 commits

Author SHA1 Message Date
Monty Taylor
dd9c292861 Update docstring to show port ranges as optional 2015-07-06 18:53:31 -04:00
David Shrewsbury
6933407cd4 Correct port matching logic
Port matching logic did not take into account recent shade change
to equate (None, None) to (1, 65535) when Nova is the backend.

Also, this encapsulates the port matching logic into a single function
and heavily documents the logic.
2015-07-06 18:50:03 -04:00
David Shrewsbury
8664c88417 Change required parameters for rules module
The ports and protocol are no longer required (and now depends on
a new version of shade).
2015-07-06 18:50:03 -04:00
Monty Taylor
9f03302b68 Use int in the parameter list instead of casting 2015-07-06 18:50:03 -04:00
dagnello
2e8daa2330 Resolving issues in rule comparison algorithm
Port range min/max values are at times represented as string and
compared to int equivalents.  This fix explicitly ensures all
port range values are ints for proper comparisons.
2015-07-06 18:50:03 -04:00
David Shrewsbury
f027e75976 Compare ports as strings
Ports as returned from shade are ints. They are strings as they come
in to the module.
2015-07-06 18:50:03 -04:00
David Shrewsbury
9d0c8b0507 Fix syntax error 2015-07-06 18:50:03 -04:00
Monty Taylor
0e5942d7e7 Return rule object 2015-07-06 18:50:03 -04:00
David Shrewsbury
16b3b72294 Update secgroup rules module for latest shade
This allows the rules module to work against either nova or neutron
for handling security groups. New parameters for 'direction' and
'ethertype' are added.

Check mode is supported with this version.
2015-07-06 18:50:03 -04:00
David Shrewsbury
5b6c6cac20 Recongnize None and -1 port equivalency
shade 0.7.0 represents disabled min/max ports as None (in the
neutron style) rather than -1. Recognize this as the same as -1.
2015-07-06 18:50:03 -04:00
David Shrewsbury
5758b4ebdc Fix id value reference 2015-07-06 18:50:03 -04:00
David Shrewsbury
8f2e70a1c1 Update rules mode for latest shade
Shade 0.7.0 normalized the security group data that is returned,
when using nova, to look more like neutron security group data.
This adjusts for that change.
2015-07-06 18:50:03 -04:00
dagnello
b98e6663e8 Minor fixes for os_security_group_rule module
Was not able to use this module as it was.  The changes submitted
resolved the issues I ran into in order to get it working.
2015-07-06 18:50:03 -04:00
dagnello
d35df1f217 Minor fixes for os_security_group_rule module
Was not able to use this module as it was.  The changes submitted
resolved the issues I ran into in order to get it working.
2015-07-06 18:50:02 -04:00
Davide Guerri
a9301ba918 Fix invalid syntax in openstack_module_kwargs call 2015-07-06 18:50:02 -04:00
Monty Taylor
08b4bb42c4 Fix example code syntax 2015-07-06 18:50:02 -04:00
Monty Taylor
08b2f31915 Add OpenStack Security Group Rule module 2015-07-06 18:50:02 -04:00