Closed budgester closed 7 years ago
If I specify a flavour ID then I don't get this error.
I wonder if this is because of fog-rackspace-0.1.2
. I'm not sure flavor is optional.
What would you expect to happen if you didn't specify flavor?
It should either give me a message saying "you have not specified a flavour" or chose a default flavour maybe. In a similar way that aws will choose a micro instance if nothing is specified.
So that if I run "knife rackspace server create" and I have my environment variables for the account for the account set up, I will get a box, it might not be the right one, but I can then overide it with switches.
At the very worst case it should print out the help options rather than fail with a ruby error, or the docs/README should specify that the flavour is a required rather than optional
Looking at the code rackspace_server_create.rb it already looks like a default flavour is set.
option :flavor,
:short => "-f FLAVOR",
:long => "--flavor FLAVOR",
:description => "The flavor of server; default is 2 (512 MB)",
:proc => Proc.new { |f| Chef::Config[:knife][:flavor] = f.to_s },
:default => 2
I think different flavors are going to be available in different regions and different accounts. We probably simply need to make the default "2"
to fix the gsub
error, though. That would at least return something more helpful if the API doesn't like the flavor (vs. a ruby error).
Hi there -- I've tweaked this to error in a better way. I'll be doing a release shortly. Thank you!