Giter Site home page Giter Site logo

Comments (7)

budgester avatar budgester commented on August 24, 2024

If I specify a flavour ID then I don't get this error.

from knife-rackspace.

martinb3 avatar martinb3 commented on August 24, 2024

I wonder if this is because of fog-rackspace-0.1.2. I'm not sure flavor is optional.

from knife-rackspace.

davidgiesberg avatar davidgiesberg commented on August 24, 2024

What would you expect to happen if you didn't specify flavor?

from knife-rackspace.

budgester avatar budgester commented on August 24, 2024

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

from knife-rackspace.

budgester avatar budgester commented on August 24, 2024

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

from knife-rackspace.

martinb3 avatar martinb3 commented on August 24, 2024

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).

from knife-rackspace.

martinb3 avatar martinb3 commented on August 24, 2024

Hi there -- I've tweaked this to error in a better way. I'll be doing a release shortly. Thank you!

from knife-rackspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.