CloudStack-extras/knife-cloudstack — pull request #51 by marbe (2013-04-09 15:03:54+00:00)
Title: Fixed "Unsupported bootstrap protocol" when specifying --no-bootstrap and added --ipfwd-rules option

Calling knife cs server create with --no-bootstrap causes 'Unsupported bootstrap protocol" error

The reason is that @bootstrap_protocol is not defined when specifying--no-bootstrap

Fix consists in checking config[:bootstrap] value before adding port forwarding rule for OS dependent bootstrap protocol.

In this way, a VM created with --no-bootstrap option has no portForwardingRule unless explicitly defined with --port-rules. Updated README also.

To correctly manage VM created with --static-nat and --no-bootstrap options also, I have added also --ipfwd-rules option. (Ref. http://cloudstack.apache.org/docs/api/apidocs-4.0.0/root_admin/createIpForwardingRule.html)

--ipfwd-rules PORT_RULES Comma separated list of ip forwarding rules, e.g. '1024:10000:TCP,1024:2048,22'