Rex::Cloud::OpenNebula

Module to talk to OpenNebula

TABLE OF CONTENTS

NAME

Rex::Cloud::OpenNebula::CloudLayer - Cloud layer for Rex

DESCRIPTION

This module is a layer between the Rex::Cloud::OpenNebula Module and the Rex::Cloud API.

SYNOPSIS

 use Rex::Cloud::OpenNebula::CloudLayer;
  
 use Rex::Commands::Cloud;
 use Rex::Cloud::OpenNebula;
 use Data::Dumper;
 
 cloud_service "OpenNebula";
 cloud_auth "user", "password";
 cloud_region "http://172.16.120.131:2633/RPC2";;
 
 task "list-os", sub {
    print Dumper get_cloud_operating_systems;
 };
 
 task "create", sub {
    my $params = shift;
    my $vm = cloud_instance create => {
       image        => "template-1",
       name         => $params->{name},
    };
 
    print Dumper($vm);
 };
 
 task "start", sub {
    my $params = shift;
    cloud_instance start => $params->{name};
 };
 
 task "stop", sub {
    my $params = shift;
    cloud_instance stop => $params->{name};
 };
 
 task "terminate", sub {
    my $params = shift;
    cloud_instance terminate => $params->{name};
 };
 
 task "list", sub {
    print Dumper cloud_instance_list;
 };

METHODS

ADDITIONAL FILES

SUB MODULES

FILES

OTHER FILES

INSTALLATION

To use this module use the following command from the same directory where your Rexfile is located:

$ rexify --use Rex::Cloud::OpenNebula
Fork me on GitHub