1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

feature #239: Fixed Bug #257 in OCCI

This commit is contained in:
Daniel Molina 2010-06-21 15:53:45 +02:00 committed by Tino Vázquez
parent 0b26a50155
commit 82b1b156ed
3 changed files with 151 additions and 155 deletions

View File

@ -1,54 +1,4 @@
#!/usr/bin/env ruby
# == Synopsis
# occi-compute
#
# Manages compute resources
#
# == Usage
#
# occi-compute <COMMAND> [OPTIONS] [ARGUMENTS]
#
# COMMANDS
#
# create <occi xml file>
# creates a new compute resource described by the provided
# <occi xml file>
#
# list
# lists available compute resources
#
# show <compute id>
# retrieves the OCCI XML representation of the compute resource
# identified by <compute id>
#
# update <occi xml file>
# updates the representation of the compute resource represented by the
# provided <occi xml file>
#
# delete <compute id>
# deletes the compute resource idenfitied by <compute id>
#
#
# OPTIONS
#
# -h, --help:
# show help
#
# --username <id>, -U <id>:
# The username of the user
#
# --password <key>, -P <key>:
# The password of the user
#
# --url <url>, -R <url>:
# Set url as the web service url to use
#
# --debug, -D
# Enables verbosity
#
#
# -------------------------------------------------------------------------- #
# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) #
# #
@ -78,10 +28,57 @@ end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
** Synopsis
occi-compute
Manages compute resources
** Usage
occi-compute <COMMAND> [OPTIONS] [ARGUMENTS]
COMMANDS
create <occi xml file>
creates a new compute resource described by the provided
<occi xml file>
list
lists available compute resources
show <compute id>
retrieves the OCCI XML representation of the compute resource
identified by <compute id>
update <occi xml file>
updates the representation of the compute resource represented by the
provided <occi xml file>
delete <compute id>
deletes the compute resource idenfitied by <compute id>
OPTIONS
--help, -h:
Show help
--username <id>, -U <id>:
The username of the user
--password <key>, -P <key>:
The password of the user
--url <url>, -R <url>:
Set url as the web service url to use
--debug, -D
Enables verbosity
EOT
require 'occi/OCCIClient'
require 'getoptlong'
require 'rdoc/usage'
require 'pp'
require "rexml/document"
include CloudCLI
@ -104,7 +101,8 @@ begin
opts.each do |opt, arg|
case opt
when '--help'
RDoc::usage
puts COMMANDS_HELP
return
when '--username'
username = arg
when '--password'

View File

@ -1,53 +1,4 @@
#!/usr/bin/env ruby
# == Synopsis
# occi-network
#
# Manages virtual networks
#
# == Usage
#
# occi-network <COMMAND> [OPTIONS] [ARGUMENTS]
#
# COMMANDS
#
# create <occi xml file>
# creates a new virtual network described by the provided
# <occi xml file>
#
# list
# lists available virtual networks
#
# show <network id>
# retrieves the OCCI XML representation of the virtual network
# identified by <network id>
#
# delete <network id>
# deletes the virtual network idenfitied by <network id>
#
#
#
# OPTIONS
#
# -h, --help:
# show help
#
# --username <id>, -U <id>:
# The username of the user
#
# --password <key>, -P <key>:
# The password of the user
#
# --url <url>, -R <url>:
# Set url as the web service url to use
#
# --debug, -D
# Enables verbosity
#
# --multipart, -M:
# Use 'multipart-post' library instead of Curb/Curl
#
# -------------------------------------------------------------------------- #
# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) #
# #
@ -77,11 +28,58 @@ end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
** Synopsis
occi-network
Manages virtual networks
** Usage
occi-network <COMMAND> [OPTIONS] [ARGUMENTS]
COMMANDS
create <occi xml file>
creates a new virtual network described by the provided
<occi xml file>
list
lists available virtual networks
show <network id>
retrieves the OCCI XML representation of the virtual network
identified by <network id>
delete <network id>
deletes the virtual network idenfitied by <network id>
OPTIONS
--help, -h:
Show help
--username <id>, -U <id>:
The username of the user
--password <key>, -P <key>:
The password of the user
--url <url>, -R <url>:
Set url as the web service url to use
--debug, -D
Enables verbosity
--multipart, -M:
Use 'multipart-post' library instead of Curb/Curl
EOT
require 'occi/OCCIClient'
require 'CloudClient'
require 'getoptlong'
require 'rdoc/usage'
require 'pp'
require "rexml/document"
include CloudCLI
@ -104,7 +102,8 @@ begin
opts.each do |opt, arg|
case opt
when '--help'
RDoc::usage
puts COMMANDS_HELP
return
when '--username'
username = arg
when '--password'

View File

@ -1,51 +1,4 @@
#!/usr/bin/env ruby
# == Synopsis
# occi-storage
#
# Manages OCCI storage resource
#
# == Usage
#
# occi-storage <COMMAND> [OPTIONS] [PARAMETERS]
#
# COMMANDS
#
# create <occi xml file>
# creates a new storage resource described by the provided
# <occi xml file>
#
# list
# lists available storage resources
#
# show <storage id>
# retrieves the OCCI XML representation of the storage resource
# identified by <storage id>
#
# delete <storage id>
# deletes the storage resource idenfitied by <storage id>
#
#
# OPTIONS
# -h, --help:
# show help
#
# --username <id>, -U <id>:
# The username of the user
#
# --password <key>, -P <key>:
# The password of the user
#
# --url <url>, -R <url>:
# Set url as the web service url to use
#
# --debug, -D
# Enables verbosity
#
# --multipart, -M:
# Use 'multipart-post' library instead of Curb/Curl
#
# -------------------------------------------------------------------------- #
# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) #
# #
@ -75,11 +28,56 @@ end
$: << RUBY_LIB_LOCATION
$: << RUBY_LIB_LOCATION+"/cloud"
COMMANDS_HELP=<<-EOT
** Synopsis
occi-storage
Manages OCCI storage resource
** Usage
occi-storage <COMMAND> [OPTIONS] [PARAMETERS]
COMMANDS
create <occi xml file>
creates a new storage resource described by the provided
<occi xml file>
list
lists available storage resources
show <storage id>
retrieves the OCCI XML representation of the storage resource
identified by <storage id>
delete <storage id>
deletes the storage resource idenfitied by <storage id>
OPTIONS
--help, -h:
Show help
--username <id>, -U <id>:
The username of the user
--password <key>, -P <key>:
The password of the user
--url <url>, -R <url>:
Set url as the web service url to use
--debug, -D
Enables verbosity
--multipart, -M:
Use 'multipart-post' library instead of Curb/Curl
EOT
require 'occi/OCCIClient'
require 'CloudClient'
require 'getoptlong'
require 'rdoc/usage'
require 'pp'
require "rexml/document"
include CloudCLI
@ -104,7 +102,8 @@ begin
opts.each do |opt, arg|
case opt
when '--help'
RDoc::usage
puts COMMANDS_HELP
return
when '--username'
username = arg
when '--password'