NAME
   Net::OpenStack::Compute - Bindings for the OpenStack Compute API.

VERSION
   version 1.1001

SYNOPSIS
       use Net::OpenStack::Compute;
       my $compute = Net::OpenStack::Compute->new(
           auth_url     => $auth_url,
           user         => $user,
           password     => $password,
           project_id   => $project_id,
           # Optional:
           region       => $ENV{NOVA_REGION_NAME},
           service_name => $ENV{NOVA_SERVICE_NAME},
           is_rax_auth  => $ENV{NOVA_RAX_AUTH},
           verify_ssl   => 0,
       );
       $compute->create_server(name => 's1', flavor => $flav_id, image => $img_id);

DESCRIPTION
   This class is an interface to the OpenStack Compute API. Also see the
   oscompute command line tool.

METHODS
   Methods that take a hashref data param generally expect the
   corresponding data format as defined by the OpenStack API JSON request
   objects. See the OpenStack Docs
   <http://docs.openstack.org/api/openstack-compute/1.1/content> for more
   information. Methods that return a single resource will return false if
   the resource is not found. Methods that return an arrayref of resources
   will return an empty arrayref if the list is empty. Methods that create,
   modify, or delete resources will throw an exception on failure.

 get_server
       get_server($id)

   Returns the server with the given id or false if it doesn't exist.

 get_servers
       get_servers(%params)

   params:

   detail
       Optional. Defaults to 0.

   query
       Optional query string to be appended to requests.

   Returns an arrayref of all the servers.

 get_servers_by_name
       get_servers_by_name($name)

   Returns an arrayref of servers with the given name. Returns an empty
   arrayref if there are no such servers.

 create_server
       create_server({ name => $name, flavorRef => $flavor, imageRef => $img_id })

   Returns a server hashref.

 delete_server
       delete_server($id)

   Returns true on success.

 rebuild_server
       rebuild_server($server_id, { imageRef => $img_id })

   Returns a server hashref.

 set_password
       set_password($server_id, $new_password)

   Returns true on success.

 get_image
       get_image($id)

   Returns an image hashref.

 get_images
       get_images(%params)

   params:

   detail
       Optional. Defaults to 0.

   query
       Optional query string to be appended to requests.

   Returns an arrayref of all the images.

 create_image
       create_image($server_id, { name => 'bob' })

   Returns an image hashref.

 delete_image
       delete_image($id)

   Returns true on success.

 get_flavor
       get_flavor($id)

   Returns a flavor hashref.

 get_flavors
       get_flavors(%params)

   params:

   detail
       Optional. Defaults to 0.

   query
       Optional query string to be appended to requests.

   Returns an arrayref of all the flavors.

 token
       token()

   Returns the OpenStack Compute API auth token.

 base_url
       base_url()

   Returns the base url for the OpenStack Compute API, which is returned by
   the server after authenticating.

SEE ALSO
   oscompute
   OpenStack Docs
   <http://docs.openstack.org/api/openstack-compute/1.1/content>

AUTHOR
   Naveed Massjouni <[email protected]>

COPYRIGHT AND LICENSE
   This software is copyright (c) 2011 by Naveed Massjouni.

   This is free software; you can redistribute it and/or modify it under
   the same terms as the Perl 5 programming language system itself.