Code Monkey home page Code Monkey logo

brightbox-cli's People

Contributors

caius avatar dependabot[bot] avatar gnufied avatar gregkare avatar jeremyjarvis avatar johnl avatar neilw avatar scsmith avatar skx avatar timcraft avatar tokengeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brightbox-cli's Issues

Server.ready? from a server object does not return the real state of the server

Using Brightbox Fog provider.

When I want to retrieve the state of the server I need to use:

c.servers.get(server.id).ready?

instead of :

server_instance.ready?

Otherwise, the server instance always returns false when asking for it's state, after creating a new server.

Not sure if that's intended behavior though.

Get rid of net-ssh dependency

Chef 14 was released and depends on net-ssh ~> 4.2: https://rubygems.org/gems/chef

It looks like brightbox-cli still used net-ssh < 3.0 to support Ruby 1.9.3: #73

However it looks like nothing is using net-ssh in the current code. Am I missing something?

Edit: I just removed the dependency locally and used it in my Gemfile, everything appears to work and tests still all pass. I'll push a PR

`brightbox images list --account xxx` filter fails

$ brightbox images list -l $my_account has a paging problem due to local filtering.

$ brightbox --version
brightbox version 2.8.1

$ brightbox images list -l $my_account doesn't seem to show any images - but $ brightbox images list -l $my_account --show-all correctly shows them.

if we run $ brightbox images list the results are all brightbox images. So, I assume without --show-all, the API is paging the results and the first page are all BB owned images.

JRuby Error

When trying to communicate with Brightbox (via brightbox-images list and brightbox-users update, for example), then I see this error:

"ERROR: Unable to verify certificate, please set Excon.defaults[:ssl_ca_path] = path_to_certs, Excon.defaults[:ssl_ca_file] = path_to_file, or Excon.defaults[:ssl_verify_peer] = false (less secure)."

This may be related to the excon gem: excon/excon#106, although I tried to downgrade to jruby-openssl 0.7.4 and it didn't fix the problem.

The command works properly on 1.9.3-p194.

ERROR: undefined method `[]' for nil:NilClass

Hi,

Just created a new account and trying configure the CLI with the credentials for the API client and I am getting this error,

$ brightbox-config client_add cli-6xxx9 mysecret
ERROR: undefined method []' for nil:NilClass`

I am usung ruby 1.9.2p290 with rvm and brightbox-cli (0.17.0)

Any help would be highly appreciated.

Many thanks,

Raj

InvalidOption with old-style command names and options

$ brightbox-servers -k -c john-staging create -n "disk test" img-4uj1w

/var/lib/gems/1.9.1/gems/brightbox-cli-0.19.0.rc2/lib/brightbox-cli/legacy/args_adjuster.rb:27:in `for_command': invalid option: -n (OptionParser::InvalidOption)
    from /var/lib/gems/1.9.1/gems/brightbox-cli-0.19.0.rc2/bin/brightbox-servers:13:in `'
    from /usr/local/bin/brightbox-servers:23:in `load'
    from /usr/local/bin/brightbox-servers:23:in `'
$ brightbox -k -c john-staging servers create -n "disk test" img-4uj1w
INFO: client_id: john-staging ()
Creating a nano (typ-4nr9x) server with image ubuntu-precise-12.04-i386-server (img-4uj1w)

 id         status    type  zone    created_on  image_id   cloud_ip_ids  name     
-----------------------------------------------------------------------------------
 srv-iu13b  creating  nano  gb1s-b  2013-07-31  img-4uj1w                disk test
-----------------------------------------------------------------------------------

Option to list just my images

Currently brightbox-images list defaults to outputting all the official images, and those belonging to my account. I can pass the -a flag to see all public images, but there's no flag to filter it to either just the official images, or just my private images.

Personally I'm not too bothered about listing the official images on their own, but reducing the visual noise when I'm searching the list for my own images is quite nice. Currently I'm having to pipe it through grep to exclude all the official lines.

I'd like to see something like brightbox-images list --mine or brightbox-images list --private available to filter it to just my images.

CLI doesn't behave well when HOME is unset

In docker containers often HOME ends up unset (Jenkins seems to do this a lot).

Currently the cli then tries to access the root directory (/.brightbox) and gets upset. It probably should try to read the current working directory instead.

ignore commas in identifiers

when pasting from other programs, it's easy to get a comma caught up in the list of identifiers. It'd e easy for us to ignore them:

brightbox-groups list grp-aaaaa, grp-bbbbb grp-ccccc

perhaps even split and flatten, to allow:

brightbox-groups list grp-aaaaa,grp-bbbb

just need to be careful to only do it where identifiers are expected!

option ordering on config help is wrong

Synopsis is:

SYNOPSIS
brightbox [global options] config [client_list]
brightbox [global options] config [-a arg|--alias arg] [-t arg|--auth-url arg] client_add client-id secret [api_url, auth_url]
brightbox [global options] config client_default alias
brightbox [global options] config client_remove alias
brightbox [global options] config [-a arg|--alias arg] [-p arg|--password arg] user_add email client-id secret [api_url auth_url]

However putting the -a in that order gives:

ERROR: Unknown option -a

The -a and the other options have to be after the client_add or user_add.

1.9.3 dependency problem

Hello,

Looks like one of the brightbox-cli dependencies relies on a higher version of ruby:

steven@steventop:~$ sudo gem install --no-ri --no-rdoc brightbox-cli
Fetching: builder-3.2.2.gem (100%)
Fetching: excon-0.45.4.gem (100%)
Fetching: formatador-0.2.5.gem (100%)
Fetching: mime-types-data-3.2015.1120.gem (100%)
ERROR:  Error installing brightbox-cli:
    mime-types-data requires Ruby version >= 2.0.
steven@steventop:~$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

I'm using ubuntu 14.04. It's got a ruby2.0 package so I've rbenv switched to 2.0 for the moment.

brighbox-cli-v1.2.0 does not work on Ruby 1.8.7

Problem with Fog::JSON under 1.8.7.

$ chruby 2.1.1
$ ruby --version
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
$ which brightbox
/Users/paul/.gem/ruby/2.1.1/bin/brightbox
$ brightbox servers
INFO: client_id: cli-vodcf (brightbox)

$ chruby 1.8.7
$ ruby --version
ruby 1.8.7 (2013-06-27 patchlevel 374) [i686-darwin13.0.0]
$ which brightbox
/Users/paul/.gem/ruby/1.8.7/bin/brightbox
$ brightbox servers
INFO: client_id: cli-vodcf (brightbox)
ERROR: uninitialized constant Fog::JSON

Showing a group outputs server json, not identifier

Getting some JSON output when I show a group, it lists all the information for a server rather than just a list of server identifiers. Happens in 0.17.1 and 0.17.0, but outputs as I expect in 0.16.0. Haven't tested lower than that.

$ DEBUG=1 bb-groups version
INFO: client_id: ea ()
Brightbox CLI version: 0.17.1

$ DEBUG=1 bb-groups show grp-6xvmw
INFO: client_id: ea ()
             id: grp-6xvmw
           name: chef-server
        servers: {"id"=>"srv-qqkij", "resource_type"=>"server", "url"=>"https://api.gb1.brightbox.com/1.0/servers/srv-qqkij", "name"=>"utility", "created_at"=>"2012-01-16T17:17:31Z", "deleted_at"=>nil, "hostname"=>"srv-qqkij", "started_at"=>"2012-01-18T16:13:40Z", "status"=>"active"}
firewall_policy: fwp-i7z9s
    description: 
$ DEBUG=1 bb-groups version       
INFO: client_id: ea
Brightbox CLI version: 0.16.0

$ DEBUG=1 bb-groups show grp-6xvmw        
INFO: client_id: ea
             id: grp-6xvmw
           name: chef-server
        servers: srv-qqkij
firewall_policy: fwp-i7z9s
    description: 

Short description missing for lots of sub-commands

Just running 'brightbox' throws up a help with a lot of missing short descriptions:

COMMANDS
account-access - Lists accounts you can access (when using user credentials)
accounts -
cloudips -
collaborators - Lists collaborations scoped to an account
config - Manages local configuration settings and credentials
firewall-policies -
firewall-rules -
groups -
help - Shows a list of commands or help for one command
images -
lbs -
servers -
types - Lists the type of templates available for servers
users -
zones - Lists the zones available to an account or see more details

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.