The exception message, when shade fails, will contain much more
specific information about the failure if the exception is treated
as a string. The 'message' attribute alone is usually not helpful.
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.
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.
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.
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.