Previously, there was a bug in the exists? method of
the nova_network provider where it could not detect
if a network already existed. This is b/c it
appended an extra /\d\d on the network id.
This commit corrects the logic so that existing
networks can be correctly detected.
Optional commands can be used to specify that a
command may not exist when provider suitability
is determined. This is because it may be installed
during the same run where it needs to be used.
Previously, an empty default provider was created
just to prevent failures when provider suitability
was determined. This also required that the provider
be explicitly overridden when the type is used.
Using optional_commands instead of command reduces
the amount of required code. It allows the default
providers to be removed as well as the explicit
provider attributes.
This changed has been implemented for the following
types:
- nova_manage
- nova_network
- nova_admin
The Nova network create command now needs a label to create a network.
I've created a label parameter in the nova_network type that currently
defaults to novanetwork.
The nova network list command also now fails if no networks exist.
I've wrapped it in a rescue block which returns false is the command
fails which is clearly not the right response but I need this to work
for a demo.