Permalink
Browse files

Note that this is an unofficial binding.

  • Loading branch information...
1 parent d28fc30 commit ce9035a70f599ebac7457c4b442e6716b09c58f7 H. Wade Minter committed Feb 9, 2010
Showing with 39 additions and 26 deletions.
  1. +0 −2 COPYING
  2. +9 −10 README.rdoc
  3. +5 −5 Rakefile
  4. +11 −4 TODO
  5. +1 −1 VERSION
  6. +10 −2 cloudservers.gemspec
  7. +3 −2 lib/cloudservers/connection.rb
View
@@ -1,7 +1,5 @@
Unless otherwise noted, all files are released under the MIT license, exceptions contain licensing information in them.
- Copyright (C) 2009 Rackspace US, Inc.
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
View
@@ -1,22 +1,22 @@
-= Rackspace Cloud Servers
+= Rackspace Cloud Servers (unofficial)
== Description
-This is a Ruby interface into the Rackspace[http://rackspacecloud.com/] {Cloud Servers}[http://www.rackspacecloud.com/cloud_hosting_products/servers] service. Cloud Servers from The Rackspace Cloud put you in complete control of your hosting infrastructure. Each Cloud Server is a fully-customizable, pay by the hour, virtualized server instance that you launch, maintain, and control with full root access.
+This is a Ruby interface into the Rackspace[http://rackspacecloud.com/] {Cloud Servers}[http://www.rackspacecloud.com/cloud_hosting_products/servers] service. Cloud Servers from The Rackspace Cloud put you in complete control of your hosting infrastructure. Each Cloud Server is a fully-customizable, pay by the hour, virtualized Windows or Linux server instance that you launch, maintain, and control with full root access.
-*The idea behind this implementation is to be compliant with the API binding spec while still providing a ruby-esque style for those who prefer it*
+*This is not an official Rackspace-supported language binding. It does not comply with the {Binding Specification}[http://github.com/rackspace/docs-specs-cloud-servers-language-binding]. The idea behind this implementation is to be compliant with the API spec while still providing a ruby-esque style for those who prefer it*
== Installation
-This source is available on Github[http://github.com/rackspace/ruby-cloudservers/] and the gem is available on Gemcutter[http://gemcutter.org/]. To install it, do
+This source is available on Github[http://github.com/minter/ruby-cloudservers/] and the gem is available on Gemcutter[http://gemcutter.org/]. To install it, do
gem sources -a http://gemcutter.org/
- sudo gem install cloudservers
+ sudo gem install minter-cloudservers
To use it in a Rails application, add the following information to your config/environment.rb
- config.gem "cloudfiles", :source => 'http://gemcutter.org/
+ config.gem "minter-cloudfiles", :lib => "cloudservers", :source => 'http://gemcutter.org/
== Examples
@@ -75,15 +75,15 @@ See the class definitions for documentation on specific methods and operations.
=> true
# Create a new 512MB CentOS 5.2 server. The root password is returned in the adminPass method.
- >> image = cs.get_image(2)
- => #<CloudServers::Image:0x1014a8060 ...>, status"ACTIVE", serverIdnil
+ >> image = cs.get_image(8)
+ => #<CloudServers::Image:0x1014a8060 ...>, status"ACTIVE"
>> image.name
=> "CentOS 5.2"
>> flavor = cs.get_flavor(2)
=> #<CloudServers::Flavor:0x101469130 @disk=20, @name="512 server", @id=2, @ram=512>
>> flavor.name
=> "512 server"
- >> newserver = cs.create_server(:name => "New Server", :imageId => image.id, :flavorId => 2)
+ >> newserver = cs.create_server(:name => "New Server", :imageId => image.id, :flavorId => flavor.id)
=> #<CloudServers::Server:0x101433f08 ....
>> newserver.status
=> "BUILD"
@@ -107,4 +107,3 @@ By H. Wade Minter <wade.minter@rackspace.com> and Mike Mayo <mike.mayo@rackspace
== License
See COPYING for license information.
-Copyright (c) 2009, Rackspace US, Inc.
View
@@ -4,13 +4,13 @@ require './lib/cloudservers.rb'
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
- gemspec.name = "cloudservers"
- gemspec.summary = "Rackspace Cloud Servers Ruby API"
- gemspec.description = "A Ruby API to version 1.0 of the Rackspace Cloud Servers product."
+ gemspec.name = "minter-cloudservers"
+ gemspec.summary = "Unofficial Rackspace Cloud Servers Ruby API"
+ gemspec.description = "An Unofficial Ruby API to version 1.0 of the Rackspace Cloud Servers product."
gemspec.email = "wade.minter@rackspace.com"
- gemspec.homepage = "http://github.com/rackspace/ruby-cloudservers"
+ gemspec.homepage = "http://github.com/minter/cloudservers"
gemspec.authors = ["H. Wade Minter","Mike Mayo"]
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler"
-end
+end
View
@@ -1,6 +1,13 @@
-* Work with Jorge to find out why things are getting cached when they apparently shouldn't be.
-* Find out why attempting to delete a stock system image isn't returning an error code
-* Handle managing account limits
+* There are caching bugs in the API, so that accurate information is not always returned (ie. if you add a server and
+ then list available servers, the new one will not show up.). That needs to be corrected on the API end before
+ data will be accurate.
+
+* Find out why attempting to delete a stock system image isn't returning an error code (API issue).
+
+* Handle managing account limits.
+
* Allow some sort of flag to get the stack trace when an exception is thrown.
+
* Shared IP group modification code.
-* Tests. :-)
+
+* Tests. Accusations of heresy and/or aposty are expected. :-)
View
@@ -1 +1 @@
-0.0.0
+0.1.0
View
@@ -9,17 +9,25 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["H. Wade Minter", "Mike Mayo"]
- s.date = %q{2009-11-11}
+ s.date = %q{2010-02-09}
s.description = %q{A Ruby API to version 1.0 of the Rackspace Cloud Servers product.}
s.email = %q{wade.minter@rackspace.com}
+ s.extra_rdoc_files = [
+ "README.rdoc",
+ "TODO"
+ ]
s.files = [
- "COPYING",
+ ".gitignore",
+ "COPYING",
+ "README.rdoc",
"Rakefile",
"TODO",
"VERSION",
+ "cloudservers.gemspec",
"lib/cloudservers.rb",
"lib/cloudservers/authentication.rb",
"lib/cloudservers/connection.rb",
+ "lib/cloudservers/entity_manager.rb",
"lib/cloudservers/exception.rb",
"lib/cloudservers/flavor.rb",
"lib/cloudservers/image.rb",
@@ -81,7 +81,8 @@ def get_server(id)
#
# >> cs.list_servers
# => [{"name"=>"MyServer", "id"=>110917}]
- def list_servers
+ def list_servers(options = {})
+ url_params = "?limit=#{URI.escape(options[:limit].to_s)}&offset=#{URI.escape(options[:offset].to_s)}" if options[:limit] && options[:offset]
response = csreq("GET",svrmgmthost,"#{svrmgmtpath}/servers",svrmgmtport,svrmgmtscheme)
CloudServers::Exception.raise_exception(response) unless response.code.match(/^20.$/)
JSON.parse(response.body)["servers"]
@@ -152,7 +153,7 @@ def list_images
# Returns a CloudServers::Image object for the image identified by the provided id.
#
- # >> image = cs.get_image(2)
+ # >> image = cs.get_image(8)
# => #<CloudServers::Image:0x101659698 ...>
def get_image(id)
CloudServers::Image.new(self,id)

0 comments on commit ce9035a

Please sign in to comment.