From 6198af695c4c7a106c071f6043a1c5c8d1431ce5 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 28 Mar 2012 16:45:13 +0200 Subject: [PATCH 01/16] feature #1183: Add ElasticIP support to EC2 --- install.sh | 6 + src/cloud/ec2/etc/econe.conf | 11 + src/cloud/ec2/lib/EC2QueryServer.rb | 35 +++- src/cloud/ec2/lib/econe-server.rb | 15 +- src/cloud/ec2/lib/elastic_ip.rb | 198 ++++++++++++++++++ src/cloud/ec2/lib/views/allocate_address.erb | 8 + src/cloud/ec2/lib/views/associate_address.erb | 6 + .../ec2/lib/views/describe_addresses.erb | 21 ++ src/cloud/ec2/lib/views/describe_images.erb | 1 - .../ec2/lib/views/disassociate_address.erb | 6 + src/cloud/ec2/lib/views/release_address.erb | 5 + src/oca/ruby/OpenNebula/Pool.rb | 2 + src/oca/ruby/OpenNebula/VirtualNetwork.rb | 2 +- src/oca/ruby/OpenNebula/XMLUtils.rb | 46 ++++ 14 files changed, 357 insertions(+), 5 deletions(-) create mode 100644 src/cloud/ec2/lib/elastic_ip.rb create mode 100644 src/cloud/ec2/lib/views/allocate_address.erb create mode 100644 src/cloud/ec2/lib/views/associate_address.erb create mode 100644 src/cloud/ec2/lib/views/describe_addresses.erb create mode 100644 src/cloud/ec2/lib/views/disassociate_address.erb create mode 100644 src/cloud/ec2/lib/views/release_address.erb diff --git a/install.sh b/install.sh index ca951588b5..55726b6566 100755 --- a/install.sh +++ b/install.sh @@ -1011,6 +1011,7 @@ CLOUD_AUTH_LIB_FILES="src/cloud/common/CloudAuth/OCCICloudAuth.rb \ ECO_LIB_FILES="src/cloud/ec2/lib/EC2QueryClient.rb \ src/cloud/ec2/lib/EC2QueryServer.rb \ src/cloud/ec2/lib/ImageEC2.rb \ + src/cloud/ec2/lib/elastic_ip.rb \ src/cloud/ec2/lib/econe-server.rb" ECO_LIB_CLIENT_FILES="src/cloud/ec2/lib/EC2QueryClient.rb" @@ -1019,6 +1020,11 @@ ECO_LIB_VIEW_FILES="src/cloud/ec2/lib/views/describe_images.erb \ src/cloud/ec2/lib/views/describe_instances.erb \ src/cloud/ec2/lib/views/register_image.erb \ src/cloud/ec2/lib/views/run_instances.erb \ + src/cloud/ec2/lib/views/allocate_address.erb \ + src/cloud/ec2/lib/views/associate_address.erb \ + src/cloud/ec2/lib/views/disassociate_address.erb \ + src/cloud/ec2/lib/views/describe_addresses.erb \ + src/cloud/ec2/lib/views/release_address.erb \ src/cloud/ec2/lib/views/terminate_instances.erb" ECO_BIN_FILES="src/cloud/ec2/bin/econe-server \ diff --git a/src/cloud/ec2/etc/econe.conf b/src/cloud/ec2/etc/econe.conf index 02e352aa1b..0e6c5a0b5d 100644 --- a/src/cloud/ec2/etc/econe.conf +++ b/src/cloud/ec2/etc/econe.conf @@ -37,9 +37,20 @@ # 0 = ERROR, 1 = WARNING, 2 = INFO, 3 = DEBUG :debug_level: 3 +# +# +# :cluster_id: :datastore_id: +# +# +# +:elasticips_vnet_id: 0 + +:associate_script: /usr/bin/false +:disassociate_script: /usr/bin/false + # VM types allowed and its template file (inside templates directory) :instance_types: :m1.small: diff --git a/src/cloud/ec2/lib/EC2QueryServer.rb b/src/cloud/ec2/lib/EC2QueryServer.rb index 9b02650a9c..dc9234d5c8 100644 --- a/src/cloud/ec2/lib/EC2QueryServer.rb +++ b/src/cloud/ec2/lib/EC2QueryServer.rb @@ -61,10 +61,18 @@ class EC2QueryServer < CloudServer ########################################################################### - def initialize(client, config, logger) + def initialize(client, oneadmin_client, config, logger) super(config, logger) @client = client + @oneadmin_client = oneadmin_client + + if @config[:elasticips_vnet_id].nil? + logger.error { 'ElasticIP module not loaded' } + else + require 'elastic_ip' + extend ElasticIP + end end ########################################################################### @@ -207,9 +215,34 @@ class EC2QueryServer < CloudServer return response.result(binding), 200 end + ########################################################################### + # Elastic IP + ########################################################################### + def allocate_address(params) + return OpenNebula::Error.new('Unsupported'),400 + end + + def release_address(params) + return OpenNebula::Error.new('Unsupported'),400 + end + + def describe_addresses(params) + return OpenNebula::Error.new('Unsupported'),400 + end + + def associate_address(params) + return OpenNebula::Error.new('Unsupported'),400 + end + + def disassociate_address(params) + return OpenNebula::Error.new('Unsupported'),400 + end + ########################################################################### # Helper functions ########################################################################### + private + def render_state(vm) one_state = ONE_STATES[vm.status] ec2_state = EC2_STATES[one_state||:pending] diff --git a/src/cloud/ec2/lib/econe-server.rb b/src/cloud/ec2/lib/econe-server.rb index bcff7bda0b..24601cefc9 100644 --- a/src/cloud/ec2/lib/econe-server.rb +++ b/src/cloud/ec2/lib/econe-server.rb @@ -135,8 +135,9 @@ before do if username.nil? error 401, error_xml("AuthFailure", 0) else - client = settings.cloud_auth.client(username) - @econe_server = EC2QueryServer.new(client, settings.config, settings.logger) + client = settings.cloud_auth.client(username) + oneadmin_client = settings.cloud_auth.client + @econe_server = EC2QueryServer.new(client, oneadmin_client, settings.config, settings.logger) end end @@ -189,6 +190,16 @@ def do_http_request(params) result,rc = @econe_server.describe_instances(params) when 'TerminateInstances' result,rc = @econe_server.terminate_instances(params) + when 'AllocateAddress' + result,rc = @econe_server.allocate_address(params) + when 'AssociateAddress' + result,rc = @econe_server.associate_address(params) + when 'DisassociateAddress' + result,rc = @econe_server.disassociate_address(params) + when 'ReleaseAddress' + result,rc = @econe_server.release_address(params) + when 'DescribeAddresses' + result,rc = @econe_server.describe_addresses(params) end if OpenNebula::is_error?(result) diff --git a/src/cloud/ec2/lib/elastic_ip.rb b/src/cloud/ec2/lib/elastic_ip.rb new file mode 100644 index 0000000000..0a93d34120 --- /dev/null +++ b/src/cloud/ec2/lib/elastic_ip.rb @@ -0,0 +1,198 @@ +module ElasticIP + def allocate_address(params) + # Get public IP + vnet = retrieve_eip_vnet + return vnet, 400 if OpenNebula::is_error?(vnet) + + ips = vnet.retrieve_elements('LEASES/LEASE[USED=0]/IP') + if ips.nil? + logger.error { "There is no lease available to be allocated" } + return OpenNebula::Error.new('AddressLimitExceeded'), 400 + end + + eip = ips.first + + # Hold IP + rc = vnet.hold(eip) + if OpenNebula::is_error?(rc) + logger.error rc.message + return OpenNebula::Error.new('Unsupported'),400 + end + + # Update EC2_ADDRESSES list + xml_hash = {'EC2_ADDRESSES' => {'IP' => eip, "UID" => retrieve_uid}} + vnet.add_element('TEMPLATE', xml_hash) + rc = vnet.update + if OpenNebula::is_error?(rc) + logger.error rc.message + return OpenNebula::Error.new('Unsupported'),400 + end + + response = ERB.new(File.read(@config[:views]+"/allocate_address.erb")) + return response.result(binding), 200 + end + + def release_address(params) + # Check public IP + vnet = retrieve_eip_vnet + return vnet, 400 if OpenNebula::is_error?(vnet) + + eip = params["PublicIp"] + unless vnet["TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\" and UID=\"#{retrieve_uid}\"]/IP"] + logger.error { "address:#{eip} does not exist" } + return OpenNebula::Error.new('Unsupported'),400 + end + + # Disassociate address if needed + if vnet["TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\"]/VMID"] + cmd_output = `#{@config[:disassociate_script]} #{eip}` + if $?.to_i != 0 + logger.error { cmd_output } + return OpenNebula::Error.new('Unsupported'),400 + end + + vnet.delete_element("TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\"]/VMID") + end + + # Release IP + rc = vnet.release(eip) + if OpenNebula::is_error?(rc) + logger.error {rc.message} + return OpenNebula::Error.new('Unsupported'),400 + end + + # Update EC2_ADDRESSES list + vnet.delete_element("TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\"]") + rc = vnet.update + if OpenNebula::is_error?(rc) + logger.error {rc.message} + return OpenNebula::Error.new('Unsupported'),400 + end + + response = ERB.new(File.read(@config[:views]+"/release_address.erb")) + return response.result(binding), 200 + end + + def describe_addresses(params) + vnet = retrieve_eip_vnet + return vnet, 400 if OpenNebula::is_error?(vnet) + + erb_version = params['Version'] + user_id = retrieve_uid + + response = ERB.new(File.read(@config[:views]+"/describe_addresses.erb")) + return response.result(binding), 200 + end + + def associate_address(params) + # Check public IP + vnet = retrieve_eip_vnet + return vnet, 400 if OpenNebula::is_error?(vnet) + + user_id = retrieve_uid + eip = params["PublicIp"] + vmid = params['InstanceId'] + vmid = vmid.split('-')[1] if vmid[0]==?i + + unless vnet["TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\" and UID=\"#{retrieve_uid}\"]/IP"] + logger.error { "address:#{eip} does not exist" } + return OpenNebula::Error.new('Unsupported'),400 + end + + # Get private IP of the Instance + vm = VirtualMachine.new(VirtualMachine.build_xml(vmid), @client) + rc = vm.info + if OpenNebula::is_error?(rc) + logger.error {rc.message} + return OpenNebula::Error.new('Unsupported'),400 + end + + ips = vm.retrieve_elements('TEMPLATE/NIC/IP') + if ips.nil? + logger.error { "The instance does not have any NIC" } + return OpenNebula::Error.new('Unsupported'),400 + end + + private_ip = ips.first + + # Disassociate address if needed + if vnet["TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\"]/VMID"] + cmd_output = `#{@config[:disassociate_script]} #{eip}` + if $?.to_i != 0 + logger.error { cmd_output } + return OpenNebula::Error.new('Unsupported'),400 + end + + vnet.delete_element("TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\"]/VMID") + end + + # Run external script + vnet_base64 = Base64.encode64(vnet.to_xml).delete("\n") + cmd_output = `#{@config[:associate_script]} #{eip} #{private_ip} \"#{vnet_base64}\"` + if $?.to_i != 0 + logger.error { "associate_script" << cmd_output } + return OpenNebula::Error.new('Unsupported'),400 + end + + # Update EC2_ADDRESSES list + vnet.add_element("TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\"]", "VMID" => vmid) + rc = vnet.update + if OpenNebula::is_error?(rc) + logger.error {rc.message} + return OpenNebula::Error.new('Unsupported'),400 + end + + response = ERB.new(File.read(@config[:views]+"/associate_address.erb")) + return response.result(binding), 200 + end + + def disassociate_address(params) + # Check public IP + vnet = retrieve_eip_vnet + return vnet, 400 if OpenNebula::is_error?(vnet) + + eip = params["PublicIp"] + unless vnet["TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\" and UID=\"#{retrieve_uid}\"]/VMID"] + logger.error { "address:#{eip} does not exist or is not associated with any instance" } + return OpenNebula::Error.new('Unsupported'),400 + end + + # Run external script + cmd_output = `#{@config[:disassociate_script]} #{eip}` + if $?.to_i != 0 + logger.error { cmd_output } + return OpenNebula::Error.new('Unsupported'),400 + end + + # Update EC2_ADDRESSES list + vnet.delete_element("TEMPLATE/EC2_ADDRESSES[IP=\"#{eip}\"]/VMID") + rc = vnet.update + if OpenNebula::is_error?(rc) + logger.error {rc.message} + return OpenNebula::Error.new('Unsupported'),400 + end + + response = ERB.new(File.read(@config[:views]+"/disassociate_address.erb")) + return response.result(binding), 200 + end + + private + + def retrieve_eip_vnet + vnet = VirtualNetwork.new(VirtualNetwork.build_xml(@config[:elasticips_vnet_id]),@oneadmin_client) + rc = vnet.info + + if OpenNebula::is_error?(rc) + logger.error {rc.message} + return OpenNebula::Error.new('Unsupported') + end + + vnet + end + + def retrieve_uid + user = User.new_with_id(OpenNebula::User::SELF, @client) + user.info + user.id + end +end \ No newline at end of file diff --git a/src/cloud/ec2/lib/views/allocate_address.erb b/src/cloud/ec2/lib/views/allocate_address.erb new file mode 100644 index 0000000000..69f131d427 --- /dev/null +++ b/src/cloud/ec2/lib/views/allocate_address.erb @@ -0,0 +1,8 @@ + + + 4ac62eaf-e266-4058-a970-2c01568cd417 + <%= eip %> + standard + 9090909090 + + diff --git a/src/cloud/ec2/lib/views/associate_address.erb b/src/cloud/ec2/lib/views/associate_address.erb new file mode 100644 index 0000000000..8ce2c3ca9e --- /dev/null +++ b/src/cloud/ec2/lib/views/associate_address.erb @@ -0,0 +1,6 @@ + + + 4ac62eaf-e266-4058-a970-2c01568cd417 + true + + diff --git a/src/cloud/ec2/lib/views/describe_addresses.erb b/src/cloud/ec2/lib/views/describe_addresses.erb new file mode 100644 index 0000000000..3b42278cca --- /dev/null +++ b/src/cloud/ec2/lib/views/describe_addresses.erb @@ -0,0 +1,21 @@ + + + 4ac62eaf-e266-4058-a970-2c01568cd417 + + <% vnet.each("LEASES/LEASE[USED=1 and VID=-1]") do |eip| %> + <% if vnet["TEMPLATE/EC2_ADDRESSES[IP=\"#{eip["IP"]}\"]/UID"] == user_id.to_s %> + + <%= eip["IP"] %> + standard + <% if vm_id = vnet["TEMPLATE/EC2_ADDRESSES[IP=\"#{eip["IP"]}\"]/VMID"] %> + <%= vm_id %> + <% else %> + + <% end %> + + + + <% end %> + <% end %> + + \ No newline at end of file diff --git a/src/cloud/ec2/lib/views/describe_images.erb b/src/cloud/ec2/lib/views/describe_images.erb index 163241c670..fff015f68a 100644 --- a/src/cloud/ec2/lib/views/describe_images.erb +++ b/src/cloud/ec2/lib/views/describe_images.erb @@ -2,7 +2,6 @@ <% impool.each do |im| %> - <% im.info %> ami-<%= sprintf('%08i', im.id) %> <%= im['SOURCE'].split('/').last %> diff --git a/src/cloud/ec2/lib/views/disassociate_address.erb b/src/cloud/ec2/lib/views/disassociate_address.erb new file mode 100644 index 0000000000..491092a84e --- /dev/null +++ b/src/cloud/ec2/lib/views/disassociate_address.erb @@ -0,0 +1,6 @@ + + + 4ac62eaf-e266-4058-a970-2c01568cd417 + true + + diff --git a/src/cloud/ec2/lib/views/release_address.erb b/src/cloud/ec2/lib/views/release_address.erb new file mode 100644 index 0000000000..d7b6e529a4 --- /dev/null +++ b/src/cloud/ec2/lib/views/release_address.erb @@ -0,0 +1,5 @@ + + + 4ac62eaf-e266-4058-a970-2c01568cd417 + true + \ No newline at end of file diff --git a/src/oca/ruby/OpenNebula/Pool.rb b/src/oca/ruby/OpenNebula/Pool.rb index 53bde5ff48..46ddc68652 100644 --- a/src/oca/ruby/OpenNebula/Pool.rb +++ b/src/oca/ruby/OpenNebula/Pool.rb @@ -178,6 +178,8 @@ module OpenNebula def update(xml_method, new_template) return Error.new('ID not defined') if !@pe_id + new_template ||= template_xml.delete("\n").gsub(/\s+/m,'') + rc = @client.call(xml_method,@pe_id, new_template) rc = nil if !OpenNebula.is_error?(rc) diff --git a/src/oca/ruby/OpenNebula/VirtualNetwork.rb b/src/oca/ruby/OpenNebula/VirtualNetwork.rb index 2b82cc1622..332c646720 100644 --- a/src/oca/ruby/OpenNebula/VirtualNetwork.rb +++ b/src/oca/ruby/OpenNebula/VirtualNetwork.rb @@ -90,7 +90,7 @@ module OpenNebula # Replaces the template contents # # +new_template+ New template contents - def update(new_template) + def update(new_template=nil) super(VN_METHODS[:update], new_template) end diff --git a/src/oca/ruby/OpenNebula/XMLUtils.rb b/src/oca/ruby/OpenNebula/XMLUtils.rb index e709b6a8a4..36f62606ca 100644 --- a/src/oca/ruby/OpenNebula/XMLUtils.rb +++ b/src/oca/ruby/OpenNebula/XMLUtils.rb @@ -101,6 +101,44 @@ module OpenNebula end end + def delete_element(xpath) + if NOKOGIRI + @xml.xpath(xpath.to_s).remove + else + @xml.delete_element(xpath.to_s) + end + end + + def add_element(xpath, elems) + elems.each { |key, value| + if value.instance_of?(Hash) + if NOKOGIRI + elem = Nokogiri::XML::Node.new key, @xml.document + value.each { |k2, v2| + child = Nokogiri::XML::Node.new k2, elem + child.content = v2 + elem.add_child(child) + } + @xml.xpath(xpath.to_s).first.add_child(elem) + else + elem = REXML::Element.new(key) + value.each { |k2, v2| + elem.add_element(k2).text = v2 + } + @xml.elements[xpath].add_element(elem) + end + else + if NOKOGIRI + elem = Nokogiri::XML::Node.new key, @xml.document + elem.content = value + @xml.xpath(xpath.to_s).first.add_child(elem) + else + @xml.elements[xpath].add_element(key).text = value + end + end + } + end + # Gets an array of text from elemenets extracted # using the XPATH expression passed as filter def retrieve_elements(filter) @@ -201,6 +239,14 @@ module OpenNebula template_like_str('TEMPLATE', indent) end + def template_xml + if NOKOGIRI + @xml.xpath('TEMPLATE').to_s + else + @xml.elements['TEMPLATE'].to_s + end + end + def template_like_str(root_element, indent=true, xpath_exp=nil) if NOKOGIRI xml_template=@xml.xpath(root_element).to_s From 37d5fc11329fbc7f27ac21cb64ebf2a2777136b0 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 29 Mar 2012 12:24:03 +0200 Subject: [PATCH 02/16] Update Sunstone and SelfService translations Added new Italian translation to Sunstone Upgrade translation files with new strings. Need completion for final release. (cherry picked from commit 6352c999f48c1897d743d5f8c54f876c9fd910db) --- install.sh | 6 + .../occi/lib/ui/public/locale/en_US/en_US.js | 2 + .../occi/lib/ui/public/locale/es_ES/es_ES.js | 2 + src/sunstone/public/js/plugins/config-tab.js | 1 + src/sunstone/public/locale/en_US/en_US.js | 103 +++- src/sunstone/public/locale/it_IT/it_IT.js | 574 ++++++++++++++++++ .../public/locale/it_IT/it_datatable.txt | 17 + src/sunstone/public/locale/ru/ru.js | 128 +++- 8 files changed, 790 insertions(+), 43 deletions(-) create mode 100644 src/sunstone/public/locale/it_IT/it_IT.js create mode 100644 src/sunstone/public/locale/it_IT/it_datatable.txt diff --git a/install.sh b/install.sh index 55726b6566..5e5039cdc3 100755 --- a/install.sh +++ b/install.sh @@ -260,6 +260,7 @@ SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \ $SUNSTONE_LOCATION/public/locale \ $SUNSTONE_LOCATION/public/locale/en_US \ $SUNSTONE_LOCATION/public/locale/ru \ + $SUNSTONE_LOCATION/public/locale/it_IT \ $SUNSTONE_LOCATION/public/vendor \ $SUNSTONE_LOCATION/public/vendor/jQueryLayout \ $SUNSTONE_LOCATION/public/vendor/dataTables \ @@ -470,6 +471,7 @@ INSTALL_SUNSTONE_FILES=( SUNSTONE_PUBLIC_IMAGES_FILES:$SUNSTONE_LOCATION/public/images SUNSTONE_PUBLIC_LOCALE_EN_US:$SUNSTONE_LOCATION/public/locale/en_US SUNSTONE_PUBLIC_LOCALE_RU:$SUNSTONE_LOCATION/public/locale/ru + SUNSTONE_PUBLIC_LOCALE_IT_IT:$SUNSTONE_LOCATION/public/locale/it_IT ) INSTALL_SUNSTONE_ETC_FILES=( @@ -1276,6 +1278,10 @@ SUNSTONE_PUBLIC_LOCALE_RU=" src/sunstone/public/locale/ru/ru.js \ src/sunstone/public/locale/ru/ru_datatable.txt" +SUNSTONE_PUBLIC_LOCALE_IT_IT=" +src/sunstone/public/locale/it_IT/it_IT.js \ +src/sunstone/public/locale/it_IT/it_datatable.txt" + #----------------------------------------------------------------------------- diff --git a/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js b/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js index af44b104e6..c9a21c8fc9 100644 --- a/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js +++ b/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js @@ -59,6 +59,7 @@ locale={ "In this view you can easily manage OpenNebula Network resources. You can add or remove virtual networks.":"", "IP":"", "Language":"", + "Launch VNC session":"", "Loading":"", "Loading new language... please wait":"", "MAC":"", @@ -152,6 +153,7 @@ locale={ "Welcome to OpenNebula Self-Service":"", "You can add new storages by clicking \'new\'. Image files will be uploaded to OpenNebula and set ready to be used.":"", "You can also manage compute resources and perform actions such as stop, resume, shutdown or cancel.":"", + "You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them":"", "You have to confirm this action.":"", "You must select a file to upload":"", "You must specify a name":"", diff --git a/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js b/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js index bc98663351..f44bc40ab8 100644 --- a/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js +++ b/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js @@ -59,6 +59,7 @@ locale={ "In this view you can easily manage OpenNebula Network resources. You can add or remove virtual networks.":"En esta vista puede gestionar fácilmente los recursos de red de OpenNebula. Puede añadir o borrar redes virtuales.", "IP":"IP", "Language":"Lenguaje", + "Launch VNC session":"Lanzar sesión VNC", "Loading":"Cargando", "Loading new language... please wait":"Cargando nuevo lenguaje... espere, por favor", "MAC":"MAC", @@ -152,6 +153,7 @@ locale={ "Welcome to OpenNebula Self-Service":"Bienvenid@ a OpenNebula Self-Service", "You can add new storages by clicking 'new'. Image files will be uploaded to OpenNebula and set ready to be used.":"Puede añadir nuevos almacenamientos haciendo click en 'new'. Los ficheros de imagen pueden ser subidos a OpenNebula y preparados para ser usado.", "You can also manage compute resources and perform actions such as stop, resume, shutdown or cancel.":"También puede administrar las máquinas virtuales y realizar acciones como detener, reanudar, apagar o cancelar.", + "You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them":"Puede utilizar el comodín %i. Durante la creación de varias máquinas virtuales, %i será reemplazado por un número distinto en cada una de ellas, empezando por 0", "You have to confirm this action.":"Necesita confirmar esta acción", "You must select a file to upload":"Debe seleccionar un fichero para subir", "You must specify a name":"Debe especificar un nombre", diff --git a/src/sunstone/public/js/plugins/config-tab.js b/src/sunstone/public/js/plugins/config-tab.js index 7b2ec99427..f0c90d5df6 100644 --- a/src/sunstone/public/js/plugins/config-tab.js +++ b/src/sunstone/public/js/plugins/config-tab.js @@ -30,6 +30,7 @@ var config_tab_content = \ \ \ diff --git a/src/sunstone/public/locale/en_US/en_US.js b/src/sunstone/public/locale/en_US/en_US.js index 91db79fee5..cececf59b5 100644 --- a/src/sunstone/public/locale/en_US/en_US.js +++ b/src/sunstone/public/locale/en_US/en_US.js @@ -2,8 +2,9 @@ lang="en_US" datatable_lang="" locale={ + "802.1Q":"", "Accept (default)":"", - "Acl":"", + "ACL":"", "ACL Rules":"", "ACLs":"", "ACL String preview":"", @@ -32,6 +33,7 @@ locale={ "Arguments for the booting kernel":"", "Authentication":"", "Authentication driver":"", + "Base path":"", "Block":"", "Boolean expression that rules out provisioning hosts from list of machines suitable to run this VM":"", "Boot":"", @@ -53,9 +55,14 @@ locale={ "Change group":"", "Change owner":"", "Change password":"", + "Change password successful":"", "Changing language":"", "Clone":"", "Clone this image":"", + "Cluster":"", + "Cluster information":"", + "Cluster name missing!":"", + "Clusters":"", "Community":"", "Configuration":"", "Confirmation of action":"", @@ -69,9 +76,25 @@ locale={ "Create":"", "Create ACL":"", "Create an empty datablock":"", + "Create cluster":"", + "Create Datastore":"", "Create group":"", "Create host":"", "Create Image":"", + "Create new":"", + "Create new ACL":"", + "Create new Cluster":"", + "Create new datastore":"", + "Create new Datastore":"", + "Create new Group":"", + "Create new host":"", + "Create new Host":"", + "Create new Image":"", + "Create new User":"", + "Create new Virtual Machine":"", + "Create new virtual network":"", + "Create new Virtual Network":"", + "Create new VM Template":"", "Create user":"", "Create Virtual Machine":"", "Create Virtual Network":"", @@ -80,6 +103,9 @@ locale={ "Current inputs":"", "Current leases":"", "Current NICs":"", + "Current number of datastores in this cluster":"", + "Current number of hosts in this cluster":"", + "Current number of virtual networks in this cluster":"", "Current variables":"", "Custom attribute name and value must be filled in":"", "Custom attributes":"", @@ -88,8 +114,17 @@ locale={ "Dashboard":"", "Data":"", "Datablock":"", + "Datastore":"", + "Datastore information":"", + "Datastore manager":"", + "Datastores":"", + "Datastore template":"", + "Datastore Template":"", + "Datastore updated correctly":"", "Default":"", "Default (current image type)":"", + "Default (dummy)":"", + "Defaults to template name when emtpy":"", "Define a subnet by IP range":"", "Delete":"", "Delete host":"", @@ -115,16 +150,19 @@ locale={ "Driver default":"", "Drivers":"", "Drop":"", + "DS Mad":"", "Dummy":"", "EC2":"", "Enable":"", "English":"", "Error":"", + "Etables":"", "failed":"", "fd":"", "Features":"", "Fields marked with":"", "File":"", + "Filesystem":"", "Filesystem type":"", "Filesystem type for the fs images":"", "Fill in a new password":"", @@ -143,6 +181,7 @@ locale={ "Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.":"", "hd":"", "Historical monitoring information":"", + "History information":"", "hold":"", "Hold":"", "Hold lease":"", @@ -166,22 +205,28 @@ locale={ "IDE":"", "Image":"", "Image information":"", + "Image location":"", "Image name":"", "Images":"", - "Images (total/public)":"", "Image template":"", + "Image updated correctly":"", "IM MAD":"", "Info":"", "information":"", "Information":"", "Information Manager":"", + "Infrastructure":"", + "Infrastructure resources":"", "Initrd":"", "Inputs":"", "Instantiate":"", "IP":"", "IP End":"", + "IPs":"", "IP Start":"", "IP to listen on":"", + "iSCSI":"", + "Italian":"", "Kernel":"", "Kernel commands":"", "Keyboard configuration locale to use in the VNC display":"", @@ -201,6 +246,12 @@ locale={ "Make non persistent":"", "Make persistent":"", "Manage":"", + "Manage cluster datastores":"", + "Manage cluster hosts":"", + "Manage cluster virtual networks":"", + "Manage unclustered datastores":"", + "Manage unclustered hosts":"", + "Manage unclustered virtual networks":"", "Manual":"", "Max Mem":"", "Memory":"", @@ -229,21 +280,25 @@ locale={ "Network is unreachable: is OpenNebula running?":"", "Network mask":"", "Network Mask":"", + "Network mode":"", "Network reception":"", "Network transmission":"", "Network type":"", - "New":"", "+ New":"", "+ New Group":"", "New password":"", "No":"", + "No datastores in this cluster":"", "No disk id or image name specified":"", "No disks defined":"", + "No hosts in this cluster":"", "No leases to show":"", "None":"", + "No virtual networks in this cluster":"", "Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.":"", "OK":"", "Open VNC Session":"", + "Open vSwitch":"", "Optional, please select":"", "OS":"", "OS and Boot options":"", @@ -258,7 +313,6 @@ locale={ "Path to the initrd image":"", "Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.":"", "Path to the OS kernel to boot the image":"", - "Path vs. source":"", "Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.":"", "Permissions":"", "Permits access to the VM only through the specified ports in the TCP protocol":"", @@ -269,6 +323,7 @@ locale={ "Physical device":"", "Placement":"", "Please choose":"", + "Please, choose and modify the datastore you want to update":"", "Please, choose and modify the image you want to update":"", "Please, choose and modify the template you want to update":"", "Please, choose and modify the virtual machine you want to update":"", @@ -276,9 +331,9 @@ locale={ "Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.":"", "Please choose the new type of authentication for the selected users":"", "Please provide a lease IP":"", - "Please provide a network address":"", "Please provide a resource ID for the resource(s) in this rule":"", "Please select":"", + "Please select a datastore for this image":"", "Please select at least one resource":"", "Please specify to who this ACL applies":"", "Port":"", @@ -288,17 +343,18 @@ locale={ "Predefined":"", "Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).":"", "Previous action":"", + "Prolog time":"", "Provide a path":"", "Provide a source":"", "PS2":"", "Public":"", - "Publish":"", "Quickstart":"", "Ranged network":"", "Rank":"", "Raw":"", "Raw data to be passed directly to the hypervisor":"", "Read only":"", + "Reason":"", "Reboot":"", "Refresh list":"", "Register time":"", @@ -328,19 +384,26 @@ locale={ "Script":"", "SCSI":"", "SDL":"", + "Secure websockets connection":"", + "Select a datastore":"", "Select a network":"", "Select an image":"", "Select a template":"", "Select a VM":"", "Select boot method":"", + "Select cluster":"", "Select disk":"", "Select template":"", + "Select the datastore for this image":"", + "Select the destination cluster:":"", "Select the new group":"", "Select the new owner":"", + "Sequence":"", "Server (Cipher)":"", "Server (x509)":"", "Setup Networks":"", "Shared":"", + "shared,ssh,iscsi,dummy":"", "Shutdown":"", "Sign out":"", "Size":"", @@ -357,14 +420,22 @@ locale={ "Start time":"", "Start Time":"", "State":"", + "State change time":"", "Status":"", "Stop":"", + "style":"", "Submitted":"", + "Summary of infrastructure resources":"", "Summary of resources":"", + "Summary of system resources":"", + "Summary of virtual resources":"", "Sunstone UI Configuration":"", "Support":"", "Suspend":"", "Swap":"", + "System":"", + "System Resources":"", + "System resources management is only accesible to users of the oneadmin group. It comprises the operations regarding OpenNebula groups, users and ACLs.":"", "Tablet":"", "Target":"", "Tcp black ports":"", @@ -374,10 +445,13 @@ locale={ "Template information":"", "Templates":"", "Template updated correctly":"", + "The Infrastructure menu allows management of Hosts, Datastores, Virtual Networks. Users in the oneadmin group can manage clusters as well.":"", "There are mandatory fields missing in the capacity section":"", "There are mandatory fields missing in the OS Boot options section":"", "There are mandatory parameters missing":"", "There are mandatory parameters missing in this section":"", + "There are missing network parameters":"", + "The Virtual Resources menu allows management of Virtual Machine Templates, Instances and Images.":"", "This field sets which attribute will be used to sort the suitable hosts for this VM. Basically, it defines which hosts are more suitable than others":"", "This rule applies to":"", "This will cancel selected VMs":"", @@ -395,12 +469,15 @@ locale={ "This will resume selected stopped or suspended VMs":"", "This will send a reboot action to running VMs":"", "This will suspend selected machines":"", + "TM Mad":"", "TM MAD":"", "total":"", "Total Leases":"", + "Total time":"", "Total VM count":"", "Total VM CPU":"", "Total VM Memory":"", + "Transfer manager":"", "Transfer Manager":"", "Type":"", "Type of disk device to emulate.":"", @@ -411,15 +488,18 @@ locale={ "Udp firewall mode":"", "Udp white ports":"", "Unauthorized":"", - "Unpublish":"", "Update":"", "Update a template":"", + "Update Datastore properties":"", "Update image properties":"", "Update network properties":"", "Update properties":"", "Update template":"", "Update template properties":"", "Update VM properties":"", + "Upload":"", + "Upload file":"", + "Uploading...":"", "USB":"", "Use":"", "Used by VM":"", @@ -450,8 +530,10 @@ locale={ "Virtual Network information":"", "Virtual Network name missing!":"", "Virtual Networks":"", - "Virtual Networks (total/public)":"", "Virtual Network template (attributes)":"", + "Virtual Resources":"", + "VLAN":"", + "VLAN ID":"", "VM information":"", "VM Instance":"", "VM Instances":"", @@ -464,13 +546,12 @@ locale={ "VM template":"", "VM Template":"", "VM Templates":"", - "VM Templates (total/public)":"", + "VMware":"", "VNC":"", "VNC Access":"", "VNC connection":"", "VNC Disabled":"", "VNC Session":"", - "VNET ID":"", "VN MAD":"", "Welcome":"", "Wizard":"", @@ -485,6 +566,8 @@ locale={ "Xen templates must specify a boot method":"", "yes":"", "Yes":"", + "You can find further information on the following links:":"", + "You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them":"", "You have not selected a template":"", "You have to confirm this action.":"", "You need to select something.":"", diff --git a/src/sunstone/public/locale/it_IT/it_IT.js b/src/sunstone/public/locale/it_IT/it_IT.js new file mode 100644 index 0000000000..69a9f0c8c7 --- /dev/null +++ b/src/sunstone/public/locale/it_IT/it_IT.js @@ -0,0 +1,574 @@ +//Translated by Carlo Daffara, Calogero Lo Leggio +lang="it_IT" +datatable_lang="it_datatable.txt" +locale={ + "802.1Q":"", + "Accept (default)":"Accetta (default)", + "ACL":"", + "ACL Rules":"Regole ACL", + "ACLs":"ACL", + "ACL String preview":"Anteprima stringa ACL", + "ACPI":"ACPI", + "Add":"Aggiungi", + "Add context variables":"Aggiungi variabili di contesto", + "Add custom variables":"Aggiungi variabili custom", + "Add disk/image":"Aggiungi disco/immagine", + "Add disks/images":"Aggiungi dischi/immagini", + "Add Graphics":"Aggiungi grafica", + "Add Hypervisor raw options":"Aggiungi configurazioni dirette hypervisor", + "Add inputs":"Aggiungi periferica input", + "Add lease":"Aggiungi lease", + "Add network":"Aggiungi rete", + "Add placement options":"Aggiungi opzioni di posizionamento", + "Admin":"Admin", + "Administrate":"Amministra", + "Advanced mode":"Modalità avanzata", + "Affected resources":"Risorse interessate", + "All":"Tutto", + "Allowed operations":"Operazioni consentite", + "Amount of RAM required for the VM, in Megabytes.":"Memoria richiesta per la VM, in Megabyte.", + "Applies to":"Si applica a", + "Architecture":"Architettura", + "are mandatory":"sono obbligatori", + "Arguments for the booting kernel":"Argomenti per l'avvio del kernel", + "Authentication":"Autenticazione", + "Authentication driver":"Driver di Autenticazione", + "Base path":"", + "Block":"Blocco", + "Boolean expression that rules out provisioning hosts from list of machines suitable to run this VM":"Espressione booleana che esclude il provisioning degli host dalla lista di macchine adatte a eseguire questa VM", + "Boot":"Boot", + "Boot device type":"Tipo di device di boot", + "Bootloader":"Bootloader", + "Boot method":"Metodo di boot", + "Boot/OS options":"Opzioni Boot/OS", + "Bridge":"Bridge", + "Bus":"Bus", + "Cancel":"Cancella", + "Cannot contact server: is it running and reachable?":"Non posso contattare il server, è in esecuzione e raggiungibile?", + "Canvas not supported.":"Canvas non supportato", + "Capacity":"Capacità", + "Capacity options":"Opzioni di capacità", + "cdrom":"cdrom", + "CD-ROM":"CD-ROM", + "Change":"Cambia", + "Change authentication":"Cambia autenticazione", + "Change group":"Cambia gruppo", + "Change owner":"Cambia proprietario", + "Change password":"Cambia password", + "Change password successful":"", + "Changing language":"Cambiamento linguaggio", + "Clone":"Clona", + "Clone this image":"Clona questa immagine", + "Cluster":"", + "Cluster information":"", + "Cluster name missing!":"", + "Clusters":"", + "Community":"Comunità", + "Configuration":"Configurazione", + "Confirmation of action":"Conferma azione", + "Context":"Contesto", + "Context variable name and value must be filled in":"Nome variabile di contesto e valure da inserire", + "Core":"Core", + "CPU":"CPU", + "CPU architecture to virtualization":"Architettura CPU da virtualizzare", + "CPU Monitoring information":"Informazioni monitoraggio CPU", + "CPU Use":"Utilizzo CPU", + "Create":"Crea", + "Create ACL":"Crea ACL", + "Create an empty datablock":"Crea un datablock vuoto", + "Create cluster":"", + "Create Datastore":"", + "Create group":"Crea gruppo", + "Create host":"Crea nodo", + "Create Image":"Crea immagine", + "Create new":"", + "Create new ACL":"", + "Create new Cluster":"", + "Create new datastore":"", + "Create new Datastore":"", + "Create new Group":"", + "Create new host":"", + "Create new Host":"", + "Create new Image":"", + "Create new User":"", + "Create new Virtual Machine":"", + "Create new virtual network":"", + "Create new Virtual Network":"", + "Create new VM Template":"", + "Create user":"Crea utente", + "Create Virtual Machine":"Crea macchina virtuale (VM)", + "Create Virtual Network":"Crea rete virtuale", + "Create VM Template":"Crea template VM", + "Current disks":"Disco attuale", + "Current inputs":"Input attuali", + "Current leases":"Lease attuali", + "Current NICs":"Schede di rete attuali", + "Current number of datastores in this cluster":"", + "Current number of hosts in this cluster":"", + "Current number of virtual networks in this cluster":"", + "Current variables":"Variabili attuali", + "Custom attribute name and value must be filled in":"Nome attributo custom e valure da inserire", + "Custom attributes":"Attributi custom", + "Custom variable name and value must be filled in":"Nome variabile custom e valore da inserire", + "Custom variables":"Variabili custom", + "Dashboard":"Dashboard", + "Data":"Data", + "Datablock":"Datablock", + "Datastore":"", + "Datastore information":"", + "Datastore manager":"", + "Datastores":"", + "Datastore template":"", + "Datastore Template":"", + "Datastore updated correctly":"", + "Default":"Default", + "Default (current image type)":"Default (tipo di immagine attuale)", + "Default (dummy)":"", + "Defaults to template name when emtpy":"", + "Define a subnet by IP range":"Definisci una subnet tramite un range IP", + "Delete":"Cancella", + "Delete host":"Cancella nodo", + "Deploy":"Deploy", + "Deploy ID":"Deploy ID", + "Deploy # VMs":"Deploy # VMs", + "Description":"Descrizione", + "Device prefix":"Prefisso dispositivo", + "Device to be mounted as root":"Dispositivo da montare come root", + "Device to map image disk. If set, it will overwrite the default device mapping":"Dispositivo da mappare per l'immagine del disco. Se configurato, sovrascrive la configurazione di default della mappatura dei dispositivi", + "Disable":"Disabilita", + "disabled":"disabilitato", + "Disallow access to the VM through the specified ports in the TCP protocol":"Nega accesso alla VM attraverso la porta TCP specificata", + "Disallow access to the VM through the specified ports in the UDP protocol":"Nega accesso alla VM attraverso la porta UDP speciicata", + "Disk":"Disco", + "Disk file location path or URL":"Percorso o URL del file del disco", + "disk id":"ID disco", + "Disks":"Dischi", + "Disk type":"Tipo disco", + "Documentation":"Documentazione", + "Do you want to proceed?":"Vuoi proseguire?", + "Driver":"Driver", + "Driver default":"Driver default", + "Drivers":"Drivers", + "Drop":"Drop", + "DS Mad":"", + "Dummy":"Dummy", + "EC2":"EC2", + "Enable":"Abilita", + "English":"Inglese", + "Error":"Errore", + "Etables":"", + "failed":"fallito", + "fd":"fd", + "Features":"Funzionalità", + "Fields marked with":"Campi marcati con", + "File":"File", + "Filesystem":"", + "Filesystem type":"Tipo di filesystem", + "Filesystem type for the fs images":"Tipo di filesystem per queste immagini fs", + "Fill in a new password":"Indica una nuova password", + "Fixed network":"Rete fissa", + "Floppy":"Floppy", + "Fold / Unfold all sections":"Espandi/contrai tutte le sezioni", + "Format":"Format", + "FS":"FS", + "FS type":"Tipo FS", + "Graphics":"Grafica", + "Graphics type":"Tipo grafica", + "Group":"Gruppo", + "Group ":"Grupoi", + "Group name":"Nome del gruppo", + "Groups":"Gruppi", + "Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.":"Hardware per l'emulazione dell'interfaccia di rete. In Xen type attribute del vif.", + "hd":"hd", + "Historical monitoring information":"Storico delle informazioni di monitoraggio", + "History information":"", + "hold":"trattieni", + "Hold":"Trattieni", + "Hold lease":"Trattieni lease", + "Host":"Nodo", + "Host information":"Informazioni nodo", + "Hostname":"Hostname", + "Host name missing!":"Nome del nodo mancante!", + "Host parameters":"Parametri nodo", + "Hosts":"Nodi", + "Hosts CPU":"CPU nodi", + "Host shares":"Share nodi", + "Hosts memory":"Memoria nodi", + "Hosts (total/active)":"Nodi (totali/attivi)", + "Host template":"Template nodo", + "Human readable description of the image for other users.":"Descrizione immagine per altri utenti", + "HW address associated with the network interface":"Indirizzo hardware associato alla interfaccia di rete", + "Icmp":"ICMP", + "ICMP policy":"Policy ICMP", + "id":"id", + "ID":"ID", + "IDE":"IDE", + "Image":"Immagine", + "Image information":"Informazioni immagine", + "Image location":"", + "Image name":"Nome immagine", + "Images":"Immagini", + "Image template":"Template immagine", + "Image updated correctly":"", + "IM MAD":"IM MAD", + "Info":"Info", + "information":"Informazioni", + "Information":"Informazioni", + "Information Manager":"Information manager", + "Infrastructure":"", + "Infrastructure resources":"", + "Initrd":"Initrd", + "Inputs":"Ingressi", + "Instantiate":"Istanza", + "IP":"IP", + "IP End":"IP fine", + "IPs":"", + "IP Start":"IP inizio", + "IP to listen on":"IP su cui restare in ascolto", + "iSCSI":"", + "Italian":"", + "Kernel":"Kernel", + "Kernel commands":"Comandi kernel", + "Keyboard configuration locale to use in the VNC display":"Configurazione del layout della tastiera per il display VNC", + "Keymap":"Keymap", + "KVM":"KVM", + "Language":"Linguaggio", + "LCM State":"Stato LCM", + "Lease IP":"Lease IP", + "Lease MAC (opt):":"Lease MAC (opzionale)", + "Lease management":"Gestione Lease", + "Leases information":"Informazioni Lease", + "Listen IP":"IP di ascolto", + "Live migrate":"Live migrate", + "Loading":"Caricamento", + "Loading new language... please wait":"Caricamento nuovo linguaggio... attendere", + "MAC":"MAC", + "Make non persistent":"Rendi non persistente", + "Make persistent":"Rendi persistente", + "Manage":"Gestisci", + "Manage cluster datastores":"", + "Manage cluster hosts":"", + "Manage cluster virtual networks":"", + "Manage unclustered datastores":"", + "Manage unclustered hosts":"", + "Manage unclustered virtual networks":"", + "Manual":"Manuale", + "Max Mem":"Max Mem", + "Memory":"Memoria", + "Memory monitoring information":"Informazioni monitoraggio memoria", + "Memory use":"Utilizzo memoria", + "Migrate":"Migra", + "Model":"Modello", + "Monitoring information":"Informazioni di monitoraggio", + "Mount image as read-only":"Monta immagine in sola lettura", + "Mouse":"Mouse", + "Name":"Nome", + "Name for the context variable":"Nome per la variabile di contesto", + "Name for the custom variable":"Nome per la variabile custom", + "Name for the tun device created for the VM":"Nome per il dispositivo tun creato per la VM", + "Name of a shell script to be executed after creating the tun device for the VM":"Nome dello script da eseguire dopo la creazione del dispositivo tun per la VM", + "Name of the bridge the network device is going to be attached to":"Nome del bridge a cui si sta collegando l'interfaccia di rete", + "Name of the image to use":"Nome immagine da usare", + "Name of the network to attach this device":"Nome della rete a cui collegare questo dispositivo", + "Name that the Image will get. Every image must have a unique name.":"Nome assegnato a immagine. Ogni immagine deve avere un nome univoco.", + "Name that the VM will get for description purposes. If NAME is not supplied a name generated by one will be in the form of one-<VID>.":"Nome ottenuto dalla descrizione della VM. Se il nome non viene assegnato, viene generato un nome nella forma one-<VID>.", + "Net_RX":"Net_RX", + "Net_TX":"Net_TX", + "network":"rete", + "Network":"Rete", + "Network Address":"Indirizzo di rete", + "Network is unreachable: is OpenNebula running?":"Rete non raggiungibile. Opennebula attivo?", + "Network mask":"maschera di rete", + "Network Mask":"Maschera di rete", + "Network mode":"", + "Network reception":"Ricezione rete", + "Network transmission":"Trasmissione rete", + "Network type":"Tipo di rete", + "+ New":"+ Nuovo", + "+ New Group":"+ Nuovo gruppo", + "New password":"Nuova password", + "No":"No", + "No datastores in this cluster":"", + "No disk id or image name specified":"ID disco o nome immagine non specificato", + "No disks defined":"Disco non definito", + "No hosts in this cluster":"", + "No leases to show":"Nessun lease da mostrare", + "None":"Nessuno", + "No virtual networks in this cluster":"", + "Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.":"Numero delle CPU virtuali (opzionale). Questo valore è opzionale, se non configurato verrà usato la configurazione predefinita dell'hypervisor, di norma una CPU virtuale.", + "OK":"OK", + "Open VNC Session":"Sessione VNC aperta", + "Open vSwitch":"", + "Optional, please select":"Opzionale, selezionate", + "OS":"OS", + "OS and Boot options":"Opzioni OS e boot", + "Other":"Altro", + "Owned by group":"Posseduto dal gruppo", + "Owner":"Proprietario", + "PAE":"PAE", + "Password":"Password", + "Password for the VNC server":"Password per il server VNC", + "Path":"Percorso", + "Path to the bootloader executable":"Percorso per eseguibile bootloader", + "Path to the initrd image":"Percorso immagine initrd", + "Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.":"Percorso del file originale da copiare nel repository immagini. Se non specificato per il tipo DATABLOCK, crea una immagine vuota.", + "Path to the OS kernel to boot the image":"Percorso per il kernel dell'OS per avviare immagine", + "Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.":"Percentuale CPU diviso 100 richiesta per la VM. Mezzo processore viene ad esempio indicato con 0.5.", + "Permissions":"Permessi", + "Permits access to the VM only through the specified ports in the TCP protocol":"Permette accesso alla VM solo tramite le porte TCP specificate", + "Permits access to the VM only through the specified ports in the UDP protocol":"Permette accesso alla VM solo tramite le porte UDP specificate", + "Persistence of the image":"Persistenza immagine", + "Persistent":"Persistente", + "Physical address extension mode allows 32-bit guests to address more than 4 GB of memory":"Il modo PAE consente ai guest 32-bit di utilizzare più di 4GB di memoria", + "Physical device":"Device fisico", + "Placement":"Posizionamento", + "Please choose":"Selezionare", + "Please, choose and modify the datastore you want to update":"", + "Please, choose and modify the image you want to update":"Scegliere quale immagine modificare", + "Please, choose and modify the template you want to update":"Scegliere quale template modificare", + "Please, choose and modify the virtual machine you want to update":"Scegliere quale VM modificare", + "Please, choose and modify the virtual network you want to update":"Scegliere quale rete virtuale modificare", + "Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.":"Scegliere il percorso del file se disponete di una immagine/file. Altrimenti scegliere Sorgente o creare un datablock vuoto.", + "Please choose the new type of authentication for the selected users":"Scegli il tipo di autenticazione da usare per gli utenti selezionati", + "Please provide a lease IP":"Indicate un IP lease", + "Please provide a resource ID for the resource(s) in this rule":"Indicate un resource ID per le risorse in questa regola", + "Please select":"Selezionare", + "Please select a datastore for this image":"", + "Please select at least one resource":"Selezionare almeno una risorsa", + "Please specify to who this ACL applies":"Indicare a chi si appplica questa ACL", + "Port":"Port", + "Port blacklist":"Port blacklist", + "Port for the VNC server":"Port per il server VNC", + "Port whitelist":"Port whitelist", + "Predefined":"Predefinito", + "Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).":"Prefisso del dispositivo emulato da montare. Ad esempio, “hd“ o “sd“. Se omesso, viene utilizzato il valore di default.", + "Previous action":"Azione precedente", + "Prolog time":"", + "Provide a path":"Indicare un percorso", + "Provide a source":"Indicare una sorgente", + "PS2":"PS2", + "Public":"Pubblico", + "Quickstart":"Quickstart", + "Ranged network":"Ranged network", + "Rank":"Rank", + "Raw":"Raw", + "Raw data to be passed directly to the hypervisor":"Dati raw passati direttamente all'hypervisor", + "Read only":"Sola lettura", + "Reason":"", + "Reboot":"Reboot", + "Refresh list":"Aggiorna lista", + "Register time":"Register time", + "Registration time":"Registration time", + "release":"rilascia", + "Release":"Rilascia", + "Remove selected":"Rimuovi il selezionato", + "Request an specific IP from the Network":"Richiedi un IP specifico dalla Rete", + "Requirements":"Requisiti", + "Reset":"Reset", + "Resource ID":"ID risorsa", + "Resource ID / Owned by":"ID risorsa/proprietà di", + "Resource subset":"Sottoinsieme risorsa", + "Restart":"Restart", + "Resubmit":"Resubmit", + "Resume":"Resume", + "Retrieving":"Retrieving", + "Root":"Root", + "running":"in esecuzione", + "Running VMs":"VM in esecuzione", + "Running #VMS":"#VM in esecuzione", + "Russian":"Russo", + "Save":"Salva", + "Save as":"Salva come", + "Saveas for VM with ID":"Salva come per VM con ID", + "Save this image after shutting down the VM":"Salva questa immagine dopo aver spento la VM", + "Script":"Script", + "SCSI":"SCSI", + "SDL":"SDL", + "Secure websockets connection":"", + "Select a datastore":"", + "Select a network":"Seleziona una rete", + "Select an image":"Seleziona una immagine", + "Select a template":"Seleziona un template", + "Select a VM":"Seleziona una VM", + "Select boot method":"Seleziona il metodo di boot", + "Select cluster":"", + "Select disk":"Seleziona disco", + "Select template":"Seleziona template", + "Select the datastore for this image":"", + "Select the destination cluster:":"", + "Select the new group":"Seleziona il nuovo gruppo", + "Select the new owner":"Seleziona il nuovo proprietario", + "Sequence":"", + "Server (Cipher)":"Server (cifratura)", + "Server (x509)":"Server (x509)", + "Setup Networks":"Configurazione reti", + "Shared":"Condiviso", + "shared,ssh,iscsi,dummy":"", + "Shutdown":"Shutdown", + "Sign out":"Logout", + "Size":"Dimensione", + "Size in MB":"Dimensione in MB", + "Size (Mb)":"Dimensione (MB)", + "Size of the datablock in MB.":"Dimensione del datablock in MB", + "Skipping VM ":"Skipping VM", + "Source":"Sorgente", + "Source to be used in the DISK attribute. Useful for not file-based images.":"Sorgente per attributo DISK. Utilizzato per immagini non basate su file.", + "Specific ID":"ID specifico", + "Specific image mapping driver. KVM: raw, qcow2. XEN: tap:aio, file:":"Image mapping driver specifico. KVM:raw, qcow2. XEN: tap:aio, file:", + "Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported":"Image mapping driver specifico. KVM:raw, qcow2. XEN: tap:aio, file:. VMware non supportato.", + "SSH":"SSH", + "Start time":"Istante di avvio", + "Start Time":"Istante di avvio", + "State":"Stato", + "State change time":"", + "Status":"Status", + "Stop":"Stop", + "style":"", + "Submitted":"Inviato", + "Summary of infrastructure resources":"", + "Summary of resources":"Sommario risorse", + "Summary of system resources":"", + "Summary of virtual resources":"", + "Sunstone UI Configuration":"Configurazione UI Sunstone", + "Support":"Supporto", + "Suspend":"Suspend", + "Swap":"Swap", + "System":"", + "System Resources":"", + "System resources management is only accesible to users of the oneadmin group. It comprises the operations regarding OpenNebula groups, users and ACLs.":"", + "Tablet":"Tablet", + "Target":"Target", + "Tcp black ports":"Porte TCP in blacklist", + "Tcp firewall mode":"Modo firewall TCP", + "Tcp white ports":"Porte TCP in whitelist", + "Template":"Template", + "Template information":"Informazioni template", + "Templates":"Template", + "Template updated correctly":"Template modificato correttamente.", + "The Infrastructure menu allows management of Hosts, Datastores, Virtual Networks. Users in the oneadmin group can manage clusters as well.":"", + "There are mandatory fields missing in the capacity section":"Ci sono dei campi mancanti nella sezione capacità", + "There are mandatory fields missing in the OS Boot options section":"Ci sono dei campi mancanti nella sezione boot OS", + "There are mandatory parameters missing":"Ci sono dei campi obbligatori non compilati", + "There are mandatory parameters missing in this section":"Ci sono dei campi obbligatori non compilati in questa sezione", + "There are missing network parameters":"", + "The Virtual Resources menu allows management of Virtual Machine Templates, Instances and Images.":"", + "This field sets which attribute will be used to sort the suitable hosts for this VM. Basically, it defines which hosts are more suitable than others":"Questo campo indica quale attributo utilizzare per il posizionamento delle VM", + "This rule applies to":"Questa regola si applica a", + "This will cancel selected VMs":"Questo cancellerà le VM selezionate", + "This will change the main group of the selected users. Select the new group":"Questo cambierà il gruppo principale degli utenti selezionati. Scegli il nuovo gruppo", + "This will change the password for the selected users":"Questo cambierà la password degli utenti selezionati", + "This will delete the selected VMs from the database":"Questo cancellerà le VM selezionate dal database", + "This will deploy the selected VMs on the chosen host":"Questo effettuerà il deploy delle VM sul nodo selezionato", + "This will hold selected pending VMs from being deployed":"Questo tratterrà le VM impedendo il deploy", + "This will initiate the shutdown process in the selected VMs":"Questo inizierà lo shutdown dei processi nelle VM selezionate", + "This will live-migrate the selected VMs to the chosen host":"Questo effettuerà la live migration delle VM selezionate nel nodo scelto", + "This will migrate the selected VMs to the chosen host":"Questo effettuerà la migrazione delle VM selezionate nel nodo scelto", + "This will redeploy selected VMs (in UNKNOWN or BOOT state)":"Questo effettuerà il redeploy delle VM selezionate in stato UNKNOWN o BOOT", + "This will release held machines":"Questo rilascerà le macchine trattenute", + "This will resubmits VMs to PENDING state":"Questo effettuerà il resubmit delle VM in stato PENDING", + "This will resume selected stopped or suspended VMs":"Questo effettuerà il resume delle VM ferme o in sospensione", + "This will send a reboot action to running VMs":"Questo effettuerà il reboot delle VM in esecuzione", + "This will suspend selected machines":"Questo effettuerà il suspend delle macchine selezionate", + "TM Mad":"", + "TM MAD":"TM MAD", + "total":"totale", + "Total Leases":"Totale lease", + "Total time":"", + "Total VM count":"Numero VM totale", + "Total VM CPU":"VM CPU totali", + "Total VM Memory":"Memoria VM totale", + "Transfer manager":"", + "Transfer Manager":"Transfer manager", + "Type":"Tipo", + "Type of disk device to emulate.":"Tipo del dispositivo disco da emulare", + "Type of disk device to emulate: ide, scsi":"Tipo del dispositivo disco da emulare: ide, scsi", + "Type of file system to be built. This can be any value understood by mkfs unix command.":"Tipo di filesystem da creare. Può essere qualsiasi valore riconosciuto dal comando unix mkfs.", + "Type of the image, explained in detail in the following section. If omitted, the default value is the one defined in oned.conf (install default is OS).":"Tipo di immagine, indicato in dettaglio nella sezione sottostante. Default: OS", + "Udp black ports":"Porte UDP in blacklist", + "Udp firewall mode":"Modo firewall UDP", + "Udp white ports":"Porte UDP in whitelist", + "Unauthorized":"Non autorizzato", + "Update":"Modifica", + "Update a template":"Modifica un template", + "Update Datastore properties":"", + "Update image properties":"Modifica proprietà immagine", + "Update network properties":"Modifica proprietà di rete", + "Update properties":"Modifica proprietà", + "Update template":"Modifica template", + "Update template properties":"Modifica proprietà template", + "Update VM properties":"Modifica proprietà VM", + "Upload":"", + "Upload file":"", + "Uploading...":"", + "USB":"USB", + "Use":"Usa", + "Used by VM":"Usato dalla VM", + "Used CPU":"CPU utilizzata", + "Used CPU (allocated)":"CPU utilizzata (allocata)", + "Used CPU (real)":"CPU utilizzata (reale)", + "Used Mem (allocated)":"Memoria utilizzata (allocata)", + "Used Memory":"Memoria utilizzata", + "Used Mem (real)":"Memoria utilizzata (reale)", + "Useful for power management, for example, normally required for graceful shutdown to work":"Utile per il power management - ad esempio necessario per lo shutdown", + "User":"Utente", + "User information":"Informazioni utente", + "Username":"Nome utente", + "User name and password must be filled in":"Nome utente e password devono essere indicate", + "Users":"Utenti", + "User template":"Template utente", + "Value":"Valore", + "Value of the context variable":"Valore della variabile di contesto", + "Value of the custom variable":"Valore della variabile custom", + "VCPU":"VCPU", + "Virtio":"Virtio", + "Virtio (KVM)":"Virtio (KVM)", + "Virtualization Manager":"Virtualization Manager", + "Virtual Machine information":"Informazioni sulla macchina virtuale", + "Virtual Machines":"Macchine virtuali", + "Virtual Network":"Rete virtuale", + "Virtual network information":"Informazioni sulla rete virtuale", + "Virtual Network information":"Informazioni sulla rete virtuale", + "Virtual Network name missing!":"Nome della rete virtuale mancante!", + "Virtual Networks":"Reti Virtuali", + "Virtual Network template (attributes)":"Template rete virtuale (attributi)", + "Virtual Resources":"", + "VLAN":"", + "VLAN ID":"", + "VM information":"Informazioni VM", + "VM Instance":"Istanza VM", + "VM Instances":"Istanze VM", + "VM log":"log VM", + "VM MAD":"VM MAD", + "VM Name":"Nome VM", + "VM Network stats":"Statistiche di rete VM", + "#VMS":"#VMS", + "VM Save As":"Salva la VM come", + "VM template":"template VM", + "VM Template":"Template VM", + "VM Templates":"Templates VM", + "VMware":"", + "VNC":"VNC", + "VNC Access":"Accesso VNC", + "VNC connection":"Connessione VNC", + "VNC Disabled":"VNC disabilitato", + "VNC Session":"Sessione VNC", + "VN MAD":"VM MAD", + "Welcome":"Benvenuto", + "Wizard":"Wizard", + "Wizard KVM":"Wizard KVM", + "Wizard VMware":"Wizard VMware", + "Wizard XEN":"Wizard XEN", + "Write the image template here":"Scrivi il template immagine qui", + "Write the Virtual Machine template here":"Scrivi il template della macchina virtuale qui", + "Write the Virtual Network template here":"Scrivi il template della rete virtuale qui", + "x509":"x509", + "XEN":"XEN", + "Xen templates must specify a boot method":"I template Xen devono specificare un metodo di boot", + "yes":"si", + "Yes":"Si", + "You can find further information on the following links:":"", + "You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them":"", + "You have not selected a template":"Non hai selezionato un template.", + "You have to confirm this action.":"Devi confermare questa azione.", + "You need to select something.":"Devi selezionare qualcosa.", +}; diff --git a/src/sunstone/public/locale/it_IT/it_datatable.txt b/src/sunstone/public/locale/it_IT/it_datatable.txt new file mode 100644 index 0000000000..2ef7e50156 --- /dev/null +++ b/src/sunstone/public/locale/it_IT/it_datatable.txt @@ -0,0 +1,17 @@ +{ + "sProcessing": "Caricamento...", + "sLengthMenu": "Visualizza _MENU_ elementi", + "sZeroRecords": "La ricerca non ha portato alcun risultato.", + "sInfo": "Vista da _START_ a _END_ di _TOTAL_ elementi", + "sInfoEmpty": "Vista da 0 a 0 di 0 elementi", + "sInfoFiltered": "(filtrati da _MAX_ elementi totali)", + "sInfoPostFix": "", + "sSearch": "Cerca:", + "sUrl": "", + "oPaginate": { + "sFirst": "Inizio", + "sPrevious": "Precedente", + "sNext": "Successivo", + "sLast": "Fine" + } +} diff --git a/src/sunstone/public/locale/ru/ru.js b/src/sunstone/public/locale/ru/ru.js index 5707fcb166..ba719428a4 100644 --- a/src/sunstone/public/locale/ru/ru.js +++ b/src/sunstone/public/locale/ru/ru.js @@ -3,8 +3,9 @@ lang="ru" datatable_lang="ru_datatable.txt" locale={ + "802.1Q":"", "Accept (default)":"Принять (по умолчанию)", - "Acl":"Правило контроля доступа", + "ACL":"", "ACL Rules":"Правила контроля доступа", "ACLs":"Списки контроля", "ACL String preview":"Строка, задающая правило", @@ -33,6 +34,7 @@ locale={ "Arguments for the booting kernel":"Параметры для загрузки ядра", "Authentication":"Способ аутентификации", "Authentication driver":"Драйвер аутентификации", + "Base path":"", "Block":"Block", "Boolean expression that rules out provisioning hosts from list of machines suitable to run this VM":"Логическое выражение, исключающее элементы из списка узлов, подходящих для запуска данной ВМ", "Boot":"Загрузка", @@ -54,9 +56,14 @@ locale={ "Change group":"Сменить группу", "Change owner":"Сменить владельца", "Change password":"Сменить пароль", + "Change password successful":"", "Changing language":"Смена языка интерфейса", "Clone":"Клонировать", "Clone this image":"Клонировать образ", + "Cluster":"", + "Cluster information":"", + "Cluster name missing!":"", + "Clusters":"", "Community":"Сообщество OpenNebula", "Configuration":"Интерфейс", "Confirmation of action":"Смена значения", @@ -70,9 +77,25 @@ locale={ "Create":"Создать", "Create ACL":"Создать правило контроля", "Create an empty datablock":"Создать пустой блок данных", + "Create cluster":"", + "Create Datastore":"", "Create group":"Создать группу", "Create host":"Укажите параметры нового узла", "Create Image":"Укажите параметры нового образа", + "Create new":"", + "Create new ACL":"", + "Create new Cluster":"", + "Create new datastore":"", + "Create new Datastore":"", + "Create new Group":"", + "Create new host":"", + "Create new Host":"", + "Create new Image":"", + "Create new User":"", + "Create new Virtual Machine":"", + "Create new virtual network":"", + "Create new Virtual Network":"", + "Create new VM Template":"", "Create user":"Укажите данные для нового пользователя", "Create Virtual Machine":"Укажите параметры виртуальной машины", "Create Virtual Network":"Укажите параметры виртуальной сети", @@ -81,6 +104,9 @@ locale={ "Current inputs":"Используемые устройства ввода", "Current leases":"Адреса виртуальной сети", "Current NICs":"Используемые контроллеры сетевого интерфейса", + "Current number of datastores in this cluster":"", + "Current number of hosts in this cluster":"", + "Current number of virtual networks in this cluster":"", "Current variables":"Используемые переменные", "Custom attribute name and value must be filled in":"Поля названия и значения пользовательского атрибута обязательны к заполнению", "Custom attributes":"Пользовательские атрибуты", @@ -89,9 +115,17 @@ locale={ "Dashboard":"Инф. панель", "Data":"Данные", "Datablock":"Блок данных", + "Datastore":"", + "Datastore information":"", + "Datastore manager":"", + "Datastores":"", + "Datastore template":"", + "Datastore Template":"", + "Datastore updated correctly":"", "Default":"По умолчанию", "Default (current image type)":"По умолчанию (текущий тип образа)", "Default (dummy)":"По умолчанию (заглушка)", + "Defaults to template name when emtpy":"", "Define a subnet by IP range":"Указать диапазон адресов", "Delete":"Удалить", "Delete host":"Удалить узел", @@ -117,16 +151,19 @@ locale={ "Driver default":"Драйвер по умолчанию", "Drivers":"Драйверы", "Drop":"Сбросить", + "DS Mad":"", "Dummy":"Заглушка", "EC2":"EC2", "Enable":"Включить", "English":"English (EN)", "Error":"Ошибка", + "Etables":"", "failed":"дефектных", "fd":"fd", "Features":"Особенности", "Fields marked with":"Поля, отмеченные символом ", "File":"Файл", + "Filesystem":"", "Filesystem type":"Тип файловой системы", "Filesystem type for the fs images":"Тип файловой системы для образов ФС", "Fill in a new password":"Введите новый пароль", @@ -141,11 +178,11 @@ locale={ "Group":"Группа", "Group ":"гр. ", "Group name":"Название группы", - "Group permissions":"Права для группы", "Groups":"Группы", "Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.":"Аппаратное устройствое, которое будет отвечать за эмуляцию сетевого интерфейса. Для Xen это атрибут «vif».", "hd":"hd", "Historical monitoring information":"Мониторинг состояния", + "History information":"", "hold":"запретить", "Hold":"Запретить размещение", "Hold lease":"Запретить выдачу адреса", @@ -168,24 +205,29 @@ locale={ "ID":"№", "IDE":"IDE", "Image":"Образ", - "Image cannot be public and persistent":"Образ не может быть открытым и постоянным одновременно", "Image information":"Информация об образе", + "Image location":"", "Image name":"Название образа", "Images":"Образы ВМ", - "Images (total/public)":"Образы (всего/из них открытых)", "Image template":"Шаблон образа", + "Image updated correctly":"", "IM MAD":"Модуль средства мониторинга", "Info":"Информация", "information":" ", "Information":"Информация", "Information Manager":"Средство мониторинга", + "Infrastructure":"", + "Infrastructure resources":"", "Initrd":"initrd", "Inputs":"Устройства ввода", "Instantiate":"Создать экземпляр ВМ", "IP":"IP-адрес", "IP End":"до", + "IPs":"", "IP Start":"от", "IP to listen on":"IP-адрес для прослушивания", + "iSCSI":"", + "Italian":"", "Kernel":"Ядро", "Kernel commands":"Команды ядра", "Keyboard configuration locale to use in the VNC display":"Раскладка клавиатуры, используемая при работе с VNC-дисплеем", @@ -200,10 +242,17 @@ locale={ "Listen IP":"Прослушивание IP-адреса", "Live migrate":"Перенести запущенную ВМ", "Loading":"Идет загрузка", + "Loading new language... please wait":"Выполняется загрузка языковых файлов...", "MAC":"MAC-адрес", "Make non persistent":"Сделать непостоянным", "Make persistent":"Сделать постоянным", "Manage":"Управление", + "Manage cluster datastores":"", + "Manage cluster hosts":"", + "Manage cluster virtual networks":"", + "Manage unclustered datastores":"", + "Manage unclustered hosts":"", + "Manage unclustered virtual networks":"", "Manual":"Вручную", "Max Mem":"Доступно ОЗУ", "Memory":"Память", @@ -232,29 +281,31 @@ locale={ "Network is unreachable: is OpenNebula running?":"Сеть недоступна. Проверьте, запущена ли OpenNebula.", "Network mask":"Маска подсети", "Network Mask":"Маска подсети", + "Network mode":"", "Network reception":"Сеть: принято", "Network transmission":"Сеть: отправлено", "Network type":"Тип сети", - "New":"Создать новый ресурс", "+ New":"Создать", "+ New Group":"Создать группу", "New password":"Новый пароль", "No":"Нет", + "No datastores in this cluster":"", "No disk id or image name specified":"Внимание! Следует указать № диска или имя образа.", "No disks defined":"Дисков не обнаружено", + "No hosts in this cluster":"", "No leases to show":"Список пуст", "None":"Никакой", + "No virtual networks in this cluster":"", "Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.":"Количество виртуальных процессоров. Это значение опционально, используется поведение гипервизора по умолчанию - один виртуальный ЦП.", "OK":"OK", "Open VNC Session":"Открыть VNC-сессию", + "Open vSwitch":"", "Optional, please select":"Опционально, пожалуйста выберите", "OS":"ОС", "OS and Boot options":"Опции загрузки и ОС", "Other":"Все остальные", - "Other permissions":"Права для всех остальных", "Owned by group":"Принадлежит группе", "Owner":"Владелец", - "Owner permissions":"Права владельца", "PAE":"PAE", "Password":"Пароль", "Password for the VNC server":"Пароль для VNC сервера", @@ -263,7 +314,6 @@ locale={ "Path to the initrd image":"Путь к образу initrd", "Path to the original file that will be copied to the image repository. If not specified for a DATABLOCK type image, an empty image will be created.":"Путь к исходному файлу, который будет скопирован в хранилище образов. Если путь не указан для типа образа БЛОК ДАННЫХ, то будет создан пустой образ.", "Path to the OS kernel to boot the image":"Путь к ядру ОС для загрузки образа", - "Path vs. source":"Путь к файлу образа или источник", "Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.":"Процент процессорного времени ЦП, предоставляемого ВМ, разделенный на 100. Например, для выделения половины процессорного времени следует указать 0.5.", "Permissions":"Права", "Permits access to the VM only through the specified ports in the TCP protocol":"Разрешить доступ к ВМ только через указанные порты протокола TCP", @@ -274,6 +324,7 @@ locale={ "Physical device":"Устройство", "Placement":"Размещение", "Please choose":"Пожалуйста выберите", + "Please, choose and modify the datastore you want to update":"", "Please, choose and modify the image you want to update":"Выберите образ и внесите необходимые изменения в его параметры", "Please, choose and modify the template you want to update":"Выберите шаблон ВМ и внесите необходимые изменения в его параметры", "Please, choose and modify the virtual machine you want to update":"Выберите ВМ и внесите необходимые изменения в его параметры", @@ -281,9 +332,9 @@ locale={ "Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.":"«Путь к эталонному файлу образа» — образ создается путем копирования эталонного файла образа в хранилище образов. «Источник» — в данное поле следует указывать местоположение образа (в качестве образа будет использован ресурс, непосредственно указанный в поле «Источник», а не копия этого ресурса).", "Please choose the new type of authentication for the selected users":"Укажите новый способ аутентификации для выбранных пользователей", "Please provide a lease IP":"Необходимо указать IP-адрес", - "Please provide a network address":"Укажите адрес сети", "Please provide a resource ID for the resource(s) in this rule":"Необходимо указать № ресурса(ов) для данного правила)", "Please select":"выберите", + "Please select a datastore for this image":"", "Please select at least one resource":"Необходимо выбрать по меньшей мере один ресурс", "Please specify to who this ACL applies":"Необходимо указать, к кому применять данный список контроля", "Port":"Порт", @@ -293,18 +344,18 @@ locale={ "Predefined":"По умолчанию", "Prefix for the emulated device this image will be mounted at. For instance, “hd”, “sd”. If omitted, the default value is the one defined in oned.conf (installation default is “hd”).":"Префикс эмулируемого устройства, на которое будет смонтирован образ. Например, «hd» и «sd». Если не указать префикс, его значение будет считано из конфигурационного файла oned.conf (значение по умолчанию — «hd»).", "Previous action":"Предыдущее действие", + "Prolog time":"", "Provide a path":"Указать путь к эталонному файлу образа", "Provide a source":"Указать источник для образа", "PS2":"PS/2", "Public":"Public", - "Public scope of the image":"Область видимости образа", - "Publish":"Сделать открытым", "Quickstart":"Типовые операции", "Ranged network":"Диапазон адресов", "Rank":"Степень", "Raw":"Исходная опция", "Raw data to be passed directly to the hypervisor":"Исходные данные, передаваемые напрямую гипервизору", "Read only":"только на чтение", + "Reason":"", "Reboot":"Перезагрузить", "Refresh list":"Обновить список", "Register time":"Время регистрации", @@ -334,19 +385,26 @@ locale={ "Script":"Скрипт", "SCSI":"SCSI", "SDL":"SDL", + "Secure websockets connection":"", + "Select a datastore":"", "Select a network":"Выберите виртуальную сеть", "Select an image":"Выберите образ", "Select a template":"Выберите шаблон", "Select a VM":"Выберите вирт. машину", "Select boot method":"Выберите метод загрузки", + "Select cluster":"", "Select disk":"Выберите диск", "Select template":"Шаблон", + "Select the datastore for this image":"", + "Select the destination cluster:":"", "Select the new group":"Выберите новую группу", "Select the new owner":"Выберите нового владельца", + "Sequence":"", "Server (Cipher)":"Server (Cipher)", "Server (x509)":"Server (x509)", "Setup Networks":"Настройка сетей", "Shared":"Общий каталог", + "shared,ssh,iscsi,dummy":"", "Shutdown":"Выключить", "Sign out":"Выйти из сервиса", "Size":"Размер", @@ -363,14 +421,22 @@ locale={ "Start time":"Время запуска", "Start Time":"Время запуска", "State":"Состояние", + "State change time":"", "Status":"Статус", "Stop":"Остановить", + "style":"", "Submitted":"Выполнено", + "Summary of infrastructure resources":"", "Summary of resources":"Использование ресурсов", + "Summary of system resources":"", + "Summary of virtual resources":"", "Sunstone UI Configuration":"Конфигурация интерфейса Sunstone", "Support":"Сведения о поддержке", "Suspend":"Приостановить работу ВМ", "Swap":"Swap", + "System":"", + "System Resources":"", + "System resources management is only accesible to users of the oneadmin group. It comprises the operations regarding OpenNebula groups, users and ACLs.":"", "Tablet":"Планшетный ПК", "Target":"Цель", "Tcp black ports":"Запрещенные TCP-порты", @@ -380,11 +446,13 @@ locale={ "Template information":"Сведения о шаблоне", "Templates":"Шаблоны ВМ", "Template updated correctly":"Шаблон успешно обновлен", + "The Infrastructure menu allows management of Hosts, Datastores, Virtual Networks. Users in the oneadmin group can manage clusters as well.":"", "There are mandatory fields missing in the capacity section":"В разделе «Производительность» не заполнены некоторые обязательные поля", "There are mandatory fields missing in the OS Boot options section":"В разделе «Загрузка и тип ОС» не заполнены некоторые обязательные поля", "There are mandatory parameters missing":"Указаны не все обязательные параметры.", "There are mandatory parameters missing in this section":"В данном разделе указаны не все обязательные параметры", - "There is no more monitoring information for host":"Отсутствуют данные по мониторингу для узла", + "There are missing network parameters":"", + "The Virtual Resources menu allows management of Virtual Machine Templates, Instances and Images.":"", "This field sets which attribute will be used to sort the suitable hosts for this VM. Basically, it defines which hosts are more suitable than others":"В данном поле устанавливается значение атрибута, используемое для ранжирования узлов, пригодных для размещения ВМ. Значение атрибута определяет, какие из узлов лучше подходят для размещения ВМ.", "This rule applies to":"Область применения", "This will cancel selected VMs":"Прервать работу выбранных ВМ", @@ -402,12 +470,15 @@ locale={ "This will resume selected stopped or suspended VMs":"Возобновить работу выбранных остановленных или приостановленных ВМ", "This will send a reboot action to running VMs":"Отправить запущенным виртуальным машинам команду на перезагрузку", "This will suspend selected machines":"Приостановить выбранные ВМ", + "TM Mad":"", "TM MAD":"Модуль средства передачи", "total":"всего", "Total Leases":"Суммарное количество адресов", + "Total time":"", "Total VM count":"Количество виртуальных машин", "Total VM CPU":"Всего ЦП для ВМ", "Total VM Memory":"Всего ОЗУ для ВМ", + "Transfer manager":"", "Transfer Manager":"Средство передачи", "Type":"Тип", "Type of disk device to emulate.":"Тип эмулируемого дискового устройства", @@ -418,17 +489,18 @@ locale={ "Udp firewall mode":"Режим брандмауэра UDP", "Udp white ports":"Разрешенные UDP-порты", "Unauthorized":"Неавторизован", - "Unpublish":"Отменить статус «Открытый»", "Update":"Сохранить изменения", "Update a template":"Редактировать шаблон", + "Update Datastore properties":"", "Update image properties":"Редактировать свойства образа", - "Update image template":"Обновить шаблон образа", "Update network properties":"Обновить свойства виртуальной сети", - "Update network template":"Обновить шаблон виртуальной сети", "Update properties":"Редактировать свойства", "Update template":"Редактировать шаблон", "Update template properties":"Свойства шаблона", "Update VM properties":"Свойства ВМ", + "Upload":"", + "Upload file":"", + "Uploading...":"", "USB":"USB", "Use":"Пользование", "Used by VM":"Используется ВМ", @@ -440,9 +512,11 @@ locale={ "Used Mem (real)":"Использовано ОЗУ (реально)", "Useful for power management, for example, normally required for graceful shutdown to work":"Требуется для корректного завершения работы ВМ средствами системы виртуализации", "User":"Пользователь", + "User information":"", "Username":"Имя пользователя", "User name and password must be filled in":"Необходимо указать и имя пользователя, и пароль", "Users":"Пользователи", + "User template":"", "Value":"Значение", "Value of the context variable":"Значение контекстной переменной", "Value of the custom variable":"Значение пользовательской перменной", @@ -455,11 +529,12 @@ locale={ "Virtual Network":"Виртуальная сеть", "Virtual network information":"Информация о виртуальной сети", "Virtual Network information":"Информация о виртуальной сети", - "Virtual Network Manager":"Средство управления вирт. сетью", "Virtual Network name missing!":"Отсутствует название виртуальной сети!", "Virtual Networks":"Вирт. сети", - "Virtual Networks (total/public)":"Виртуальные сети (всего/из них открытых)", "Virtual Network template (attributes)":"Шаблон виртуальной сети (атрибуты)", + "Virtual Resources":"", + "VLAN":"", + "VLAN ID":"", "VM information":"Информация о ВМ", "VM Instance":"Экземпляр ВМ", "VM Instances":"Экземпляры ВМ", @@ -472,13 +547,12 @@ locale={ "VM template":"Шаблон ВМ", "VM Template":"Шаблон ВМ", "VM Templates":"Шаблоны ВМ", - "VM Templates (total/public)":"Шаблоны ВМ (всего/из них открытых)", + "VMware":"", "VNC":"VNC", "VNC Access":"Доступ по VNC", "VNC connection":"VNC соединение", "VNC Disabled":"VNC недоступно", "VNC Session":"VNC сессия", - "VNET ID":"VNET ID", "VN MAD":"Модуль средства управления вирт. сетью", "Welcome":"Текущий пользователь:", "Wizard":"Мастер настройки", @@ -493,21 +567,9 @@ locale={ "Xen templates must specify a boot method":"В шаблон Xen необходимо указывать метод загрузки", "yes":"да", "Yes":"Да", + "You can find further information on the following links:":"", + "You can use the wildcard %i. When creating several VMs, %i will be replaced with a different number starting from 0 in each of them":"", "You have not selected a template":"Вы не выбрали шаблон", "You have to confirm this action.":"Необходимо подтвердить данную операцию.", "You need to select something.":"Вы должны что-нибудь выбрать.", - - // ********************************* - "active":"активных", - "cpu_usage":"использование", - "error":"ошибки", - "Loading new language... please wait":"Выполняется загрузка языковых файлов...", - "max_cpu":"максимально", - "max_mem":"максимально", - "mem_usage":"использование", - "net_rx":"принято", - "net_tx":"отправлено", - "no":"нет", - "used_cpu":"использовано", - "used_mem":"использовано", }; From 226d404a6fcb572317a9928c09ff079083bc3005 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Thu, 29 Mar 2012 13:02:25 +0200 Subject: [PATCH 03/16] Bump version to 3.3.80 (release-3.4-beta1) --- include/Nebula.h | 4 +- share/man/econe-describe-images.1 | 2 +- share/man/econe-describe-instances.1 | 2 +- share/man/econe-register.1 | 2 +- share/man/econe-run-instances.1 | 2 +- share/man/econe-terminate-instances.1 | 2 +- share/man/econe-upload.1 | 2 +- share/man/occi-compute.1 | 2 +- share/man/occi-network.1 | 2 +- share/man/occi-storage.1 | 2 +- share/man/oneacl.1 | 4 +- share/man/onecluster.1 | 292 +++++++++++++++++++++++++ share/man/onedatastore.1 | 266 ++++++++++++++++++++++ share/man/onedb.1 | 2 +- share/man/onegroup.1 | 4 +- share/man/onehost.1 | 11 +- share/man/oneimage.1 | 6 +- share/man/onetemplate.1 | 4 +- share/man/oneuser.1 | 4 +- share/man/onevdc.1 | 21 +- share/man/onevm.1 | 4 +- share/man/onevnet.1 | 6 +- share/man/onezone.1 | 10 +- src/cli/one_helper.rb | 2 +- src/cloud/common/CloudClient.rb | 2 +- src/cloud/occi/lib/ui/views/index.erb | 2 +- src/ozones/Server/templates/index.html | 2 +- src/sunstone/views/index.erb | 2 +- 28 files changed, 622 insertions(+), 44 deletions(-) create mode 100644 share/man/onecluster.1 create mode 100644 share/man/onedatastore.1 diff --git a/include/Nebula.h b/include/Nebula.h index deee3fb633..41fabb9a7a 100644 --- a/include/Nebula.h +++ b/include/Nebula.h @@ -273,12 +273,12 @@ public: static string version() { - return "OpenNebula 3.3.0"; + return "OpenNebula 3.3.80"; }; static string db_version() { - return "3.3.0"; + return "3.3.80"; } void start(); diff --git a/share/man/econe-describe-images.1 b/share/man/econe-describe-images.1 index 4360e7d8b8..fcc6b5ec8c 100644 --- a/share/man/econe-describe-images.1 +++ b/share/man/econe-describe-images.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula econe-describe-images .SH SYNOPSIS diff --git a/share/man/econe-describe-instances.1 b/share/man/econe-describe-instances.1 index 5e0a490696..c30a1c7c0f 100644 --- a/share/man/econe-describe-instances.1 +++ b/share/man/econe-describe-instances.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula econe-describe-instances .SH SYNOPSIS diff --git a/share/man/econe-register.1 b/share/man/econe-register.1 index 5a2efa12b1..5ff6eafe27 100644 --- a/share/man/econe-register.1 +++ b/share/man/econe-register.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula econe-register .SH SYNOPSIS diff --git a/share/man/econe-run-instances.1 b/share/man/econe-run-instances.1 index b1b686439f..a34fcd875b 100644 --- a/share/man/econe-run-instances.1 +++ b/share/man/econe-run-instances.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula econe-run-instances .SH SYNOPSIS diff --git a/share/man/econe-terminate-instances.1 b/share/man/econe-terminate-instances.1 index 0bb112286f..9259791954 100644 --- a/share/man/econe-terminate-instances.1 +++ b/share/man/econe-terminate-instances.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula econe-terminate-instances .SH SYNOPSIS diff --git a/share/man/econe-upload.1 b/share/man/econe-upload.1 index 3b28a415d5..3404363225 100644 --- a/share/man/econe-upload.1 +++ b/share/man/econe-upload.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "September 2011" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "September 2011" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula econe-upload .SH SYNOPSIS diff --git a/share/man/occi-compute.1 b/share/man/occi-compute.1 index 8da520ee83..382416410e 100644 --- a/share/man/occi-compute.1 +++ b/share/man/occi-compute.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula occi-compute .SH SYNOPSIS diff --git a/share/man/occi-network.1 b/share/man/occi-network.1 index ab3414993a..598ee1f74b 100644 --- a/share/man/occi-network.1 +++ b/share/man/occi-network.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula occi-network .SH SYNOPSIS diff --git a/share/man/occi-storage.1 b/share/man/occi-storage.1 index 50f340f9ad..d4367a4b53 100644 --- a/share/man/occi-storage.1 +++ b/share/man/occi-storage.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. -.TH OPENNEBULA "1" "February 2012" "OpenNebula 3.3.0" "User Commands" +.TH OPENNEBULA "1" "March 2012" "OpenNebula 3.3.80" "User Commands" .SH NAME OpenNebula \- OpenNebula occi-storage .SH SYNOPSIS diff --git a/share/man/oneacl.1 b/share/man/oneacl.1 index 96215cf3b1..7f0d8e8647 100644 --- a/share/man/oneacl.1 +++ b/share/man/oneacl.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEACL" "1" "February 2012" "" "oneacl(1) -- manages OpenNebula ACLs" +.TH "ONEACL" "1" "March 2012" "" "oneacl(1) -- manages OpenNebula ACLs" . .SH "NAME" \fBoneacl\fR @@ -128,7 +128,7 @@ Comma\-separated list of OpenNebula ACL names or ids .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onecluster.1 b/share/man/onecluster.1 new file mode 100644 index 0000000000..ab6cbf45be --- /dev/null +++ b/share/man/onecluster.1 @@ -0,0 +1,292 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "ONECLUSTER" "1" "March 2012" "" "onecluster(1) -- manages OpenNebula clusters" +. +.SH "NAME" +\fBonecluster\fR +. +.SH "SYNOPSIS" +\fBonecluster\fR \fIcommand\fR [\fIargs\fR] [\fIoptions\fR] +. +.SH "OPTIONS" +. +.nf + + \-l, \-\-list x,y,z Selects columns to display with list command + \-d, \-\-delay x Sets the delay in seconds for top command + \-x, \-\-xml Show the resource in xml format + \-n, \-\-numeric Do not translate user and group IDs + \-v, \-\-verbose Verbose mode + \-h, \-\-help Show this message + \-V, \-\-version Show version and copyright information +. +.fi +. +.SH "COMMANDS" +. +.IP "\(bu" 4 +create \fIname\fR +. +.IP "" 4 +. +.nf + +Creates a new Cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +delete \fIrange|clusterid_list\fR +. +.IP "" 4 +. +.nf + +Deletes the given Cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +list +. +.IP "" 4 +. +.nf + +Lists Clusters in the pool +valid options: list, delay, xml, numeric +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +show \fIclusterid\fR +. +.IP "" 4 +. +.nf + +Shows information for the given Cluster +valid options: xml +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +addhost \fIclusterid\fR \fIhostid\fR +. +.IP "" 4 +. +.nf + +Adds a Host to the given Cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +delhost \fIclusterid\fR \fIhostid\fR +. +.IP "" 4 +. +.nf + +Deletes a Host from the given Cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +adddatastore \fIclusterid\fR \fIdatastoreid\fR +. +.IP "" 4 +. +.nf + +Adds a Datastore to the given Cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +deldatastore \fIclusterid\fR \fIdatastoreid\fR +. +.IP "" 4 +. +.nf + +Deletes a Datastore from the given Cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +addvnet \fIclusterid\fR \fIvnetid\fR +. +.IP "" 4 +. +.nf + +Adds a Virtual Network to the given Cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +delvnet \fIclusterid\fR \fIvnetid\fR +. +.IP "" 4 +. +.nf + +Deletes a Virtual Network from the given Cluster +. +.fi +. +.IP "" 0 + +. +.IP "" 0 +. +.SH "ARGUMENT FORMATS" +. +.IP "\(bu" 4 +file +. +.IP "" 4 +. +.nf + +Path to a file +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +range +. +.IP "" 4 +. +.nf + +List of id\'s in the form 1,8\.\.15 +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +text +. +.IP "" 4 +. +.nf + +String +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +clusterid +. +.IP "" 4 +. +.nf + +OpenNebula CLUSTER name or id +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +clusterid_list +. +.IP "" 4 +. +.nf + +Comma\-separated list of OpenNebula CLUSTER names or ids +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +vnetid +. +.IP "" 4 +. +.nf + +OpenNebula VNET name or id +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +hostid +. +.IP "" 4 +. +.nf + +OpenNebula HOST name or id +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +datastoreid +. +.IP "" 4 +. +.nf + +OpenNebula DATASTORE name or id +. +.fi +. +.IP "" 0 + +. +.IP "" 0 +. +.SH "LICENSE" +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +. +.P +Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onedatastore.1 b/share/man/onedatastore.1 new file mode 100644 index 0000000000..107c0bbf6b --- /dev/null +++ b/share/man/onedatastore.1 @@ -0,0 +1,266 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "ONEDATASTORE" "1" "March 2012" "" "onedatastore(1) -- manages OpenNebula datastores" +. +.SH "NAME" +\fBonedatastore\fR +. +.SH "SYNOPSIS" +\fBonedatastore\fR \fIcommand\fR [\fIargs\fR] [\fIoptions\fR] +. +.SH "OPTIONS" +. +.nf + + \-c, \-\-cluster id|name Selects the cluster + \-l, \-\-list x,y,z Selects columns to display with list command + \-d, \-\-delay x Sets the delay in seconds for top command + \-x, \-\-xml Show the resource in xml format + \-n, \-\-numeric Do not translate user and group IDs + \-v, \-\-verbose Verbose mode + \-h, \-\-help Show this message + \-V, \-\-version Show version and copyright information +. +.fi +. +.SH "COMMANDS" +. +.IP "\(bu" 4 +create \fIfile\fR +. +.IP "" 4 +. +.nf + +Creates a new Datastore from the given template file +valid options: cluster +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +delete \fIrange|datastoreid_list\fR +. +.IP "" 4 +. +.nf + +Deletes the given Datastore +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +chgrp \fIrange|datastoreid_list\fR \fIgroupid\fR +. +.IP "" 4 +. +.nf + +Changes the Datastore group +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +chown \fIrange|datastoreid_list\fR \fIuserid\fR [\fIgroupid\fR] +. +.IP "" 4 +. +.nf + +Changes the Datastore owner and group +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +chmod \fIrange|datastoreid_list\fR \fIoctet\fR +. +.IP "" 4 +. +.nf + +Changes the Datastore permissions +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +list +. +.IP "" 4 +. +.nf + +Lists Datastores in the pool +valid options: list, delay, xml, numeric +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +show \fIdatastoreid\fR +. +.IP "" 4 +. +.nf + +Shows information for the given Datastore +valid options: xml +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +update \fIdatastoreid\fR +. +.IP "" 4 +. +.nf + +Launches the system editor to modify and update the template contents +. +.fi +. +.IP "" 0 + +. +.IP "" 0 +. +.SH "ARGUMENT FORMATS" +. +.IP "\(bu" 4 +file +. +.IP "" 4 +. +.nf + +Path to a file +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +range +. +.IP "" 4 +. +.nf + +List of id\'s in the form 1,8\.\.15 +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +text +. +.IP "" 4 +. +.nf + +String +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +datastoreid +. +.IP "" 4 +. +.nf + +OpenNebula DATASTORE name or id +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +datastoreid_list +. +.IP "" 4 +. +.nf + +Comma\-separated list of OpenNebula DATASTORE names or ids +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +clusterid +. +.IP "" 4 +. +.nf + +OpenNebula CLUSTER name or id +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +groupid +. +.IP "" 4 +. +.nf + +OpenNebula GROUP name or id +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +userid +. +.IP "" 4 +. +.nf + +OpenNebula USER name or id +. +.fi +. +.IP "" 0 + +. +.IP "" 0 +. +.SH "LICENSE" +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +. +.P +Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onedb.1 b/share/man/onedb.1 index fc460471bd..8cb567a562 100644 --- a/share/man/onedb.1 +++ b/share/man/onedb.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEDB" "1" "February 2012" "" "onedb(1) -- OpenNebula database migration tool" +.TH "ONEDB" "1" "March 2012" "" "onedb(1) -- OpenNebula database migration tool" . .SH "NAME" \fBonedb\fR diff --git a/share/man/onegroup.1 b/share/man/onegroup.1 index a3c8f50f51..7430645366 100644 --- a/share/man/onegroup.1 +++ b/share/man/onegroup.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEGROUP" "1" "February 2012" "" "onegroup(1) -- manages OpenNebula groups" +.TH "ONEGROUP" "1" "March 2012" "" "onegroup(1) -- manages OpenNebula groups" . .SH "NAME" \fBonegroup\fR @@ -160,7 +160,7 @@ Comma\-separated list of OpenNebula GROUP names or ids .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onehost.1 b/share/man/onehost.1 index f73815a8ee..0b35222ea0 100644 --- a/share/man/onehost.1 +++ b/share/man/onehost.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEHOST" "1" "February 2012" "" "onehost(1) -- manages OpenNebula hosts" +.TH "ONEHOST" "1" "March 2012" "" "onehost(1) -- manages OpenNebula hosts" . .SH "NAME" \fBonehost\fR @@ -13,6 +13,10 @@ . .nf + \-i, \-\-im im_mad Set the information driver for the host + \-v, \-\-vm vmm_mad Set the virtualization driver for the host + \-n, \-\-net vnet_mad Set the network driver for the host + \-c, \-\-cluster id|name Selects the cluster \-l, \-\-list x,y,z Selects columns to display with list command \-d, \-\-delay x Sets the delay in seconds for top command \-x, \-\-xml Show the resource in xml format @@ -27,13 +31,14 @@ .SH "COMMANDS" . .IP "\(bu" 4 -create \fIhostname\fR \fIim_mad\fR \fIvmm_mad\fR \fItm_mad\fR \fIvnm_mad\fR +create \fIhostname\fR . .IP "" 4 . .nf Creates a new Host +valid options: im, vmm, vnm, cluster . .fi . @@ -234,7 +239,7 @@ Comma\-separated list of OpenNebula HOST names or ids .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/oneimage.1 b/share/man/oneimage.1 index e63e257858..fc39d0dc35 100644 --- a/share/man/oneimage.1 +++ b/share/man/oneimage.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEIMAGE" "1" "February 2012" "" "oneimage(1) -- manages OpenNebula images" +.TH "ONEIMAGE" "1" "March 2012" "" "oneimage(1) -- manages OpenNebula images" . .SH "NAME" \fBoneimage\fR @@ -13,6 +13,7 @@ . .nf + \-d, \-\-datastore id|name Selects the datastore \-l, \-\-list x,y,z Selects columns to display with list command \-d, \-\-delay x Sets the delay in seconds for top command \-x, \-\-xml Show the resource in xml format @@ -33,6 +34,7 @@ create \fIfile\fR .nf Creates a new Image from the given template file +valid options: datastore . .fi . @@ -381,7 +383,7 @@ user IMAGE of the user identified by the username .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onetemplate.1 b/share/man/onetemplate.1 index cca82c5d33..8e282b2b2d 100644 --- a/share/man/onetemplate.1 +++ b/share/man/onetemplate.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONETEMPLATE" "1" "February 2012" "" "onetemplate(1) -- manages OpenNebula templates" +.TH "ONETEMPLATE" "1" "March 2012" "" "onetemplate(1) -- manages OpenNebula templates" . .SH "NAME" \fBonetemplate\fR @@ -330,7 +330,7 @@ user VMTEMPLATE of the user identified by the username .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/oneuser.1 b/share/man/oneuser.1 index 12fb7016b8..7ed8ccf62b 100644 --- a/share/man/oneuser.1 +++ b/share/man/oneuser.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEUSER" "1" "February 2012" "" "oneuser(1) -- manages OpenNebula users" +.TH "ONEUSER" "1" "March 2012" "" "oneuser(1) -- manages OpenNebula users" . .SH "NAME" \fBoneuser\fR @@ -305,7 +305,7 @@ User password .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onevdc.1 b/share/man/onevdc.1 index acfe8524f9..3451d31435 100644 --- a/share/man/onevdc.1 +++ b/share/man/onevdc.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEVDC" "1" "February 2012" "" "onevdc(1) -- manages OpenNebula Virtual DataCenters" +.TH "ONEVDC" "1" "March 2012" "" "onevdc(1) -- manages OpenNebula Virtual DataCenters" . .SH "NAME" \fBonevdc\fR @@ -14,6 +14,10 @@ .nf \-f, \-\-force Force the usage of Hosts in more than one VDC + \-j, \-\-json Show the resource in JSON format + \-s, \-\-hosts 1,2,3 Host IDs + \-d, \-\-datastores 1,2,3 Datastore IDs + \-n, \-\-networks 1,2,3 Network IDs \-v, \-\-verbose Verbose mode \-h, \-\-help Show this message \-V, \-\-version Show version and copyright information @@ -45,6 +49,7 @@ show \fIvdcid\fR .nf Show information of a particular VDC +valid options: json . .fi . @@ -59,6 +64,7 @@ list .nf Lists VDCs in the pool +valid options: json . .fi . @@ -80,14 +86,14 @@ Deletes a VDC . .IP "\(bu" 4 -addhost \fIvdcid\fR \fIrange\fR +add \fIvdcid\fR . .IP "" 4 . .nf -Adds the set of hosts to the VDC -valid options: force +Adds the set of resources to the VDC +valid options: force, hosts, datastores, networks . .fi . @@ -95,13 +101,14 @@ valid options: force . .IP "\(bu" 4 -delhost \fIvdcid\fR \fIrange\fR +del \fIvdcid\fR . .IP "" 4 . .nf -Deletes the set of hosts from the VDC +Deletes the set of resources from the VDC +valid options: hosts, datastores, networks . .fi . @@ -171,7 +178,7 @@ VDC ID .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onevm.1 b/share/man/onevm.1 index 3798929421..eed0e1bbd9 100644 --- a/share/man/onevm.1 +++ b/share/man/onevm.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEVM" "1" "February 2012" "" "onevm(1) -- manages OpenNebula virtual machines" +.TH "ONEVM" "1" "March 2012" "" "onevm(1) -- manages OpenNebula virtual machines" . .SH "NAME" \fBonevm\fR @@ -526,7 +526,7 @@ user VM of the user identified by the username .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onevnet.1 b/share/man/onevnet.1 index 3e155b169f..8c3abf3ced 100644 --- a/share/man/onevnet.1 +++ b/share/man/onevnet.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEVNET" "1" "February 2012" "" "onevnet(1) -- manages OpenNebula networks" +.TH "ONEVNET" "1" "March 2012" "" "onevnet(1) -- manages OpenNebula networks" . .SH "NAME" \fBonevnet\fR @@ -13,6 +13,7 @@ . .nf + \-c, \-\-cluster id|name Selects the cluster \-l, \-\-list x,y,z Selects columns to display with list command \-d, \-\-delay x Sets the delay in seconds for top command \-x, \-\-xml Show the resource in xml format @@ -34,6 +35,7 @@ create \fIfile\fR .nf Creates a new Virtual Network from the given template file +valid options: cluster . .fi . @@ -351,7 +353,7 @@ user VNET of the user identified by the username .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/share/man/onezone.1 b/share/man/onezone.1 index ebcfe58c9c..2387747986 100644 --- a/share/man/onezone.1 +++ b/share/man/onezone.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "ONEZONE" "1" "February 2012" "" "onezone(1) -- manages OpenNebula zones" +.TH "ONEZONE" "1" "March 2012" "" "onezone(1) -- manages OpenNebula zones" . .SH "NAME" \fBonezone\fR @@ -13,6 +13,7 @@ . .nf + \-j, \-\-json Show the resource in JSON format \-v, \-\-verbose Verbose mode \-h, \-\-help Show this message \-V, \-\-version Show version and copyright information @@ -43,10 +44,12 @@ show \fIzoneid\fR [\fIresource\fR] .nf Show information of a particular Zone -Available resources: host, vm, image, vnet, vmtemplate, user +Available resources: host, vm, image, vnet, vmtemplate, + user, cluster, datastore Examples: onezone show 4 onezone show 4 host +valid options: json . .fi . @@ -61,6 +64,7 @@ list .nf Lists Zones in the pool +valid options: json . .fi . @@ -144,7 +148,7 @@ Zone ID .IP "" 0 . .SH "LICENSE" -OpenNebula 3\.3\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +OpenNebula 3\.3\.80 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) . .P Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 diff --git a/src/cli/one_helper.rb b/src/cli/one_helper.rb index 50cc513fc1..257a77d128 100644 --- a/src/cli/one_helper.rb +++ b/src/cli/one_helper.rb @@ -21,7 +21,7 @@ include OpenNebula module OpenNebulaHelper ONE_VERSION=<<-EOT -OpenNebula 3.3.0 +OpenNebula 3.3.80 Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/src/cloud/common/CloudClient.rb b/src/cloud/common/CloudClient.rb index a6006b66dd..e2c360e3ca 100644 --- a/src/cloud/common/CloudClient.rb +++ b/src/cloud/common/CloudClient.rb @@ -181,7 +181,7 @@ module CloudCLI def version_text version=< diff --git a/src/ozones/Server/templates/index.html b/src/ozones/Server/templates/index.html index f6d034a4cf..94797a67f8 100644 --- a/src/ozones/Server/templates/index.html +++ b/src/ozones/Server/templates/index.html @@ -60,7 +60,7 @@ diff --git a/src/sunstone/views/index.erb b/src/sunstone/views/index.erb index a2ad30582d..b481adc66f 100644 --- a/src/sunstone/views/index.erb +++ b/src/sunstone/views/index.erb @@ -85,7 +85,7 @@ From ee2c1704fd823372da50035315f8fe0c2bc32e1e Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Thu, 29 Mar 2012 13:42:49 +0200 Subject: [PATCH 04/16] Fixed bug: using qemu-img convert instead of mv for tm/shared --- src/tm_mad/shared/mvds | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tm_mad/shared/mvds b/src/tm_mad/shared/mvds index b44d724c41..72518d5d41 100755 --- a/src/tm_mad/shared/mvds +++ b/src/tm_mad/shared/mvds @@ -56,8 +56,7 @@ DST_READLN=\$($READLINK -f $DST_PATH) if [ \( -L $SRC \) -a \( "\$SRC_READLN" = "\$DST_READLN" \) ] ; then echo "Not moving files to image repo, they are the same" else - qemu-img convert $SRC_PATH -O qcow2 $DST_PATH - rm $SRC_PATH + mv -f $SRC_PATH $DST_PATH fi EOF ) From 576e406974152ca242c138ea214c655e32d5e8f1 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 29 Mar 2012 16:57:45 +0200 Subject: [PATCH 05/16] compress onecluster and onedatastore man pages --- share/man/SConstruct | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/SConstruct b/share/man/SConstruct index 774287fd50..6ca1ff5aee 100644 --- a/share/man/SConstruct +++ b/share/man/SConstruct @@ -35,6 +35,8 @@ env.Man('occi-network') env.Man('occi-storage') env.Man('oneacl') env.Man('oneauth') +env.Man('onecluster') +env.Man('onedatastore') env.Man('onedb') env.Man('onehost') env.Man('oneimage') From 049312a809ce313d302f15d70042dbef5b87e425 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Thu, 29 Mar 2012 18:02:07 +0200 Subject: [PATCH 06/16] Fix bug in tm_mad/shared/mvds (cherry picked from commit c2ae9820c41da17602d48f9f7f08d0b0dd50a361) --- src/tm_mad/shared/mvds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tm_mad/shared/mvds b/src/tm_mad/shared/mvds index 72518d5d41..94a8214662 100755 --- a/src/tm_mad/shared/mvds +++ b/src/tm_mad/shared/mvds @@ -53,7 +53,7 @@ umask 0007 SRC_READLN=\$($READLINK -f $SRC_PATH) DST_READLN=\$($READLINK -f $DST_PATH) -if [ \( -L $SRC \) -a \( "\$SRC_READLN" = "\$DST_READLN" \) ] ; then +if [ \( -L $SRC_PATH \) -a \( "\$SRC_READLN" = "\$DST_READLN" \) ] ; then echo "Not moving files to image repo, they are the same" else mv -f $SRC_PATH $DST_PATH From cddff25577c87e738c8357401170a79902664dd6 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Thu, 29 Mar 2012 18:58:56 +0200 Subject: [PATCH 07/16] feature #1183: Add client tools for ElaticIP --- install.sh | 10 ++ src/cloud/ec2/bin/econe-allocate-address | 125 +++++++++++++++++ src/cloud/ec2/bin/econe-associate-address | 135 +++++++++++++++++++ src/cloud/ec2/bin/econe-describe-addresses | 133 ++++++++++++++++++ src/cloud/ec2/bin/econe-disassociate-address | 128 ++++++++++++++++++ src/cloud/ec2/bin/econe-release-address | 128 ++++++++++++++++++ src/cloud/ec2/lib/EC2QueryClient.rb | 69 ++++++++++ 7 files changed, 728 insertions(+) create mode 100755 src/cloud/ec2/bin/econe-allocate-address create mode 100755 src/cloud/ec2/bin/econe-associate-address create mode 100755 src/cloud/ec2/bin/econe-describe-addresses create mode 100755 src/cloud/ec2/bin/econe-disassociate-address create mode 100755 src/cloud/ec2/bin/econe-release-address diff --git a/install.sh b/install.sh index 55726b6566..7e344aa880 100755 --- a/install.sh +++ b/install.sh @@ -1033,6 +1033,11 @@ ECO_BIN_FILES="src/cloud/ec2/bin/econe-server \ src/cloud/ec2/bin/econe-register \ src/cloud/ec2/bin/econe-run-instances \ src/cloud/ec2/bin/econe-terminate-instances \ + src/cloud/ec2/bin/econe-describe-addresses \ + src/cloud/ec2/bin/econe-allocate-address \ + src/cloud/ec2/bin/econe-release-address \ + src/cloud/ec2/bin/econe-associate-address \ + src/cloud/ec2/bin/econe-disassociate-address \ src/cloud/ec2/bin/econe-upload" ECO_BIN_CLIENT_FILES="src/cloud/ec2/bin/econe-describe-images \ @@ -1040,6 +1045,11 @@ ECO_BIN_CLIENT_FILES="src/cloud/ec2/bin/econe-describe-images \ src/cloud/ec2/bin/econe-register \ src/cloud/ec2/bin/econe-run-instances \ src/cloud/ec2/bin/econe-terminate-instances \ + src/cloud/ec2/bin/econe-describe-addresses \ + src/cloud/ec2/bin/econe-allocate-address \ + src/cloud/ec2/bin/econe-release-address \ + src/cloud/ec2/bin/econe-associate-address \ + src/cloud/ec2/bin/econe-disassociate-address \ src/cloud/ec2/bin/econe-upload" ECO_ETC_FILES="src/cloud/ec2/etc/econe.conf" diff --git a/src/cloud/ec2/bin/econe-allocate-address b/src/cloud/ec2/bin/econe-allocate-address new file mode 100755 index 0000000000..a42ac55a53 --- /dev/null +++ b/src/cloud/ec2/bin/econe-allocate-address @@ -0,0 +1,125 @@ +#!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +ONE_LOCATION=ENV["ONE_LOCATION"] + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" +end + + +$: << RUBY_LIB_LOCATION +$: << RUBY_LIB_LOCATION+"/cloud" + +COMMANDS_HELP=<<-EOT +econe-describe-images + +Allocate a new elastic IP address for the user + +Usage: + econe-allocate-address [OPTIONS] + +Options: + --help, -h + Show help + + --access-key , -K + The username of the user + + --secret-key , -S + The password of the user + + --url , -U + Set url as the web service url to use + + --headers, -H + Display column headers + +EOT + +require 'econe/EC2QueryClient' +require 'CloudClient' +require 'getoptlong' + +include CloudCLI + + +opts = GetoptLong.new( + ['--help', '-h',GetoptLong::NO_ARGUMENT], + ['--version', '-v',GetoptLong::NO_ARGUMENT], + ['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT], + ['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT], + ['--url', '-U',GetoptLong::REQUIRED_ARGUMENT], + ['--headers', '-H',GetoptLong::NO_ARGUMENT] + ) + +headers = false +url = nil +access = nil +secret = nil +auth = nil + +begin + opts.each do |opt, arg| + case opt + when '--help' + puts COMMANDS_HELP + return + when '--version' + puts CloudCLI.version_text + exit 0 + when '--access-key' + access = arg + when '--secret-key' + secret = arg + when '--url' + url = arg + when '--headers' + headers = true + end + end +rescue Exception => e + exit -1 +end + +auth = "#{access}:#{secret}" if secret && access + +begin + ec2_client = EC2QueryClient::Client.new(auth,url) +rescue Exception => e + puts "#{cmd_name}: #{e.message}" + exit -1 +end + +addr = ec2_client.allocate_address + +if CloudClient::is_error?(addr) + puts "#{cmd_name}: #{addr.message}" + exit -1 +end + +if headers + puts "publicIP" + puts "------------------------------------------------------------------------------" +end + +puts addr['publicIP'] + +exit 0 + diff --git a/src/cloud/ec2/bin/econe-associate-address b/src/cloud/ec2/bin/econe-associate-address new file mode 100755 index 0000000000..14bbcb3271 --- /dev/null +++ b/src/cloud/ec2/bin/econe-associate-address @@ -0,0 +1,135 @@ +#!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +ONE_LOCATION=ENV["ONE_LOCATION"] + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" +end + + +$: << RUBY_LIB_LOCATION +$: << RUBY_LIB_LOCATION+"/cloud" + +COMMANDS_HELP=<<-EOT +econe-associate-address + +Associate a publicIP of the user with a given instance + +Usage: + econe-associate-address [OPTIONS] PUBLIC-IP INSTANCE-ID + +Options: + + --help, -h + Show help + + --access-key , -K + The username of the user + + --secret-key , -S + The password of the user + + --url , -U + Set url as the web service url to use + + --headers, -H + Display column headers + +PUBLIC-IP: ElasticIP owned by the user. To see the list of ips use econe-describe-addresses +INSTANCE-ID: Id of the instance to be associated with the ElasticIP + +EOT + +require 'econe/EC2QueryClient' +require 'CloudClient' +require 'getoptlong' + +include CloudCLI + +opts = GetoptLong.new( + ['--help', '-h',GetoptLong::NO_ARGUMENT], + ['--version', '-v',GetoptLong::NO_ARGUMENT], + ['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT], + ['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT], + ['--url', '-U',GetoptLong::REQUIRED_ARGUMENT], + ['--type', '-t',GetoptLong::REQUIRED_ARGUMENT], + ['--user-data', '-d',GetoptLong::REQUIRED_ARGUMENT], + ['--headers', '-H',GetoptLong::NO_ARGUMENT] + ) + +headers = false +url = nil +access = nil +secret = nil +auth = nil + +begin + opts.each do |opt, arg| + case opt + when '--help' + puts COMMANDS_HELP + return + when '--version' + puts CloudCLI.version_text + exit 0 + when '--access-key' + access = arg + when '--secret-key' + secret = arg + when '--url' + url = arg + when '--headers' + headers = true + end + end +rescue Exception => e + exit -1 +end + +public_ip = ARGV.shift +instance_id = ARGV.shift + +if !public_ip + puts "#{cmd_name}: missing publicIP parameter" + exit -1 +end + +if !instance_id + puts "#{cmd_name}: missing instanceID parameter" + exit -1 +end + +auth = "#{access}:#{secret}" if secret && access + +begin + ec2_client = EC2QueryClient::Client.new(auth,url) +rescue Exception => e + puts "#{cmd_name}: #{e.message}" + exit -1 +end + +rc = ec2_client.associate_address(public_ip, instance_id) + +if CloudClient::is_error?(rc) + puts "#{cmd_name}: #{rc.message}" + exit -1 +end + +exit 0 diff --git a/src/cloud/ec2/bin/econe-describe-addresses b/src/cloud/ec2/bin/econe-describe-addresses new file mode 100755 index 0000000000..c74e0e584e --- /dev/null +++ b/src/cloud/ec2/bin/econe-describe-addresses @@ -0,0 +1,133 @@ +#!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +ONE_LOCATION=ENV["ONE_LOCATION"] + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" +end + + +$: << RUBY_LIB_LOCATION +$: << RUBY_LIB_LOCATION+"/cloud" + +COMMANDS_HELP=<<-EOT +econe-describe-images + +List elastic IP addresses + +Usage: + econe-describe-addresses [OPTIONS] + +Options: + --help, -h + Show help + + --access-key , -K + The username of the user + + --secret-key , -S + The password of the user + + --url , -U + Set url as the web service url to use + + --headers, -H + Display column headers + +EOT + +require 'econe/EC2QueryClient' +require 'CloudClient' +require 'getoptlong' + +include CloudCLI + + +opts = GetoptLong.new( + ['--help', '-h',GetoptLong::NO_ARGUMENT], + ['--version', '-v',GetoptLong::NO_ARGUMENT], + ['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT], + ['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT], + ['--url', '-U',GetoptLong::REQUIRED_ARGUMENT], + ['--headers', '-H',GetoptLong::NO_ARGUMENT] + ) + +headers = false +url = nil +access = nil +secret = nil +auth = nil + +begin + opts.each do |opt, arg| + case opt + when '--help' + puts COMMANDS_HELP + return + when '--version' + puts CloudCLI.version_text + exit 0 + when '--access-key' + access = arg + when '--secret-key' + secret = arg + when '--url' + url = arg + when '--headers' + headers = true + end + end +rescue Exception => e + exit -1 +end + +auth = "#{access}:#{secret}" if secret && access + +begin + ec2_client = EC2QueryClient::Client.new(auth,url) +rescue Exception => e + puts "#{cmd_name}: #{e.message}" + exit -1 +end + +rc = ec2_client.describe_addresses + +if CloudClient::is_error?(rc) + puts "#{cmd_name}: #{rc.message}" + exit -1 +end + +addresses = rc['addressesSet']['item'] + +fmt = "%-12s %s" + +if headers + puts fmt % ["publicIP", "instanceId"] + puts "------------------------------------------------------------------------------" +end + +if addresses + addresses.each { |addr| + puts fmt % [addr['publicIP'],addr['instanceID']] + } +end + +exit 0 + diff --git a/src/cloud/ec2/bin/econe-disassociate-address b/src/cloud/ec2/bin/econe-disassociate-address new file mode 100755 index 0000000000..1bd0c66965 --- /dev/null +++ b/src/cloud/ec2/bin/econe-disassociate-address @@ -0,0 +1,128 @@ +#!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +ONE_LOCATION=ENV["ONE_LOCATION"] + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" +end + + +$: << RUBY_LIB_LOCATION +$: << RUBY_LIB_LOCATION+"/cloud" + +COMMANDS_HELP=<<-EOT +econe-disasociate-address + +Disasociate a publicIP of the user currently associated with an instance + +Usage: + econe-disasociate-address [OPTIONS] PUBLIC-IP + +Options: + + --help, -h + Show help + + --access-key , -K + The username of the user + + --secret-key , -S + The password of the user + + --url , -U + Set url as the web service url to use + + --headers, -H + Display column headers + +PUBLIC-IP: ElasticIP owned by the user. To see the list of ips use econe-describe-addresses + +EOT + +require 'econe/EC2QueryClient' +require 'CloudClient' +require 'getoptlong' + +include CloudCLI + +opts = GetoptLong.new( + ['--help', '-h',GetoptLong::NO_ARGUMENT], + ['--version', '-v',GetoptLong::NO_ARGUMENT], + ['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT], + ['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT], + ['--url', '-U',GetoptLong::REQUIRED_ARGUMENT], + ['--type', '-t',GetoptLong::REQUIRED_ARGUMENT], + ['--user-data', '-d',GetoptLong::REQUIRED_ARGUMENT], + ['--headers', '-H',GetoptLong::NO_ARGUMENT] + ) + +headers = false +url = nil +access = nil +secret = nil +auth = nil + +begin + opts.each do |opt, arg| + case opt + when '--help' + puts COMMANDS_HELP + return + when '--version' + puts CloudCLI.version_text + exit 0 + when '--access-key' + access = arg + when '--secret-key' + secret = arg + when '--url' + url = arg + when '--headers' + headers = true + end + end +rescue Exception => e + exit -1 +end + +public_ip = ARGV.shift + +if !public_ip + puts "#{cmd_name}: missing publicIP parameter" + exit -1 +end + +auth = "#{access}:#{secret}" if secret && access + +begin + ec2_client = EC2QueryClient::Client.new(auth,url) +rescue Exception => e + puts "#{cmd_name}: #{e.message}" + exit -1 +end + +rc = ec2_client.disassociate_address(public_ip) + +if CloudClient::is_error?(rc) + puts "#{cmd_name}: #{rc.message}" + exit -1 +end + +exit 0 diff --git a/src/cloud/ec2/bin/econe-release-address b/src/cloud/ec2/bin/econe-release-address new file mode 100755 index 0000000000..c344db0135 --- /dev/null +++ b/src/cloud/ec2/bin/econe-release-address @@ -0,0 +1,128 @@ +#!/usr/bin/env ruby +# -------------------------------------------------------------------------- # +# Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +ONE_LOCATION=ENV["ONE_LOCATION"] + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" +end + + +$: << RUBY_LIB_LOCATION +$: << RUBY_LIB_LOCATION+"/cloud" + +COMMANDS_HELP=<<-EOT +econe-release-address + +Release a publicIP of the user + +Usage: + econe-release-address [OPTIONS] PUBLIC-IP + +Options: + + --help, -h + Show help + + --access-key , -K + The username of the user + + --secret-key , -S + The password of the user + + --url , -U + Set url as the web service url to use + + --headers, -H + Display column headers + +PUBLIC-IP: ElasticIP owned by the user. To see the list of ips use econe-describe-addresses + +EOT + +require 'econe/EC2QueryClient' +require 'CloudClient' +require 'getoptlong' + +include CloudCLI + +opts = GetoptLong.new( + ['--help', '-h',GetoptLong::NO_ARGUMENT], + ['--version', '-v',GetoptLong::NO_ARGUMENT], + ['--access-key', '-K',GetoptLong::REQUIRED_ARGUMENT], + ['--secret-key', '-S',GetoptLong::REQUIRED_ARGUMENT], + ['--url', '-U',GetoptLong::REQUIRED_ARGUMENT], + ['--type', '-t',GetoptLong::REQUIRED_ARGUMENT], + ['--user-data', '-d',GetoptLong::REQUIRED_ARGUMENT], + ['--headers', '-H',GetoptLong::NO_ARGUMENT] + ) + +headers = false +url = nil +access = nil +secret = nil +auth = nil + +begin + opts.each do |opt, arg| + case opt + when '--help' + puts COMMANDS_HELP + return + when '--version' + puts CloudCLI.version_text + exit 0 + when '--access-key' + access = arg + when '--secret-key' + secret = arg + when '--url' + url = arg + when '--headers' + headers = true + end + end +rescue Exception => e + exit -1 +end + +public_ip = ARGV.shift + +if !public_ip + puts "#{cmd_name}: missing publicIP parameter" + exit -1 +end + +auth = "#{access}:#{secret}" if secret && access + +begin + ec2_client = EC2QueryClient::Client.new(auth,url) +rescue Exception => e + puts "#{cmd_name}: #{e.message}" + exit -1 +end + +rc = ec2_client.release_address(public_ip) + +if CloudClient::is_error?(rc) + puts "#{cmd_name}: #{rc.message}" + exit -1 +end + +exit 0 diff --git a/src/cloud/ec2/lib/EC2QueryClient.rb b/src/cloud/ec2/lib/EC2QueryClient.rb index b80c44ecd8..b2e3bcd875 100644 --- a/src/cloud/ec2/lib/EC2QueryClient.rb +++ b/src/cloud/ec2/lib/EC2QueryClient.rb @@ -237,5 +237,74 @@ module EC2QueryClient return response end + + ###################################################################### + ###################################################################### + def describe_addresses() + begin + response = @ec2_connection.describe_addresses + rescue Exception => e + error = CloudClient::Error.new(e.message) + return error + end + + return response + end + + ###################################################################### + ###################################################################### + def allocate_address() + begin + response = @ec2_connection.allocate_address + rescue Exception => e + error = CloudClient::Error.new(e.message) + return error + end + + return response + end + + ###################################################################### + ###################################################################### + def associate_address(public_ip, instance_id) + begin + response = @ec2_connection.associate_address( + :public_ip => public_ip, + :instance_id => instance_id) + rescue Exception => e + error = CloudClient::Error.new(e.message) + return error + end + + return response + end + + ###################################################################### + ###################################################################### + def disassociate_address(public_ip) + begin + response = @ec2_connection.disassociate_address( + :public_ip => public_ip) + rescue Exception => e + error = CloudClient::Error.new(e.message) + return error + end + + return response + end + + ###################################################################### + ###################################################################### + def release_address(public_ip) + begin + response = @ec2_connection.release_address( + :public_ip => public_ip) + rescue Exception => e + error = CloudClient::Error.new(e.message) + return error + end + + return response + end end end From 2ca77fb8450a4a191ec9c0776d716a10cf7f9bf9 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 29 Mar 2012 19:17:30 +0200 Subject: [PATCH 08/16] bug: Fix deadlock when deleting the same object multiple times --- src/image/ImageManagerActions.cc | 1 + src/pool/PoolSQL.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/image/ImageManagerActions.cc b/src/image/ImageManagerActions.cc index ad1b8e2627..58f41d3d33 100644 --- a/src/image/ImageManagerActions.cc +++ b/src/image/ImageManagerActions.cc @@ -296,6 +296,7 @@ int ImageManager::delete_image(int iid, const string& ds_data) if ( imd == 0 ) { + img->unlock(); return -1; } diff --git a/src/pool/PoolSQL.cc b/src/pool/PoolSQL.cc index 0d167e2d4f..12835f7cc6 100644 --- a/src/pool/PoolSQL.cc +++ b/src/pool/PoolSQL.cc @@ -187,6 +187,7 @@ PoolObjectSQL * PoolSQL::get( if ( objectsql->isValid() == false ) { + objectsql->unlock(); objectsql = 0; } } @@ -276,7 +277,6 @@ PoolObjectSQL * PoolSQL::get(const string& name, int ouid, bool olock) if ( objectsql->isValid() == false ) { objectsql->unlock(); - objectsql = 0; } } From 8d6ac3d695eb517f151867df85b7d1533fdf4adf Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Thu, 29 Mar 2012 19:23:43 +0200 Subject: [PATCH 09/16] Missing AggrefatedClusters and AggregatedDatastores ruby files (cherry picked from commit 280dcb0cace266069ff53f19a53f38c51b959cd0) --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index 5e5039cdc3..b046b2da3b 100755 --- a/install.sh +++ b/install.sh @@ -1313,6 +1313,8 @@ OZONES_LIB_ZONE_FILES="src/ozones/Server/lib/OZones/Zones.rb \ src/ozones/Server/lib/OZones/AggregatedVirtualNetworks.rb \ src/ozones/Server/lib/OZones/AggregatedPool.rb \ src/ozones/Server/lib/OZones/AggregatedImages.rb \ + src/ozones/Server/lib/OZones/AggregatedDatastores.rb \ + src/ozones/Server/lib/OZones/AggregatedClusters.rb \ src/ozones/Server/lib/OZones/AggregatedTemplates.rb" OZONES_LIB_API_FILES="src/ozones/Client/lib/zona.rb" From b4de0b1c145676a9bab25a5b267a26267d270681 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Thu, 29 Mar 2012 19:34:17 +0200 Subject: [PATCH 10/16] Add missing requires to OZones library --- src/ozones/Server/lib/OZones.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ozones/Server/lib/OZones.rb b/src/ozones/Server/lib/OZones.rb index ef23523154..cd44f87203 100644 --- a/src/ozones/Server/lib/OZones.rb +++ b/src/ozones/Server/lib/OZones.rb @@ -26,6 +26,8 @@ require 'OZones/AggregatedVirtualMachines' require 'OZones/AggregatedVirtualNetworks' require 'OZones/AggregatedImages' require 'OZones/AggregatedUsers' +require 'OZones/AggregatedClusters' +require 'OZones/AggregatedDatastores' require 'OZones/AggregatedTemplates' require 'openssl' @@ -71,4 +73,4 @@ module OZones def self.str_to_json(str) return JSON.pretty_generate({:message => str}) end -end \ No newline at end of file +end From 88a97000f160385e14cb29a567e7e3a33b712063 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 29 Mar 2012 19:37:53 +0200 Subject: [PATCH 11/16] Ozones: Fix typo and missing requires for aggregated resources. (cherry picked from commit 4b4571d3b5757cc782876561c65cbb0434869cd6) --- src/ozones/Server/lib/OZones.rb | 2 ++ src/ozones/Server/lib/OZones/Zones.rb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ozones/Server/lib/OZones.rb b/src/ozones/Server/lib/OZones.rb index cd44f87203..d0313ea7d9 100644 --- a/src/ozones/Server/lib/OZones.rb +++ b/src/ozones/Server/lib/OZones.rb @@ -29,6 +29,8 @@ require 'OZones/AggregatedUsers' require 'OZones/AggregatedClusters' require 'OZones/AggregatedDatastores' require 'OZones/AggregatedTemplates' +require 'OZones/AggregatedClusters' +require 'OZones/AggregatedDatastores' require 'openssl' require 'digest/sha1' diff --git a/src/ozones/Server/lib/OZones/Zones.rb b/src/ozones/Server/lib/OZones/Zones.rb index 4ec6fac7bd..95300c0d0d 100644 --- a/src/ozones/Server/lib/OZones/Zones.rb +++ b/src/ozones/Server/lib/OZones/Zones.rb @@ -219,9 +219,9 @@ module OZones when "template","vmtemplate" then OZones::AggregatedTemplates.new when "cluster" then - OZones::AggregatedCluster.new + OZones::AggregatedClusters.new when "datastore" then - OZones::AggregatedDatastore.new + OZones::AggregatedDatastores.new else error = OZones::Error.new("Error: Pool #{pool_kind} not" \ " supported for aggregated zone view") From 8984b1fbb5e6d5e0126bb98714573caaab9cdae5 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 29 Mar 2012 19:48:24 +0200 Subject: [PATCH 12/16] Fix wrong merge --- src/ozones/Server/lib/OZones.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ozones/Server/lib/OZones.rb b/src/ozones/Server/lib/OZones.rb index d0313ea7d9..cd44f87203 100644 --- a/src/ozones/Server/lib/OZones.rb +++ b/src/ozones/Server/lib/OZones.rb @@ -29,8 +29,6 @@ require 'OZones/AggregatedUsers' require 'OZones/AggregatedClusters' require 'OZones/AggregatedDatastores' require 'OZones/AggregatedTemplates' -require 'OZones/AggregatedClusters' -require 'OZones/AggregatedDatastores' require 'openssl' require 'digest/sha1' From c4a2ba6dd51f828023bb327a3bda601dca763901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 30 Mar 2012 12:36:42 +0200 Subject: [PATCH 13/16] Bug #1192: Fix xpath in Datastore::contains (cherry picked from commit b4862532e15c9c36389c9ff533f77bc3ffdcadab) --- src/oca/ruby/OpenNebula/Datastore.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oca/ruby/OpenNebula/Datastore.rb b/src/oca/ruby/OpenNebula/Datastore.rb index 6dbb10b1f4..355d252c9a 100644 --- a/src/oca/ruby/OpenNebula/Datastore.rb +++ b/src/oca/ruby/OpenNebula/Datastore.rb @@ -129,7 +129,7 @@ module OpenNebula #This doesn't work in ruby 1.8.5 #return self["DATASTORE/ID[.=#{uid}]"] != nil - id_array = retrieve_elements('DATASTORE/ID') + id_array = retrieve_elements('IMAGES/ID') return id_array != nil && id_array.include?(uid.to_s) end From 5bbc54d250948a471356f504cb41a177907b6b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 30 Mar 2012 12:40:44 +0200 Subject: [PATCH 14/16] Update Java OCA to 3.4 API (cherry picked from commit becb3da61edbe3f0b4e56bfb91a00dcdf9aab983) --- src/oca/java/build.sh | 6 + .../org/opennebula/client/PoolElement.java | 20 +- .../src/org/opennebula/client/acl/Acl.java | 2 + .../opennebula/client/cluster/Cluster.java | 321 ++++++++++++++++ .../client/cluster/ClusterPool.java | 103 +++++ .../client/datastore/Datastore.java | 357 ++++++++++++++++++ .../client/datastore/DatastorePool.java | 103 +++++ .../src/org/opennebula/client/host/Host.java | 83 ++-- .../org/opennebula/client/image/Image.java | 82 ++-- .../opennebula/client/vm/VirtualMachine.java | 17 +- .../client/vnet/VirtualNetwork.java | 73 ++-- src/oca/java/test/HostTest.java | 4 +- src/oca/java/test/VirtualMachineTest.java | 11 +- src/oca/java/test/VirtualNetworkTest.java | 25 +- src/oca/java/test/oned.conf | 117 +++--- 15 files changed, 1123 insertions(+), 201 deletions(-) create mode 100644 src/oca/java/src/org/opennebula/client/cluster/Cluster.java create mode 100644 src/oca/java/src/org/opennebula/client/cluster/ClusterPool.java create mode 100644 src/oca/java/src/org/opennebula/client/datastore/Datastore.java create mode 100644 src/oca/java/src/org/opennebula/client/datastore/DatastorePool.java diff --git a/src/oca/java/build.sh b/src/oca/java/build.sh index 4aecb6b16d..14d3ad1694 100755 --- a/src/oca/java/build.sh +++ b/src/oca/java/build.sh @@ -124,6 +124,12 @@ do_clean() find share/examples -name '*.class' -delete find test/ -name '*.class' -delete + + echo "Cleaning javadoc files..." + rm -rf $DOC_DIR > /dev/null 2>&1 + + echo "Cleaning jar files..." + rm -rf $JAR_DIR > /dev/null 2>&1 } if [ "$DO_CLEAN" = "yes" ] ; then diff --git a/src/oca/java/src/org/opennebula/client/PoolElement.java b/src/oca/java/src/org/opennebula/client/PoolElement.java index a478b26f11..28f1831772 100644 --- a/src/oca/java/src/org/opennebula/client/PoolElement.java +++ b/src/oca/java/src/org/opennebula/client/PoolElement.java @@ -1,12 +1,12 @@ /******************************************************************************* * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,7 +59,7 @@ public abstract class PoolElement { /** * Creates a new PoolElement from the xml provided. - * + * * @param client XML-RPC Client. * @param xmlElement XML representation of the element. */ @@ -102,7 +102,7 @@ public abstract class PoolElement { /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param method XML-RPC method. * @param id The id of the target object. @@ -130,11 +130,11 @@ public abstract class PoolElement { /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param method XML-RPC method. * @param id The id of the target object. - * @param octet Permissions octed , e.g. 640 + * @param octet Permissions octet, e.g. 640 * @return If an error occurs the error message contains the reason. */ protected static OneResponse chmod(Client client, String method, int id, @@ -158,7 +158,7 @@ public abstract class PoolElement { /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param method XML-RPC method. * @param id The id of the target object. @@ -207,7 +207,7 @@ public abstract class PoolElement { /** * Returns the owner User's ID, or -1 if the element doesn't have one. - * + * * @return the owner User's ID, or -1 if the element doesn't have one. */ public int uid() @@ -229,7 +229,7 @@ public abstract class PoolElement { /** * Returns the element group's ID, or -1 if the element doesn't have one. - * + * * @return the element group's ID, or -1 if the element doesn't have one. */ public int gid() diff --git a/src/oca/java/src/org/opennebula/client/acl/Acl.java b/src/oca/java/src/org/opennebula/client/acl/Acl.java index c95fb69a77..cc5c1d762e 100644 --- a/src/oca/java/src/org/opennebula/client/acl/Acl.java +++ b/src/oca/java/src/org/opennebula/client/acl/Acl.java @@ -64,6 +64,8 @@ public class Acl extends PoolElement{ tmpResources.put("USER" , 0x0000010000000000L); tmpResources.put("TEMPLATE" , 0x0000020000000000L); tmpResources.put("GROUP" , 0x0000040000000000L); + tmpResources.put("DATASTORE", 0x0000100000000000L); + tmpResources.put("CLUSTER" , 0x0000200000000000L); RESOURCES = Collections.unmodifiableMap(tmpResources); diff --git a/src/oca/java/src/org/opennebula/client/cluster/Cluster.java b/src/oca/java/src/org/opennebula/client/cluster/Cluster.java new file mode 100644 index 0000000000..fdf1b75703 --- /dev/null +++ b/src/oca/java/src/org/opennebula/client/cluster/Cluster.java @@ -0,0 +1,321 @@ +/******************************************************************************* + * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.opennebula.client.cluster; + +import org.opennebula.client.Client; +import org.opennebula.client.OneResponse; +import org.opennebula.client.PoolElement; +import org.w3c.dom.Node; + +/** + * This class represents an OpenNebula cluster. + * It also offers static XML-RPC call wrappers. + */ +public class Cluster extends PoolElement{ + + private static final String METHOD_PREFIX = "cluster."; + private static final String ALLOCATE = METHOD_PREFIX + "allocate"; + private static final String DELETE = METHOD_PREFIX + "delete"; + private static final String INFO = METHOD_PREFIX + "info"; + private static final String ADDHOST = METHOD_PREFIX + "addhost"; + private static final String DELHOST = METHOD_PREFIX + "delhost"; + private static final String ADDDATASTORE = METHOD_PREFIX + "adddatastore"; + private static final String DELDATASTORE = METHOD_PREFIX + "deldatastore"; + private static final String ADDVNET = METHOD_PREFIX + "addvnet"; + private static final String DELVNET = METHOD_PREFIX + "delvnet"; + + /** + * Creates a new Cluster representation. + * + * @param id The cluster id. + * @param client XML-RPC Client. + */ + public Cluster(int id, Client client) + { + super(id, client); + } + + /** + * @see PoolElement + */ + protected Cluster(Node xmlElement, Client client) + { + super(xmlElement, client); + } + + + // ================================= + // Static XML-RPC methods + // ================================= + + /** + * Allocates a new cluster in OpenNebula + * + * @param client XML-RPC Client. + * @param name Name for the new cluster. + * @return If successful the message contains the associated + * id generated for this cluster. + */ + public static OneResponse allocate(Client client, String name) + { + return client.call(ALLOCATE, name); + } + + /** + * Retrieves the information of the given cluster. + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @return If successful the message contains the string + * with the information returned by OpenNebula. + */ + public static OneResponse info(Client client, int id) + { + return client.call(INFO, id); + } + + /** + * Deletes a cluster from OpenNebula. + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @return A encapsulated response. + */ + public static OneResponse delete(Client client, int id) + { + return client.call(DELETE, id); + } + + /** + * Adds a Host to this Cluster + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @param hid Host ID. + * + * @return A encapsulated response. + */ + public static OneResponse addHost(Client client, int id, int hid) + { + return client.call(ADDHOST, id, hid); + } + + /** + * Deletes a Host from this Cluster + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @param hid Host ID. + * + * @return A encapsulated response. + */ + public static OneResponse delHost(Client client, int id, int hid) + { + return client.call(DELHOST, id, hid); + } + + /** + * Adds a Datastore to this Cluster + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @param dsId Datastore ID. + * + * @return A encapsulated response. + */ + public static OneResponse addDatastore(Client client, int id, int dsId) + { + return client.call(ADDDATASTORE, id, dsId); + } + + /** + * Deletes a Datastore from this Cluster + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @param dsId Datastore ID. + * + * @return A encapsulated response. + */ + public static OneResponse delDatastore(Client client, int id, int dsId) + { + return client.call(DELDATASTORE, id, dsId); + } + + /** + * Adds a VNet to this Cluster + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @param vnetId VNet ID. + * + * @return A encapsulated response. + */ + public static OneResponse addVnet(Client client, int id, int vnetId) + { + return client.call(ADDVNET, id, vnetId); + } + + /** + * Deletes a VNet from this Cluster + * + * @param client XML-RPC Client. + * @param id The cluster id. + * @param vnetId VNet ID. + * + * @return A encapsulated response. + */ + public static OneResponse delVnet(Client client, int id, int vnetId) + { + return client.call(DELVNET, id, vnetId); + } + + // ================================= + // Instanced object XML-RPC methods + // ================================= + + /** + * Loads the xml representation of the cluster. + * The info is also stored internally. + * + * @see Cluster#info(Client, int) + */ + public OneResponse info() + { + OneResponse response = info(client, id); + super.processInfo(response); + return response; + } + + /** + * Deletes the cluster from OpenNebula. + * + * @see Cluster#delete(Client, int) + */ + public OneResponse delete() + { + return delete(client, id); + } + + /** + * Adds a Host to this Cluster + * + * @param hid Host ID. + * @return A encapsulated response. + */ + public OneResponse addHost(int hid) + { + return addHost(client, id, hid); + } + + /** + * Deletes a Host from this Cluster + * + * @param hid Host ID. + * @return A encapsulated response. + */ + public OneResponse delHost(int hid) + { + return delHost(client, id, hid); + } + + /** + * Adds a Datastore to this Cluster + * + * @param dsId Datastore ID. + * @return A encapsulated response. + */ + public OneResponse addDatastore(int dsId) + { + return addDatastore(client, id, dsId); + } + + /** + * Deletes a Datastore from this Cluster + * + * @param dsId Datastore ID. + * @return A encapsulated response. + */ + public OneResponse delDatastore(int dsId) + { + return delDatastore(client, id, dsId); + } + + /** + * Adds a VNet to this Cluster + * + * @param vnetId VNet ID. + * @return A encapsulated response. + */ + public OneResponse addVnet(int vnetId) + { + return addVnet(client, id, vnetId); + } + + /** + * Deletes a VNet from this Cluster + * + * @param vnetId VNet ID. + * @return A encapsulated response. + */ + public OneResponse delVnet(int vnetId) + { + return delVnet(client, id, vnetId); + } + + // ================================= + // Helpers + // ================================= + + /** + * Returns whether or not the host is part of this cluster + * + * @param id The host ID. + * @return Whether or not the host is part of this cluster. + */ + public boolean containsHost(int id) + { + return containsResource("HOSTS", id); + } + + /** + * Returns whether or not the datastore is part of this cluster + * + * @param id The datastore ID. + * @return Whether or not the datastore is part of this cluster. + */ + public boolean containsDatastore(int id) + { + return containsResource("DATASTORES", id); + } + + /** + * Returns whether or not the vnet is part of this cluster + * + * @param id The vnet ID. + * @return Whether or not the vnet is part of this cluster. + */ + public boolean containsVnet(int id) + { + return containsResource("VNETS", id); + } + + private boolean containsResource(String resource, int id) + { + String res = xpath(resource+"/ID[.="+id+"]"); + return res != null && res.equals(""+id); + } +} diff --git a/src/oca/java/src/org/opennebula/client/cluster/ClusterPool.java b/src/oca/java/src/org/opennebula/client/cluster/ClusterPool.java new file mode 100644 index 0000000000..e3172d42a9 --- /dev/null +++ b/src/oca/java/src/org/opennebula/client/cluster/ClusterPool.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.opennebula.client.cluster; + +import java.util.AbstractList; +import java.util.Iterator; + + +import org.opennebula.client.Client; +import org.opennebula.client.OneResponse; +import org.opennebula.client.Pool; +import org.opennebula.client.PoolElement; +import org.w3c.dom.Node; + +/** + * This class represents an OpenNebula cluster pool. + * It also offers static XML-RPC call wrappers. + */ +public class ClusterPool extends Pool implements Iterable{ + + private static final String ELEMENT_NAME = "CLUSTER"; + private static final String INFO_METHOD = "clusterpool.info"; + + /** + * Creates a new cluster pool + * @param client XML-RPC Client. + */ + public ClusterPool(Client client) + { + super(ELEMENT_NAME, client, INFO_METHOD); + } + + @Override + public PoolElement factory(Node node) + { + return new Cluster(node, client); + } + + /** + * Retrieves all the clusters in the pool. + * + * @param client XML-RPC Client. + * @return If successful the message contains the string + * with the information returned by OpenNebula. + */ + public static OneResponse info(Client client) + { + return Pool.info(client, INFO_METHOD); + } + + /** + * Loads the xml representation of the cluster pool. + * + * @see ClusterPool#info(Client) + */ + public OneResponse info() + { + return super.info(); + } + + public Iterator iterator() + { + AbstractList ab = new AbstractList() + { + public int size() + { + return getLength(); + } + + public Cluster get(int index) + { + return (Cluster) item(index); + } + }; + + return ab.iterator(); + } + + /** + * Returns the Cluster with the given Id from the pool. If it is not found, + * then returns null. + * + * @param id of the Cluster to retrieve + * @return The Image with the given Id, or null if it was not found. + */ + public Cluster getById(int id) + { + return (Cluster) super.getById(id); + } +} diff --git a/src/oca/java/src/org/opennebula/client/datastore/Datastore.java b/src/oca/java/src/org/opennebula/client/datastore/Datastore.java new file mode 100644 index 0000000000..4604c5d960 --- /dev/null +++ b/src/oca/java/src/org/opennebula/client/datastore/Datastore.java @@ -0,0 +1,357 @@ +/******************************************************************************* + * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.opennebula.client.datastore; + +import org.opennebula.client.Client; +import org.opennebula.client.OneResponse; +import org.opennebula.client.PoolElement; +import org.w3c.dom.Node; + +/** + * This class represents an OpenNebula datastore. + * It also offers static XML-RPC call wrappers. + */ +public class Datastore extends PoolElement +{ + + private static final String METHOD_PREFIX = "datastore."; + private static final String INFO = METHOD_PREFIX + "info"; + private static final String ALLOCATE = METHOD_PREFIX + "allocate"; + private static final String DELETE = METHOD_PREFIX + "delete"; + private static final String UPDATE = METHOD_PREFIX + "update"; + private static final String CHOWN = METHOD_PREFIX + "chown"; + private static final String CHMOD = METHOD_PREFIX + "chmod"; + + /** + * Creates a new Datastore representation. + * @param id The datastore id. + * @param client XML-RPC Client. + */ + public Datastore(int id, Client client) + { + super(id, client); + } + + /** + * @see PoolElement + */ + protected Datastore(Node xmlElement, Client client) + { + super(xmlElement, client); + } + + // ================================= + // Static XML-RPC methods + // ================================= + + /** + * Allocates a new Datastore in OpenNebula. + * + * @param client XML-RPC Client. + * @param description A string containing the template of the datastore. + * @return If successful the message contains the associated + * id generated for this Datastore. + */ + public static OneResponse allocate(Client client, String description) + { + return client.call(ALLOCATE, description); + } + + /** + * Retrieves the information of the given Datastore. + * + * @param client XML-RPC Client. + * @param id The datastore id to retrieve the information from + * @return If successful the message contains the string + * with the information returned by OpenNebula. + */ + public static OneResponse info(Client client, int id) + { + return client.call(INFO, id); + } + + /** + * Deletes a datastore from OpenNebula. + * + * @param client XML-RPC Client. + * @param id The id of the target datastore we want to delete. + * @return A encapsulated response. + */ + public static OneResponse delete(Client client, int id) + { + return client.call(DELETE, id); + } + + /** + * Replaces the datastore contents. + * + * @param client XML-RPC Client. + * @param id The id of the target datastore we want to modify. + * @param new_template New datastore contents. + * @return If successful the message contains the datastore id. + */ + public static OneResponse update(Client client, int id, String new_template) + { + return client.call(UPDATE, id, new_template); + } + + /** + * Publishes or unpublishes a datastore. + * + * @param client XML-RPC Client. + * @param id The id of the target datastore we want to modify. + * @param publish True for publishing, false for unpublishing. + * @return If successful the message contains the datastore id. + */ + public static OneResponse publish(Client client, int id, boolean publish) + { + int group_u = publish ? 1 : 0; + + return chmod(client, id, -1, -1, -1, group_u, -1, -1, -1, -1, -1); + } + + /** + * Changes the owner/group + * + * @param client XML-RPC Client. + * @param id The id of the target datastore we want to modify. + * @param uid The new owner user ID. Set it to -1 to leave the current one. + * @param gid The new group ID. Set it to -1 to leave the current one. + * @return If an error occurs the error message contains the reason. + */ + public static OneResponse chown(Client client, int id, int uid, int gid) + { + return client.call(CHOWN, id, uid, gid); + } + + /** + * Changes the datastore permissions + * + * @param client XML-RPC Client. + * @param id The id of the target datastore. + * @param owner_u 1 to allow, 0 deny, -1 do not change + * @param owner_m 1 to allow, 0 deny, -1 do not change + * @param owner_a 1 to allow, 0 deny, -1 do not change + * @param group_u 1 to allow, 0 deny, -1 do not change + * @param group_m 1 to allow, 0 deny, -1 do not change + * @param group_a 1 to allow, 0 deny, -1 do not change + * @param other_u 1 to allow, 0 deny, -1 do not change + * @param other_m 1 to allow, 0 deny, -1 do not change + * @param other_a 1 to allow, 0 deny, -1 do not change + * @return If an error occurs the error message contains the reason. + */ + public static OneResponse chmod(Client client, int id, + int owner_u, int owner_m, int owner_a, + int group_u, int group_m, int group_a, + int other_u, int other_m, int other_a) + { + return chmod(client, CHMOD, id, + owner_u, owner_m, owner_a, + group_u, group_m, group_a, + other_u, other_m, other_a); + } + + /** + * Changes the permissions + * + * @param client XML-RPC Client. + * @param id The id of the target object. + * @param octet Permissions octet, e.g. 640 + * @return If an error occurs the error message contains the reason. + */ + public static OneResponse chmod(Client client, int id, String octet) + { + return chmod(client, CHMOD, id, octet); + } + + /** + * Changes the permissions + * + * @param client XML-RPC Client. + * @param id The id of the target object. + * @param octet Permissions octed , e.g. 640 + * @return If an error occurs the error message contains the reason. + */ + public static OneResponse chmod(Client client, int id, int octet) + { + return chmod(client, CHMOD, id, octet); + } + + // ================================= + // Instanced object XML-RPC methods + // ================================= + + /** + * Retrieves the information of the Datastore. + * + * @return If successful the message contains the string + * with the information returned by OpenNebula. + */ + public OneResponse info() + { + OneResponse response = info(client, id); + super.processInfo(response); + return response; + } + + /** + * Deletes the datastore from OpenNebula. + * + * @return A encapsulated response. + */ + public OneResponse delete() + { + return delete(client, id); + } + + /** + * Replaces the datastore template. + * + * @param new_template New datastore template. + * @return If successful the message contains the datastore id. + */ + public OneResponse update(String new_template) + { + return update(client, id, new_template); + } + + /** + * Publishes or unpublishes the datastore. + * + * @param publish True for publishing, false for unpublishing. + * @return If successful the message contains the datastore id. + */ + public OneResponse publish(boolean publish) + { + return publish(client, id, publish); + } + + /** + * Publishes the datastore. + * + * @return If successful the message contains the datastore id. + */ + public OneResponse publish() + { + return publish(true); + } + + /** + * Unpublishes the datastore. + * + * @return If successful the message contains the datastore id. + */ + public OneResponse unpublish() + { + return publish(false); + } + + /** + * Changes the owner/group + * + * @param uid The new owner user ID. Set it to -1 to leave the current one. + * @param gid The new group ID. Set it to -1 to leave the current one. + * @return If an error occurs the error message contains the reason. + */ + public OneResponse chown(int uid, int gid) + { + return chown(client, id, uid, gid); + } + + /** + * Changes the owner + * + * @param uid The new owner user ID. + * @return If an error occurs the error message contains the reason. + */ + public OneResponse chown(int uid) + { + return chown(uid, -1); + } + + /** + * Changes the group + * + * @param gid The new group ID. + * @return If an error occurs the error message contains the reason. + */ + public OneResponse chgrp(int gid) + { + return chown(-1, gid); + } + + /** + * Changes the datastore permissions + * + * @param owner_u 1 to allow, 0 deny, -1 do not change + * @param owner_m 1 to allow, 0 deny, -1 do not change + * @param owner_a 1 to allow, 0 deny, -1 do not change + * @param group_u 1 to allow, 0 deny, -1 do not change + * @param group_m 1 to allow, 0 deny, -1 do not change + * @param group_a 1 to allow, 0 deny, -1 do not change + * @param other_u 1 to allow, 0 deny, -1 do not change + * @param other_m 1 to allow, 0 deny, -1 do not change + * @param other_a 1 to allow, 0 deny, -1 do not change + * @return If an error occurs the error message contains the reason. + */ + public OneResponse chmod(int owner_u, int owner_m, int owner_a, + int group_u, int group_m, int group_a, + int other_u, int other_m, int other_a) + { + return chmod(client, id, + owner_u, owner_m, owner_a, + group_u, group_m, group_a, + other_u, other_m, other_a); + } + + /** + * Changes the permissions + * + * @param octet Permissions octed , e.g. 640 + * @return If an error occurs the error message contains the reason. + */ + public OneResponse chmod(String octet) + { + return chmod(client, id, octet); + } + + /** + * Changes the permissions + * + * @param octet Permissions octed , e.g. 640 + * @return If an error occurs the error message contains the reason. + */ + public OneResponse chmod(int octet) + { + return chmod(client, id, octet); + } + + // ================================= + // Helpers + // ================================= + + /** + * Returns whether or not the image is part of this datastore + * + * @param id The image ID. + * @return Whether or not the image is part of this datastore. + */ + public boolean contains(int id) + { + String res = xpath("IMAGES/ID[.="+id+"]"); + return res != null && res.equals(""+id); + } +} diff --git a/src/oca/java/src/org/opennebula/client/datastore/DatastorePool.java b/src/oca/java/src/org/opennebula/client/datastore/DatastorePool.java new file mode 100644 index 0000000000..6cdcef7416 --- /dev/null +++ b/src/oca/java/src/org/opennebula/client/datastore/DatastorePool.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.opennebula.client.datastore; + +import java.util.AbstractList; +import java.util.Iterator; + + +import org.opennebula.client.Client; +import org.opennebula.client.OneResponse; +import org.opennebula.client.Pool; +import org.opennebula.client.PoolElement; +import org.w3c.dom.Node; + +/** + * This class represents an OpenNebula datastore pool. + * It also offers static XML-RPC call wrappers. + */ +public class DatastorePool extends Pool implements Iterable{ + + private static final String ELEMENT_NAME = "DATASTORE"; + private static final String INFO_METHOD = "datastorepool.info"; + + /** + * Creates a new datastore pool + * @param client XML-RPC Client. + */ + public DatastorePool(Client client) + { + super(ELEMENT_NAME, client, INFO_METHOD); + } + + @Override + public PoolElement factory(Node node) + { + return new Datastore(node, client); + } + + /** + * Retrieves all the datastores in the pool. + * + * @param client XML-RPC Client. + * @return If successful the message contains the string + * with the information returned by OpenNebula. + */ + public static OneResponse info(Client client) + { + return Pool.info(client, INFO_METHOD); + } + + /** + * Loads the xml representation of the datastore pool. + * + * @see DatastorePool#info(Client) + */ + public OneResponse info() + { + return super.info(); + } + + public Iterator iterator() + { + AbstractList ab = new AbstractList() + { + public int size() + { + return getLength(); + } + + public Datastore get(int index) + { + return (Datastore) item(index); + } + }; + + return ab.iterator(); + } + + /** + * Returns the Datastore with the given Id from the pool. If it is not found, + * then returns null. + * + * @param id of the Datastore to retrieve + * @return The Image with the given Id, or null if it was not found. + */ + public Datastore getById(int id) + { + return (Datastore) super.getById(id); + } +} diff --git a/src/oca/java/src/org/opennebula/client/host/Host.java b/src/oca/java/src/org/opennebula/client/host/Host.java index 13fbe45117..290a28fdd0 100644 --- a/src/oca/java/src/org/opennebula/client/host/Host.java +++ b/src/oca/java/src/org/opennebula/client/host/Host.java @@ -1,12 +1,12 @@ /******************************************************************************* * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,15 +33,15 @@ public class Host extends PoolElement{ private static final String DELETE = METHOD_PREFIX + "delete"; private static final String ENABLE = METHOD_PREFIX + "enable"; private static final String UPDATE = METHOD_PREFIX + "update"; - - private static final String[] HOST_STATES = + + private static final String[] HOST_STATES = {"INIT", "MONITORING", "MONITORED", "ERROR", "DISABLED"}; /** * Creates a new Host representation. - * - * @param id The host id (hid) of the machine. + * + * @param id The host id (hid) of the machine. * @param client XML-RPC Client. */ public Host(int id, Client client) @@ -64,17 +64,20 @@ public class Host extends PoolElement{ /** * Allocates a new host in OpenNebula - * + * * @param client XML-RPC Client. - * @param hostname Hostname of the machine we want to add + * @param hostname Hostname of the machine we want to add * @param im The name of the information manager (im_mad_name), - * this values are taken from the oned.conf with the tag name IM_MAD (name) + * this values are taken from the oned.conf with the tag name IM_MAD (name) * @param vmm The name of the virtual machine manager mad name * (vmm_mad_name), this values are taken from the oned.conf with the * tag name VM_MAD (name) * @param vnm The name of the virtual network manager mad name * (vnm_mad_name), this values are taken from the oned.conf with the * tag name VN_MAD (name) + * @param clusterId The cluster ID. If it is -1, this host won't be + * added to any cluster. + * * @return If successful the message contains the associated * id generated for this host */ @@ -82,16 +85,44 @@ public class Host extends PoolElement{ String hostname, String im, String vmm, - String vnm) + String vnm, + int clusterId) { - return client.call(ALLOCATE, hostname, im, vmm, vnm); + return client.call(ALLOCATE, hostname, im, vmm, vnm, clusterId); + } + + /** + * Allocates a new host in OpenNebula + * + * @param client XML-RPC Client. + * @param hostname Hostname of the machine we want to add + * @param im The name of the information manager (im_mad_name), + * this values are taken from the oned.conf with the tag name IM_MAD (name) + * @param vmm The name of the virtual machine manager mad name + * (vmm_mad_name), this values are taken from the oned.conf with the + * tag name VM_MAD (name) + * @param vnm The name of the virtual network manager mad name + * (vnm_mad_name), this values are taken from the oned.conf with the + * tag name VN_MAD (name) + * + * @return If successful the message contains the associated + * id generated for this host + */ + public static OneResponse allocate( + Client client, + String hostname, + String im, + String vmm, + String vnm) + { + return allocate(client, hostname, im, vmm, vnm, -1); } /** * Retrieves the information of the given host. - * + * * @param client XML-RPC Client. - * @param id The host id (hid) of the target machine. + * @param id The host id (hid) of the target machine. * @return If successful the message contains the string * with the information returned by OpenNebula. */ @@ -102,7 +133,7 @@ public class Host extends PoolElement{ /** * Deletes a host from OpenNebula. - * + * * @param client XML-RPC Client. * @param id The host id (hid) of the target machine. * @return A encapsulated response. @@ -114,7 +145,7 @@ public class Host extends PoolElement{ /** * Enables or disables a given host. - * + * * @param client XML-RPC Client. * @param id The host id (hid) of the target machine. * @param enable If set true OpenNebula will enable the @@ -128,7 +159,7 @@ public class Host extends PoolElement{ /** * Replaces the template contents. - * + * * @param client XML-RPC Client. * @param id The image id of the target host we want to modify. * @param new_template New template contents @@ -146,7 +177,7 @@ public class Host extends PoolElement{ /** * Loads the xml representation of the host. * The info is also stored internally. - * + * * @see Host#info(Client, int) */ public OneResponse info() @@ -158,7 +189,7 @@ public class Host extends PoolElement{ /** * Deletes the host from OpenNebula. - * + * * @see Host#delete(Client, int) */ public OneResponse delete() @@ -168,7 +199,7 @@ public class Host extends PoolElement{ /** * Enables or disables the host. - * + * * @see Host#enable(Client, int, boolean) */ public OneResponse enable(boolean enable) @@ -178,7 +209,7 @@ public class Host extends PoolElement{ /** * Enables the host. - * + * * @return A encapsulated response. */ public OneResponse enable() @@ -188,7 +219,7 @@ public class Host extends PoolElement{ /** * Disables the host - * + * * @return A encapsulated response. */ public OneResponse disable() @@ -198,7 +229,7 @@ public class Host extends PoolElement{ /** * Replaces the template contents. - * + * * @param new_template New template contents * @return If successful the message contains the host id. */ @@ -215,7 +246,7 @@ public class Host extends PoolElement{ * Returns the state of the Host. *
* The method {@link Host#info()} must be called before. - * + * * @return The state of the Host. */ public String stateStr() @@ -228,7 +259,7 @@ public class Host extends PoolElement{ * Returns the short length string state of the Host. *
* The method {@link Host#info()} must be called before. - * + * * @return The short length string state of the Host. */ public String shortStateStr() @@ -246,7 +277,7 @@ public class Host extends PoolElement{ /** * Returns true if the host is enabled. - * + * * @return True if the host is enabled. */ public boolean isEnabled() diff --git a/src/oca/java/src/org/opennebula/client/image/Image.java b/src/oca/java/src/org/opennebula/client/image/Image.java index 5d4e3921e7..281af821b3 100644 --- a/src/oca/java/src/org/opennebula/client/image/Image.java +++ b/src/oca/java/src/org/opennebula/client/image/Image.java @@ -1,12 +1,12 @@ /******************************************************************************* * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -71,6 +71,24 @@ public class Image extends PoolElement // Static XML-RPC methods // ================================= + /** + * Allocates a new Image in OpenNebula. + * + * @param client XML-RPC Client. + * @param description A string containing the template of the image. + * @param clusterId The cluster ID. If it is -1, this image + * won't be added to any cluster. + * + * @return If successful the message contains the associated + * id generated for this Image. + */ + public static OneResponse allocate( + Client client, + String description, + int clusterId) + { + return client.call(ALLOCATE, description, clusterId); + } /** * Allocates a new Image in OpenNebula. @@ -82,7 +100,7 @@ public class Image extends PoolElement */ public static OneResponse allocate(Client client, String description) { - return client.call(ALLOCATE, description); + return allocate(client, description, -1); } /** @@ -100,7 +118,7 @@ public class Image extends PoolElement /** * Deletes an image from OpenNebula. - * + * * @param client XML-RPC Client. * @param id The image id of the target image we want to delete. * @return A encapsulated response. @@ -112,7 +130,7 @@ public class Image extends PoolElement /** * Replaces the template contents. - * + * * @param client XML-RPC Client. * @param id The image id of the target image we want to modify. * @param new_template New template contents @@ -125,7 +143,7 @@ public class Image extends PoolElement /** * Enables or disables an image. - * + * * @param client XML-RPC Client. * @param id The image id of the target image we want to modify. * @param enable True for enabling, false for disabling. @@ -138,7 +156,7 @@ public class Image extends PoolElement /** * Publishes or unpublishes an image. - * + * * @param client XML-RPC Client. * @param id The image id of the target image we want to modify. * @param publish True for publishing, false for unpublishing. @@ -153,7 +171,7 @@ public class Image extends PoolElement /** * Changes the owner/group - * + * * @param client XML-RPC Client. * @param id The image id of the target image we want to modify. * @param uid The new owner user ID. Set it to -1 to leave the current one. @@ -167,7 +185,7 @@ public class Image extends PoolElement /** * Changes the Image permissions - * + * * @param client XML-RPC Client. * @param id The image id of the target image we want to modify. * @param owner_u 1 to allow, 0 deny, -1 do not change @@ -194,7 +212,7 @@ public class Image extends PoolElement /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param id The id of the target object. * @param octet Permissions octed , e.g. 640 @@ -207,7 +225,7 @@ public class Image extends PoolElement /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param id The id of the target object. * @param octet Permissions octed , e.g. 640 @@ -220,7 +238,7 @@ public class Image extends PoolElement /** * Changes the Image type - * + * * @param client XML-RPC Client. * @param id The image id of the target image we want to modify. * @param type The new Image type @@ -250,7 +268,7 @@ public class Image extends PoolElement /** * Deletes the image from OpenNebula. - * + * * @return A encapsulated response. */ public OneResponse delete() @@ -260,7 +278,7 @@ public class Image extends PoolElement /** * Replaces the template contents. - * + * * @param new_template New template contents * @return If successful the message contains the image id. */ @@ -271,7 +289,7 @@ public class Image extends PoolElement /** * Enables or disables the image. - * + * * @param enable True for enabling, false for disabling. * @return If successful the message contains the image id. */ @@ -282,7 +300,7 @@ public class Image extends PoolElement /** * Enables the image. - * + * * @return If successful the message contains the image id. */ public OneResponse enable() @@ -292,7 +310,7 @@ public class Image extends PoolElement /** * Disables the image. - * + * * @return If successful the message contains the image id. */ public OneResponse disable() @@ -302,7 +320,7 @@ public class Image extends PoolElement /** * Publishes or unpublishes the image. - * + * * @param publish True for publishing, false for unpublishing. * @return If successful the message contains the image id. */ @@ -313,7 +331,7 @@ public class Image extends PoolElement /** * Publishes the image. - * + * * @return If successful the message contains the image id. */ public OneResponse publish() @@ -323,7 +341,7 @@ public class Image extends PoolElement /** * Unpublishes the image. - * + * * @return If successful the message contains the image id. */ public OneResponse unpublish() @@ -333,7 +351,7 @@ public class Image extends PoolElement /** * Changes the owner/group - * + * * @param uid The new owner user ID. Set it to -1 to leave the current one. * @param gid The new group ID. Set it to -1 to leave the current one. * @return If an error occurs the error message contains the reason. @@ -345,7 +363,7 @@ public class Image extends PoolElement /** * Changes the owner - * + * * @param uid The new owner user ID. * @return If an error occurs the error message contains the reason. */ @@ -356,7 +374,7 @@ public class Image extends PoolElement /** * Changes the group - * + * * @param gid The new group ID. * @return If an error occurs the error message contains the reason. */ @@ -367,7 +385,7 @@ public class Image extends PoolElement /** * Changes the Image permissions - * + * * @param owner_u 1 to allow, 0 deny, -1 do not change * @param owner_m 1 to allow, 0 deny, -1 do not change * @param owner_a 1 to allow, 0 deny, -1 do not change @@ -413,7 +431,7 @@ public class Image extends PoolElement /** * Changes the Image type - * + * * @param type The new Image type * @return If an error occurs the error message contains the reason. */ @@ -430,7 +448,7 @@ public class Image extends PoolElement * Returns the state of the Image. *
* The method {@link Image#info()} must be called before. - * + * * @return The state of the Image. */ public String stateString() @@ -443,7 +461,7 @@ public class Image extends PoolElement * Returns the short length string state of the Image. *
* The method {@link Image#info()} must be called before. - * + * * @return The short length string state of the Image. */ public String shortStateStr() @@ -454,7 +472,7 @@ public class Image extends PoolElement /** * Returns the type of the Image. - * + * * @return The type of the Image. */ public int type() @@ -465,7 +483,7 @@ public class Image extends PoolElement /** * Returns the type of the Image as a String. - * + * * @return The type of the Image as a String. */ public String typeStr() @@ -476,7 +494,7 @@ public class Image extends PoolElement /** * Returns the type of the Image as a short String. - * + * * @return The type of the Image as a short String. */ public String shortTypeStr() @@ -487,7 +505,7 @@ public class Image extends PoolElement /** * Returns true if the image is enabled. - * + * * @return True if the image is enabled. */ public boolean isEnabled() diff --git a/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java b/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java index 8775559812..9cefefe188 100644 --- a/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java +++ b/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java @@ -19,7 +19,6 @@ package org.opennebula.client.vm; import org.opennebula.client.Client; import org.opennebula.client.OneResponse; import org.opennebula.client.PoolElement; -import org.opennebula.client.template.Template; import org.w3c.dom.Node; /** @@ -152,7 +151,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the owner/group - * + * * @param client XML-RPC Client. * @param id The virtual machine id (vid) of the target instance. * @param uid The new owner user ID. Set it to -1 to leave the current one. @@ -166,7 +165,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the VM permissions - * + * * @param client XML-RPC Client. * @param id The VM id of the target VM. * @param owner_u 1 to allow, 0 deny, -1 do not change @@ -193,7 +192,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param id The id of the target object. * @param octet Permissions octed , e.g. 640 @@ -206,7 +205,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param id The id of the target object. * @param octet Permissions octed , e.g. 640 @@ -317,7 +316,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the owner/group - * + * * @param uid The new owner user ID. Set it to -1 to leave the current one. * @param gid The new group ID. Set it to -1 to leave the current one. * @return If an error occurs the error message contains the reason. @@ -329,7 +328,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the owner - * + * * @param uid The new owner user ID. * @return If an error occurs the error message contains the reason. */ @@ -340,7 +339,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the group - * + * * @param gid The new group ID. * @return If an error occurs the error message contains the reason. */ @@ -352,7 +351,7 @@ public class VirtualMachine extends PoolElement{ /** * Changes the VM permissions - * + * * @param owner_u 1 to allow, 0 deny, -1 do not change * @param owner_m 1 to allow, 0 deny, -1 do not change * @param owner_a 1 to allow, 0 deny, -1 do not change diff --git a/src/oca/java/src/org/opennebula/client/vnet/VirtualNetwork.java b/src/oca/java/src/org/opennebula/client/vnet/VirtualNetwork.java index f4d739c3e1..112d4adec5 100644 --- a/src/oca/java/src/org/opennebula/client/vnet/VirtualNetwork.java +++ b/src/oca/java/src/org/opennebula/client/vnet/VirtualNetwork.java @@ -1,12 +1,12 @@ /******************************************************************************* * Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,7 +41,7 @@ public class VirtualNetwork extends PoolElement{ /** * Creates a new virtual network representation. - * + * * @param id The virtual network id (nid) . * @param client XML-RPC Client. */ @@ -64,24 +64,47 @@ public class VirtualNetwork extends PoolElement{ /** * Allocates a new virtual network in OpenNebula. - * + * * @param client XML-RPC Client. * @param description A string containing the template - * of the virtual network. + * of the virtual network. + * @param clusterId The cluster ID. If it is -1, this virtual network + * won't be added to any cluster. + * * @return If successful the message contains the associated * id generated for this virtual network. */ - public static OneResponse allocate(Client client, String description) + public static OneResponse allocate( + Client client, + String description, + int clusterId) { - return client.call(ALLOCATE, description); + return client.call(ALLOCATE, description, clusterId); + } + + /** + * Allocates a new virtual network in OpenNebula. + * + * @param client XML-RPC Client. + * @param description A string containing the template + * of the virtual network. + * + * @return If successful the message contains the associated + * id generated for this virtual network. + */ + public static OneResponse allocate( + Client client, + String description) + { + return allocate(client, description, -1); } /** * Retrieves the information of the given virtual network - * + * * @param client XML-RPC Client. * @param id the virtual network id (nid) for the network to - * retrieve the information from. + * retrieve the information from. * @return If successful the message contains the string * with the information returned by OpenNebula. */ @@ -92,7 +115,7 @@ public class VirtualNetwork extends PoolElement{ /** * Deletes a network from OpenNebula. - * + * * @param client XML-RPC Client. * @param id The virtual network id (nid) of the target network. * @return A encapsulated response. @@ -104,7 +127,7 @@ public class VirtualNetwork extends PoolElement{ /** * Publishes or unpublishes a virtual network. - * + * * @param client XML-RPC Client. * @param id The virtual network id (nid) of the target network. * @param publish True for publishing, false for unpublishing. @@ -171,7 +194,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the owner/group - * + * * @param client XML-RPC Client. * @param id The virtual network id (nid) of the target network. * @param uid The new owner user ID. Set it to -1 to leave the current one. @@ -185,7 +208,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the VirtualNetwork permissions - * + * * @param client XML-RPC Client. * @param id The virtual network id (nid) of the target network. * @param owner_u 1 to allow, 0 deny, -1 do not change @@ -212,7 +235,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param id The id of the target object. * @param octet Permissions octed , e.g. 640 @@ -225,7 +248,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the permissions - * + * * @param client XML-RPC Client. * @param id The id of the target object. * @param octet Permissions octed , e.g. 640 @@ -256,7 +279,7 @@ public class VirtualNetwork extends PoolElement{ /** * Loads the xml representation of the virtual network. * The info is also stored internally. - * + * * @see VirtualNetwork#info(Client, int) */ public OneResponse info() @@ -268,7 +291,7 @@ public class VirtualNetwork extends PoolElement{ /** * Deletes the network from OpenNebula. - * + * * @return A encapsulated response. */ public OneResponse delete() @@ -278,7 +301,7 @@ public class VirtualNetwork extends PoolElement{ /** * Publishes or unpublishes the virtual network. - * + * * @param publish True for publishing, false for unpublishing. * @return If successful the message contains the image id. */ @@ -289,7 +312,7 @@ public class VirtualNetwork extends PoolElement{ /** * Publishes the virtual network. - * + * * @return If successful the message contains the image id. */ public OneResponse publish() @@ -299,7 +322,7 @@ public class VirtualNetwork extends PoolElement{ /** * Unpublishes the virtual network. - * + * * @return If successful the message contains the image id. */ public OneResponse unpublish() @@ -379,7 +402,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the owner/group - * + * * @param uid The new owner user ID. Set it to -1 to leave the current one. * @param gid The new group ID. Set it to -1 to leave the current one. * @return If an error occurs the error message contains the reason. @@ -391,7 +414,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the owner - * + * * @param uid The new owner user ID. * @return If an error occurs the error message contains the reason. */ @@ -402,7 +425,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the group - * + * * @param gid The new group ID. * @return If an error occurs the error message contains the reason. */ @@ -413,7 +436,7 @@ public class VirtualNetwork extends PoolElement{ /** * Changes the VirtualNetwork permissions - * + * * @param owner_u 1 to allow, 0 deny, -1 do not change * @param owner_m 1 to allow, 0 deny, -1 do not change * @param owner_a 1 to allow, 0 deny, -1 do not change diff --git a/src/oca/java/test/HostTest.java b/src/oca/java/test/HostTest.java index 4126a259eb..fc6f824c92 100644 --- a/src/oca/java/test/HostTest.java +++ b/src/oca/java/test/HostTest.java @@ -63,7 +63,7 @@ public class HostTest @Before public void setUp() throws Exception { - res = Host.allocate(client, name, "im_dummy", "vmm_dummy", "vnm_dummy"); + res = Host.allocate(client, name, "im_dummy", "vmm_dummy", "dummy"); int hid = !res.isError() ? Integer.parseInt(res.getMessage()) : -1; host = new Host(hid, client); @@ -83,7 +83,7 @@ public class HostTest { String name = "allocate_test"; - res = Host.allocate(client, name, "im_dummy", "vmm_dummy", "vmm_dummy"); + res = Host.allocate(client, name, "im_dummy", "vmm_dummy", "dummy"); assertTrue( !res.isError() ); // assertTrue( res.getMessage().equals("0") ); diff --git a/src/oca/java/test/VirtualMachineTest.java b/src/oca/java/test/VirtualMachineTest.java index eecee6a900..23a404c653 100644 --- a/src/oca/java/test/VirtualMachineTest.java +++ b/src/oca/java/test/VirtualMachineTest.java @@ -22,6 +22,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.opennebula.client.Client; import org.opennebula.client.OneResponse; +import org.opennebula.client.datastore.Datastore; import org.opennebula.client.host.Host; import org.opennebula.client.vm.VirtualMachine; import org.opennebula.client.vm.VirtualMachinePool; @@ -80,12 +81,15 @@ public class VirtualMachineTest res = Host.allocate(client, "host_A", - "im_dummy", "vmm_dummy", "vmm_dummy", "tm_dummy"); + "im_dummy", "vmm_dummy", "dummy"); hid_A = Integer.parseInt( res.getMessage() ); res = Host.allocate(client, "host_B", - "im_dummy", "vmm_dummy", "vmm_dummy", "tm_dummy"); + "im_dummy", "vmm_dummy", "dummy"); hid_B = Integer.parseInt( res.getMessage() ); + + Datastore systemDs = new Datastore(0, client); + systemDs.update("TM_MAD = dummy"); } /** @@ -295,7 +299,8 @@ public class VirtualMachineTest assertTrue( vm.xpath("TEMPLATE/CONTEXT/DNS").equals("192.169.1.4") ); } - @Test +// TODO +// @Test public void savedisk() { String template = "NAME = savedisk_vm\n"+ diff --git a/src/oca/java/test/VirtualNetworkTest.java b/src/oca/java/test/VirtualNetworkTest.java index 6a7dbf3e9b..6064d672eb 100644 --- a/src/oca/java/test/VirtualNetworkTest.java +++ b/src/oca/java/test/VirtualNetworkTest.java @@ -40,7 +40,6 @@ public class VirtualNetworkTest private static String template = "NAME = " + name + "\n"+ "TYPE = RANGED\n" + - "PUBLIC = NO\n" + "BRIDGE = vbr0\n" + "NETWORK_SIZE = C\n" + "NETWORK_ADDRESS = 192.168.0.0\n"; @@ -147,30 +146,7 @@ public class VirtualNetworkTest res = vnet.info(); assertTrue( res.isError() ); } -// TODO -/* - @Test - public void publish() - { - res = vnet.info(); - assertTrue( !res.isError() ); - assertTrue( !vnet.isPublic() ); - // Publish it - res = vnet.publish(); - assertTrue( !res.isError() ); - - res = vnet.info(); - assertTrue( vnet.isPublic() ); - - // Unpublish it - res = vnet.unpublish(); - assertTrue( !res.isError() ); - - res = vnet.info(); - assertTrue( !vnet.isPublic() ); - } -*/ @Test public void addLeases() { @@ -273,4 +249,5 @@ public class VirtualNetworkTest assertTrue( vnet.xpath("TEMPLATE/ATT2").equals( "NEW_VAL" ) ); assertTrue( vnet.xpath("TEMPLATE/ATT3").equals( "VAL3" ) ); } + } diff --git a/src/oca/java/test/oned.conf b/src/oca/java/test/oned.conf index 7e88254166..82fbf924f0 100644 --- a/src/oca/java/test/oned.conf +++ b/src/oca/java/test/oned.conf @@ -6,7 +6,7 @@ # Daemon configuration attributes #------------------------------------------------------------------------------- # MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions. -# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL cannot have smaller values +# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL can not have smaller values # than MANAGER_TIMER. # # HOST_MONITORING_INTERVAL: Time in seconds between host monitorization. @@ -16,11 +16,6 @@ # (use 0 to disable VM monitoring). # VM_PER_INTERVAL: Number of VMs monitored in each interval. # -# VM_DIR: Remote path to store the VM images, it should be shared between all -# the cluster nodes to perform live migrations. This variable is the default -# for all the hosts in the cluster. VM_DIR IS ONLY FOR THE NODES AND *NOT* THE -# FRONT-END -# # SCRIPTS_REMOTE_DIR: Remote path to store the monitoring and VM management # scripts. # @@ -49,7 +44,6 @@ HOST_MONITORING_INTERVAL = 600 VM_POLLING_INTERVAL = 600 #VM_PER_INTERVAL = 5 -#VM_DIR=/srv/cloud/one/var SCRIPTS_REMOTE_DIR=/var/tmp/one @@ -84,8 +78,13 @@ NETWORK_SIZE = 254 MAC_PREFIX = "02:00" #******************************************************************************* -# Image Repository Configuration +# DataStore Configuration #******************************************************************************* +# DATASTORE_LOCATION: Path for Datastores in the hosts. It IS the same for all +# the hosts in the cluster. DATASTORE_LOCATION IS ONLY FOR THE HOSTS AND *NOT* +# THE FRONT-END. It defaults to /var/lib/one/datastores (or +# $ONE_LOCATION/var/datastores in self-contained mode) +# # DEFAULT_IMAGE_TYPE: This can take values # OS Image file holding an operating system # CDROM Image file holding a CDROM @@ -97,6 +96,9 @@ MAC_PREFIX = "02:00" # xvd XEN Virtual Disk # vd KVM virtual disk #******************************************************************************* + +#DATASTORE_LOCATION = /var/lib/one/datastores + DEFAULT_IMAGE_TYPE = "OS" DEFAULT_DEVICE_PREFIX = "hd" @@ -199,7 +201,7 @@ IM_MAD = [ name="im_dummy", executable="one_im_dummy"] # KVM Virtualization Driver Manager Configuration # -r number of retries when monitoring a host # -t number of threads, i.e. number of hosts monitored at the same time -# -l actions executed locally, command can be +# -l actions executed locally, command can be # overridden for each action. # Valid actions: deploy, shutdown, cancel, save, restore, migrate, poll # An example: "-l migrate,poll=poll_ganglia,save" @@ -216,7 +218,7 @@ VM_MAD = [ # XEN Virtualization Driver Manager Configuration # -r number of retries when monitoring a host # -t number of threads, i.e. number of hosts monitored at the same time -# -l actions executed locally, command can be +# -l actions executed locally, command can be # overridden for each action. # Valid actions: deploy, shutdown, cancel, save, restore, migrate, poll # An example: "-l migrate,poll=poll_ganglia,save" @@ -271,75 +273,33 @@ VM_MAD = [ name="vmm_dummy", executable="one_vmm_dummy", type="xml" ] # executable: path of the transfer driver executable, can be an # absolute path or relative to $ONE_LOCATION/lib/mads (or # /usr/lib/one/mads/ if OpenNebula was installed in /) -# -# arguments : for the driver executable, usually a commands configuration file -# , can be an absolute path or relative to $ONE_LOCATION/etc (or -# /etc/one/ if OpenNebula was installed in /) +# arguments : +# -t: number of threads, i.e. number of transfers made at the same time +# -d: list of transfer drivers separated by commas, if not defined all the +# drivers available will be enabled #******************************************************************************* -#------------------------------------------------------------------------------- -# SHARED Transfer Manager Driver Configuration -#------------------------------------------------------------------------------- TM_MAD = [ - name = "tm_shared", executable = "one_tm", - arguments = "tm_shared/tm_shared.conf" ] -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# SSH Transfer Manager Driver Configuration -#------------------------------------------------------------------------------- -#TM_MAD = [ -# name = "tm_ssh", -# executable = "one_tm", -# arguments = "tm_ssh/tm_ssh.conf" ] -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Dummy Transfer Manager Driver Configuration -#------------------------------------------------------------------------------- -TM_MAD = [ - name = "tm_dummy", - executable = "one_tm", - arguments = "tm_dummy/tm_dummy.conf" ] -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# LVM Transfer Manager Driver Configuration -#------------------------------------------------------------------------------- -#TM_MAD = [ -# name = "tm_lvm", -# executable = "one_tm", -# arguments = "tm_lvm/tm_lvm.conf" ] -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# VMware DataStore Transfer Manager Driver Configuration -#------------------------------------------------------------------------------- -#TM_MAD = [ -# name = "tm_vmware", -# executable = "one_tm", -# arguments = "tm_vmware/tm_vmware.conf" ] -#------------------------------------------------------------------------------- + arguments = "-t 15 -d dummy,lvm,shared,qcow2,ssh,vmware,iscsi" ] #******************************************************************************* -# Image Manager Driver Configuration +# Datastore Driver Configuration #******************************************************************************* -# Drivers to manage the image repository, specialized for the storage backend +# Drivers to manage the datastores, specialized for the storage backend # executable: path of the transfer driver executable, can be an # absolute path or relative to $ONE_LOCATION/lib/mads (or # /usr/lib/one/mads/ if OpenNebula was installed in /) # # arguments : for the driver executable +# -t number of threads, i.e. number of repo operations at the same time +# -d datastore mads separated by commas #******************************************************************************* -#------------------------------------------------------------------------------- -# FS based Image Manager Driver Configuration -# -t number of threads, i.e. number of repo operations at the same time -#------------------------------------------------------------------------------- -IMAGE_MAD = [ - executable = "one_image", - arguments = "fs -t 15" ] -#------------------------------------------------------------------------------- + +DATASTORE_MAD = [ + executable = "one_datastore", + arguments = "-t 15 -d fs,vmware,iscsi,dummy" +] #******************************************************************************* # Hook Manager Configuration @@ -376,7 +336,6 @@ IMAGE_MAD = [ # allocated # - NO, The hook is executed in the OpenNebula server (default) # -# # Host Hooks (HOST_HOOK) defined by: # name : for the hook, useful to track the hook (OPTIONAL) # on : when the hook should be executed, @@ -395,10 +354,8 @@ IMAGE_MAD = [ # - YES, The hook is executed in the host # - NO, The hook is executed in the OpenNebula server (default) #------------------------------------------------------------------------------- - HM_MAD = [ executable = "one_hm" ] - #------------------------------------------------------------------------------- #******************************************************************************* @@ -455,8 +412,12 @@ HM_MAD = [ # --authz: authorization module # # SESSION_EXPIRATION_TIME: Time in seconds to keep an authenticated token as -# valid. During this time, the driver is not used. Use 0 to disable session +# valid. During this time, the driver is not used. Use 0 to disable session # caching +# +# ENABLE_OTHER_PERMISSIONS: Whether or not to enable the permissions for +# 'other'. Users in the oneadmin group will still be able to change +# these permissions. Values: YES or NO #******************************************************************************* AUTH_MAD = [ @@ -467,3 +428,19 @@ AUTH_MAD = [ SESSION_EXPIRATION_TIME = 900 +#ENABLE_OTHER_PERMISSIONS = "YES" + + +#******************************************************************************* +# Restricted Attributes Configuration +#******************************************************************************* +# The following attributes are restricted to users outside the oneadmin group +#******************************************************************************* + +VM_RESTRICTED_ATTR = "CONTEXT/FILES" +VM_RESTRICTED_ATTR = "DISK/SOURCE" +VM_RESTRICTED_ATTR = "NIC/MAC" +VM_RESTRICTED_ATTR = "NIC/VLAN_ID" +VM_RESTRICTED_ATTR = "RANK" + +IMAGE_RESTRICTED_ATTR = "SOURCE" From 06f96f8f9bcb7f111013672ebadf93276c9bacba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 30 Mar 2012 15:49:32 +0200 Subject: [PATCH 15/16] Bug #1193: Fix onedb migrator 3.3.0_to_3.3.80.rb when IMAGE/SOURCE is empty (cherry picked from commit 3d347d024edc45e6b99c3c0a121062d7fae20961) --- src/onedb/3.3.0_to_3.3.80.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/onedb/3.3.0_to_3.3.80.rb b/src/onedb/3.3.0_to_3.3.80.rb index 3fd8ee4631..8d94203555 100644 --- a/src/onedb/3.3.0_to_3.3.80.rb +++ b/src/onedb/3.3.0_to_3.3.80.rb @@ -234,6 +234,11 @@ module Migrator # Update SOURCE doc.root.each_element("SOURCE") { |e| previous_source = e.text + + if previous_source.nil? + next + end + hash = previous_source.split('/')[-1] if ( hash.length == 32 && hash =~ /^[0-9A-F]+$/i ) From 3c6f0305a1e7398e4f195d4eea27683a2c8b0707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 30 Mar 2012 16:05:34 +0200 Subject: [PATCH 16/16] Bug #1194: Set other_u permission for the default DS in onedb migrator 3.3.0 to 3.3.80 (cherry picked from commit ec56bc2c9c5db6ae0ab6d98ff828587f0fb4b5ec) --- src/onedb/3.3.0_to_3.3.80.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onedb/3.3.0_to_3.3.80.rb b/src/onedb/3.3.0_to_3.3.80.rb index 8d94203555..b162249390 100644 --- a/src/onedb/3.3.0_to_3.3.80.rb +++ b/src/onedb/3.3.0_to_3.3.80.rb @@ -280,7 +280,7 @@ module Migrator " 1" << " 0" << " 0" << - " 0" << + " 1" << " 0" << " 0" << " " << @@ -304,7 +304,7 @@ module Migrator :gid => 0, :owner_u => 1, :group_u => 1, - :other_u => 0) + :other_u => 1) return true end