diff --git a/include/RequestManagerVMTemplate.h b/include/RequestManagerVMTemplate.h index 95c0a2f200..6c15ea6e98 100644 --- a/include/RequestManagerVMTemplate.h +++ b/include/RequestManagerVMTemplate.h @@ -68,6 +68,26 @@ public: RequestAttributes& att); }; +/* ------------------------------------------------------------------------- */ +/* ------------------------------------------------------------------------- */ + +class VMTemplateClone : public RequestManagerVMTemplate +{ +public: + VMTemplateClone(): + RequestManagerVMTemplate("VMTemplateClone", + "Clone an existing virtual machine template", + "A:sis") + { + auth_op = AuthRequest::USE; + }; + + ~VMTemplateClone(){}; + + void request_execute(xmlrpc_c::paramList const& _paramList, + RequestAttributes& att); +}; + /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ diff --git a/install.sh b/install.sh index f4654e47e1..10b5915d6e 100755 --- a/install.sh +++ b/install.sh @@ -259,6 +259,7 @@ SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \ $SUNSTONE_LOCATION/public/locale/en_US \ $SUNSTONE_LOCATION/public/locale/ru \ $SUNSTONE_LOCATION/public/locale/it_IT \ + $SUNSTONE_LOCATION/public/locale/pt_PT \ $SUNSTONE_LOCATION/public/vendor \ $SUNSTONE_LOCATION/public/vendor/jQueryLayout \ $SUNSTONE_LOCATION/public/vendor/dataTables \ @@ -471,6 +472,7 @@ INSTALL_SUNSTONE_FILES=( 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 + SUNSTONE_PUBLIC_LOCALE_PT_PT:$SUNSTONE_LOCATION/public/locale/pt_PT ) INSTALL_SUNSTONE_ETC_FILES=( @@ -1278,6 +1280,10 @@ SUNSTONE_PUBLIC_LOCALE_IT_IT=" src/sunstone/public/locale/it_IT/it_IT.js \ src/sunstone/public/locale/it_IT/it_datatable.txt" +SUNSTONE_PUBLIC_LOCALE_PT_PT=" +src/sunstone/public/locale/pt_PT/pt_PT.js \ +src/sunstone/public/locale/pt_PT/pt_datatable.txt" + #----------------------------------------------------------------------------- diff --git a/share/etc/oned.conf b/share/etc/oned.conf index a2f3890c3f..0bf1cd0492 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -406,10 +406,9 @@ HM_MAD = [ # absolute path or relative to $ONE_LOCATION/lib/mads (or # /usr/lib/one/mads/ if OpenNebula was installed in /) # -# arguments : -# --authn: list of authentication modules separated by commas, if not -# defined all the modules available will be enabled -# --authz: authorization module +# authn : list of authentication modules separated by commas, if not +# defined all the modules available will be enabled +# authz : list of authentication modules separated by commas # # 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 diff --git a/src/cli/onetemplate b/src/cli/onetemplate index 6016027f02..163bb2ba8a 100755 --- a/src/cli/onetemplate +++ b/src/cli/onetemplate @@ -88,6 +88,20 @@ cmd=CommandParser::CmdParser.new(ARGV) do end end + clone_desc = <<-EOT.unindent + Creates a new Template from an existing one + EOT + + command :clone, clone_desc, :templateid, :name do + helper.perform_action(args[0],options,"cloned") do |t| + res = t.clone(args[1]) + + if !OpenNebula.is_error?(res) + puts "ID: #{res}" + end + end + end + delete_desc = <<-EOT.unindent Deletes the given Image EOT diff --git a/src/oca/ruby/OpenNebula/Template.rb b/src/oca/ruby/OpenNebula/Template.rb index 327891bbcb..97b3e75d8e 100644 --- a/src/oca/ruby/OpenNebula/Template.rb +++ b/src/oca/ruby/OpenNebula/Template.rb @@ -32,7 +32,8 @@ module OpenNebula :publish => "template.publish", :delete => "template.delete", :chown => "template.chown", - :chmod => "template.chmod" + :chmod => "template.chmod", + :clone => "template.clone" } # Creates a Template description with just its identifier @@ -143,6 +144,20 @@ module OpenNebula group_m, group_a, other_u, other_m, other_a) end + # Clones this template into a new one + # + # @param name [String] Name for the new Template. + # + # @return [Integer, OpenNebula::Error] The new Template ID in case + # of success, Error otherwise + def clone(name) + return Error.new('ID not defined') if !@pe_id + + rc = @client.call(TEMPLATE_METHODS[:clone], @pe_id, name) + + return rc + end + ####################################################################### # Helpers to get Template information ####################################################################### diff --git a/src/ozones/Server/bin/ozones-server b/src/ozones/Server/bin/ozones-server index cf75a32d8c..fe2843754b 100755 --- a/src/ozones/Server/bin/ozones-server +++ b/src/ozones/Server/bin/ozones-server @@ -22,6 +22,7 @@ if [ -z "$ONE_LOCATION" ]; then OZONES_SERVER=$OZONES_LOCATION/ozones-server.rb OZONES_LOCK_FILE=/var/lock/one/.ozones.lock OZONES_LOG=/var/log/one/ozones-server.log + OZONES_LOG_ERROR=/var/log/one/ozones-server.error OZONES_CONF=/etc/one/ozones-server.conf else OZONES_PID=$ONE_LOCATION/var/ozones.pid diff --git a/src/rm/RequestManager.cc b/src/rm/RequestManager.cc index 9d2099ea18..f18bad3504 100644 --- a/src/rm/RequestManager.cc +++ b/src/rm/RequestManager.cc @@ -236,6 +236,7 @@ void RequestManager::register_xml_methods() // VMTemplate Methods xmlrpc_c::methodPtr template_instantiate(new VMTemplateInstantiate()); + xmlrpc_c::methodPtr template_clone(new VMTemplateClone()); // VirtualMachine Methods xmlrpc_c::methodPtr vm_deploy(new VirtualMachineDeploy()); @@ -356,6 +357,7 @@ void RequestManager::register_xml_methods() RequestManagerRegistry.addMethod("one.template.info", template_info); RequestManagerRegistry.addMethod("one.template.chown", template_chown); RequestManagerRegistry.addMethod("one.template.chmod", template_chmod); + RequestManagerRegistry.addMethod("one.template.clone", template_clone); RequestManagerRegistry.addMethod("one.templatepool.info",template_pool_info); diff --git a/src/rm/RequestManagerVMTemplate.cc b/src/rm/RequestManagerVMTemplate.cc index d354d5a037..360ac80434 100644 --- a/src/rm/RequestManagerVMTemplate.cc +++ b/src/rm/RequestManagerVMTemplate.cc @@ -61,7 +61,7 @@ void VMTemplateInstantiate::request_execute(xmlrpc_c::paramList const& paramList // Check template for restricted attributes, but only if the Template owner // is not oneadmin - if ( perms.uid != 0 && perms.gid != GroupPool::ONEADMIN_ID ) + if ( perms.uid != UserPool::ONEADMIN_ID && perms.gid != GroupPool::ONEADMIN_ID ) { if (tmpl->check(aname)) { @@ -84,7 +84,6 @@ void VMTemplateInstantiate::request_execute(xmlrpc_c::paramList const& paramList if ( att.uid != 0 ) { AuthRequest ar(att.uid, att.gid); - string tmpl_txt; ar.add_auth(auth_op, perms); //USE TEMPLATE @@ -119,3 +118,78 @@ void VMTemplateInstantiate::request_execute(xmlrpc_c::paramList const& paramList /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ +void VMTemplateClone::request_execute(xmlrpc_c::paramList const& paramList, + RequestAttributes& att) +{ + int source_id = xmlrpc_c::value_int(paramList.getInt(1)); + string name = xmlrpc_c::value_string(paramList.getString(2)); + + int rc, new_id; + + PoolObjectAuth perms; + + VMTemplatePool * tpool = static_cast(pool); + + VirtualMachineTemplate * tmpl; + VMTemplate * source_tmpl; + + string error_str; + + source_tmpl = tpool->get(source_id,true); + + if ( source_tmpl == 0 ) + { + failure_response(NO_EXISTS, + get_error(object_name(auth_object),source_id), + att); + + return; + } + + tmpl = source_tmpl->clone_template(); + + source_tmpl->get_permissions(perms); + + source_tmpl->unlock(); + + tmpl->erase("NAME"); + tmpl->set(new SingleAttribute("NAME",name)); + + if ( att.uid != 0 ) + { + string tmpl_str = ""; + + AuthRequest ar(att.uid, att.gid); + + ar.add_auth(auth_op, perms); //USE TEMPLATE + + tmpl->to_xml(tmpl_str); + + ar.add_create_auth(auth_object, tmpl_str); + + if (UserPool::authorize(ar) == -1) + { + failure_response(AUTHORIZATION, + authorization_error(ar.message, att), + att); + + delete tmpl; + return; + } + } + + rc = tpool->allocate(att.uid, att.gid, att.uname, att.gname, + tmpl, &new_id, error_str); + + if ( rc < 0 ) + { + failure_response(INTERNAL, allocate_error(error_str), att); + return; + } + + success_response(new_id, att); +} + +/* -------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ + diff --git a/src/sunstone/bin/sunstone-server b/src/sunstone/bin/sunstone-server index 5065a5122d..e9b3b0e1ad 100755 --- a/src/sunstone/bin/sunstone-server +++ b/src/sunstone/bin/sunstone-server @@ -22,6 +22,7 @@ if [ -z "$ONE_LOCATION" ]; then SUNSTONE_SERVER=/usr/lib/one/sunstone/sunstone-server.rb SUNSTONE_LOCK_FILE=/var/lock/one/.sunstone.lock SUNSTONE_LOG=/var/log/one/sunstone.log + SUNSTONE_LOG_ERROR=/var/log/one/sunstone.error SUNSTONE_CONF=/etc/one/sunstone-server.conf else SUNSTONE_PID=$ONE_LOCATION/var/sunstone.pid diff --git a/src/sunstone/public/js/plugins/config-tab.js b/src/sunstone/public/js/plugins/config-tab.js index f0c90d5df6..24a568628a 100644 --- a/src/sunstone/public/js/plugins/config-tab.js +++ b/src/sunstone/public/js/plugins/config-tab.js @@ -31,6 +31,7 @@ var config_tab_content = \ \ \ + \ \ \ \ diff --git a/src/sunstone/public/locale/pt_PT/pt_PT.js b/src/sunstone/public/locale/pt_PT/pt_PT.js new file mode 100644 index 0000000000..00425f4ff1 --- /dev/null +++ b/src/sunstone/public/locale/pt_PT/pt_PT.js @@ -0,0 +1,574 @@ +//Translated by André Monteiro +lang="pt_PT" +datatable_lang="pt_datatable.txt" +locale={ + "802.1Q":"802.1Q", + "Accept (default)":"Aceitar (por omissão)", + "ACL":"ACL", + "ACL Rules":"Regras ACL", + "ACLs":"ACLs", + "ACL String preview":"Pré-visualização do texto ACL", + "ACPI":"ACPI", + "Add":"Adicionar", + "Add context variables":"Adicionar variáveis de contexto", + "Add custom variables":"Adicionar variáveis personalizáveis", + "Add disk/image":"Adicionar disco/imagem", + "Add disks/images":"Adicionar discos/imagens", + "Add Graphics":"Adicionar gráficas", + "Add Hypervisor raw options":"Adicionar opções raw do Hipervisor", + "Add inputs":"Adicionar entradas", + "Add lease":"Adicionar alocação", + "Add network":"Adicionar rede", + "Add placement options":"Adicionar opções de colocação", + "Admin":"Admin", + "Administrate":"Administrar", + "Advanced mode":"Modo avançado", + "Affected resources":"Recursos afectados", + "All":"Tudo", + "Allowed operations":"Operações permitidas", + "Amount of RAM required for the VM, in Megabytes.":"Quantidade de RAM necessária para a VM, em Megabytes.", + "Applies to":"Aplica-se a", + "Architecture":"Arquitectura", + "are mandatory":"são obrigatórios", + "Arguments for the booting kernel":"Argumentos para arranque do kernel", + "Authentication":"Autenticação", + "Authentication driver":"Driver de autenticação", + "Base path":"Caminho base", + "Block":"Bloquear", + "Boolean expression that rules out provisioning hosts from list of machines suitable to run this VM":"Expressões boleanas que excluam hosts de provisionamento da lista de máquinas para correr esta VM", + "Boot":"Boot", + "Boot device type":"Tipo de dispositivo de arranque", + "Bootloader":"Bootloader", + "Boot method":"Método de arranque", + "Boot/OS options":"Opções de arranque/SO", + "Bridge":"Bridge", + "Bus":"Bus", + "Cancel":"Cancelar", + "Cannot contact server: is it running and reachable?":"Não é possível contactar o servidor está a correr ou comunicável?", + "Canvas not supported.":"Canvas não suportado.", + "Capacity":"Capacidade", + "Capacity options":"Opções de capacidade", + "cdrom":"cdrom", + "CD-ROM":"CD-ROM", + "Change":"Alterar", + "Change authentication":"Alterar autenticação", + "Change group":"Alterar grupo", + "Change owner":"Alterar dono", + "Change password":"Alterar palavra-passe", + "Change password successful":"Alteração de palavra-passe bem sucedida", + "Changing language":"A alterar língua", + "Clone":"Clonar", + "Clone this image":"Clonar esta imagem", + "Cluster":"Cluster", + "Cluster information":"Informação do Cluster", + "Cluster name missing!":"Falta o nome do Cluster!", + "Clusters":"Clusters", + "Community":"Comunidade", + "Configuration":"Configuração", + "Confirmation of action":"Confirmação da acção", + "Context":"Contexto", + "Context variable name and value must be filled in":"A variável de contexto e valor devem ser preenchidos", + "Core":"Core", + "CPU":"CPU", + "CPU architecture to virtualization":"Arquitectura CPU para virtualização", + "CPU Monitoring information":"Informação de monitorização do CPU", + "CPU Use":"Utilização de CPU", + "Create":"Criar", + "Create ACL":"Criar ACL", + "Create an empty datablock":"Criar bloco de dados vazio", + "Create cluster":"Criar cluster", + "Create Datastore":"Criar Datastore", + "Create group":"Criar grupo", + "Create host":"Criar host", + "Create Image":"Criar imagem", + "Create new":"Criar novo", + "Create new ACL":"Criar novo ACL", + "Create new Cluster":"Criar novo Cluster", + "Create new datastore":"Criar novo datastore", + "Create new Datastore":"Criar novo Datastore", + "Create new Group":"Criar novo Grupo", + "Create new host":"Criar novo host", + "Create new Host":"Criar novo Host", + "Create new Image":"Criar nova imagem", + "Create new User":"Criar novo Utilizador", + "Create new Virtual Machine":"Criar nova Máquina Virtual VM", + "Create new virtual network":"Criar nova rede virtual", + "Create new Virtual Network":"Criar nova Rede Virtual", + "Create new VM Template":"Criar novo Modelo de VM", + "Create user":"Criar utilizador", + "Create Virtual Machine":"Criar Máquina Virtual VM", + "Create Virtual Network":"Criar Rede Virtual", + "Create VM Template":"Criar Modelo de VM", + "Current disks":"Discos actuais", + "Current inputs":"Entradas actuais", + "Current leases":"Alocações actuais", + "Current NICs":"NICs actuais", + "Current number of datastores in this cluster":"Número actual de datastores neste cluster", + "Current number of hosts in this cluster":"Número actual de hosts neste cluster", + "Current number of virtual networks in this cluster":"Número actual de redes virtuais neste cluster", + "Current variables":"Variáveis actuais", + "Custom attribute name and value must be filled in":"O nome do atributo personalizável e o valor devem ser preenchidos", + "Custom attributes":"Atributos personalizáveis", + "Custom variable name and value must be filled in":"O nome do atributo personalizável e o valor devem ser preenchidos", + "Custom variables":"Atributos personalizáveis", + "Dashboard":"Dashboard", + "Data":"Dados", + "Datablock":"Datablock", + "Datastore":"Datastore", + "Datastore information":"Informação da Datastore", + "Datastore manager":"Gestor da Datastore", + "Datastores":"Datastores", + "Datastore template":"Modelo de Datastore", + "Datastore Template":"Modelo de Datastore", + "Datastore updated correctly":"Datastore actualizada correctamente", + "Default":"Por omissão", + "Default (current image type)":"Por omissão (tipo de imagem actual)", + "Default (dummy)":"Por omissão (dummy)", + "Defaults to template name when emtpy":"Nome do modelo por omissão, quando vazio", + "Define a subnet by IP range":"Defina uma subrede por intervalo IP", + "Delete":"Apagar", + "Delete host":"Apagar host", + "Deploy":"Lançar", + "Deploy ID":"ID de lançamento", + "Deploy # VMs":"Lançar # VMs", + "Description":"Descrição", + "Device prefix":"Prefixo do dispositivo", + "Device to be mounted as root":"Dispositivo a ser montado como root", + "Device to map image disk. If set, it will overwrite the default device mapping":"Dispositivo para mapear imagem do disco. Se definido, vai sobrepôr-se ao mapeamento por omissão.", + "Disable":"Desactivar", + "disabled":"desactivado", + "Disallow access to the VM through the specified ports in the TCP protocol":"Inibir acesso à VM através dos portos especificados do protocolo TCP", + "Disallow access to the VM through the specified ports in the UDP protocol":"Inibir acesso à VM através dos portos especificados do protocolo UDP", + "Disk":"Disco", + "Disk file location path or URL":"Localização do ficheiro de disco ou URL", + "disk id":"id de disco", + "Disks":"Discos", + "Disk type":"Tipo de disco", + "Documentation":"Documentação", + "Do you want to proceed?":"Deseja continuar?", + "Driver":"Driver", + "Driver default":"Driver por omissão", + "Drivers":"Drivers", + "Drop":"Apagar", + "DS Mad":"DS Mad", + "Dummy":"Dummy", + "EC2":"EC2", + "Enable":"Activar", + "English":"English", + "Error":"Erro", + "Etables":"Etables", + "failed":"falhou", + "fd":"fd", + "Features":"Funcionalidades", + "Fields marked with":"Campos marcados com", + "File":"Ficheiro", + "Filesystem":"Sistema de ficheiros", + "Filesystem type":"Tipo de sistema de ficheiros", + "Filesystem type for the fs images":"Tipo de sistema de ficheiros para a imagem fs", + "Fill in a new password":"Preencha de novo a palavra-passe", + "Fixed network":"Rede fixa", + "Floppy":"Disquete", + "Fold / Unfold all sections":"Expandir / Colapsar todas as secções", + "Format":"Formatar", + "FS":"FS", + "FS type":"Tipo de FS", + "Graphics":"Graphicos", + "Graphics type":"Tipo de gráficos", + "Group":"Grupo", + "Group ":"Grupo ", + "Group name":"Nome do grupo", + "Groups":"Grupos", + "Hardware that will emulate this network interface. With Xen this is the type attribute of the vif.":"Hardware que vai emular esta interface de rede interface. Com Xen, este é um tipo de atributo do vif.", + "hd":"hd", + "Historical monitoring information":"Histórico de informação de monitorização", + "History information":"Histórico de informação", + "hold":"pausar", + "Hold":"Pausa", + "Hold lease":"Pausar alocação", + "Host":"Host", + "Host information":"Informação do host", + "Hostname":"Nome do host", + "Host name missing!":"Nome do host em falta!", + "Host parameters":"Parâmetros do host", + "Hosts":"Hosts", + "Hosts CPU":"CPU dos hosts", + "Host shares":"Partilhas dos hosts", + "Hosts memory":"Memória dos hosts", + "Hosts (total/active)":"Hosts (total/activos)", + "Host template":"Modelo de host", + "Human readable description of the image for other users.":"Descrição legível da imagem por outros utilizadors.", + "HW address associated with the network interface":"Endereço HW associado à interface de rede", + "Icmp":"Icmp", + "ICMP policy":"Política ICMP", + "id":"id", + "ID":"ID", + "IDE":"IDE", + "Image":"imagem", + "Image information":"Informação da imagem", + "Image location":"Localização da imagem", + "Image name":"Nome da imagem", + "Images":"imagens", + "Image template":"Modelo da imagem", + "Image updated correctly":"Imagem actualizada correctamente", + "IM MAD":"IM MAD", + "Info":"Info", + "information":"informação", + "Information":"Informação", + "Information Manager":"Gestor de informação", + "Infrastructure":"Infraestrutura", + "Infrastructure resources":"Recursos da infraestrutura", + "Initrd":"Initrd", + "Inputs":"entradas", + "Instantiate":"Instanciar", + "IP":"IP", + "IP End":"IP Final", + "IPs":"IPs", + "IP Start":"IP Inicial", + "IP to listen on":"IP a escutar", + "iSCSI":"iSCSI", + "Italian":"Italian", + "Kernel":"Kernel", + "Kernel commands":"Comandos do kernel", + "Keyboard configuration locale to use in the VNC display":"Configuração local do teclado a usar na visualização VNC", + "Keymap":"Mapeamento do teclado", + "KVM":"KVM", + "Language":"Língua", + "LCM State":"Estado LCM", + "Lease IP":"Alocação IP", + "Lease MAC (opt):":"Alocação MAC (opcional):", + "Lease management":"Gestão de alocação", + "Leases information":"Informação de alocação", + "Listen IP":"IP a escutar", + "Live migrate":"Migração em tempo real", + "Loading":"A carregar", + "Loading new language... please wait":"A carregar nova língua... por favor aguarde", + "MAC":"MAC", + "Make non persistent":"Tornar não persistente", + "Make persistent":"Tornar persistente", + "Manage":"Gerir", + "Manage cluster datastores":"Gerir datastores do cluster", + "Manage cluster hosts":"Gerir hosts", + "Manage cluster virtual networks":"Gerir redes virtuais do cluster", + "Manage unclustered datastores":"Gerir datastores sem cluster", + "Manage unclustered hosts":"Gerir hosts sem cluster", + "Manage unclustered virtual networks":"Gerir redes virtuais sem cluster", + "Manual":"Manual", + "Max Mem":"Mem Máx", + "Memory":"Memória", + "Memory monitoring information":"Informação de monitorização de memória", + "Memory use":"Uso de memória", + "Migrate":"Migrar", + "Model":"Modelo", + "Monitoring information":"Informação de monitorização", + "Mount image as read-only":"Montar imagem como só com permissões de leitura", + "Mouse":"Rato", + "Name":"Nome", + "Name for the context variable":"Nome da variável de contexto", + "Name for the custom variable":"Nome da variável personalizada", + "Name for the tun device created for the VM":"Nome do dispositivo criado para a VM", + "Name of a shell script to be executed after creating the tun device for the VM":"Nome do script da linha de comandos a ser executado depois da criação do dispositovo para a VM", + "Name of the bridge the network device is going to be attached to":"Nome da bridge do dispositivo de rede ao qual vai ser associado", + "Name of the image to use":"Nome da imagem a ser usada", + "Name of the network to attach this device":"Nome da rede a associar ao dispositivo", + "Name that the Image will get. Every image must have a unique name.":"Nome que a imagem vai ter. Cada imagem te que ter um nome único.", + "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 da VM na descrição. Se o NOME não for indicado, um nome irá ser gerado pelo ONE na forma one-<VID>.", + "Net_RX":"Net_RX", + "Net_TX":"Net_TX", + "network":"rede", + "Network":"Rede", + "Network Address":"Enderaço de rede", + "Network is unreachable: is OpenNebula running?":"A rede está inalcançável: o OpenNebula está a correr?", + "Network mask":"Máscara de rede", + "Network Mask":"Máscara de Rede", + "Network mode":"Modo de rede", + "Network reception":"Recepção de rede", + "Network transmission":"Transmissão de rede", + "Network type":"Tipo de rede", + "+ New":"+ Novo", + "+ New Group":"+ Novo Grupo", + "New password":"Nova palavra-passe", + "No":"Não", + "No datastores in this cluster":"Não há datastores neste cluster", + "No disk id or image name specified":"ID de disco id ou nome da imagem não especificados", + "No disks defined":"Não há discos definidos", + "No hosts in this cluster":"Não há hosts neste cluster", + "No leases to show":"Não há alocações a mostrar", + "None":"Nenhum", + "No virtual networks in this cluster":"Não há redes virtuis neste cluster", + "Number of virtual cpus. This value is optional, the default hypervisor behavior is used, usually one virtual CPU.":"Número de CPUs virtuais. Este valor é opcional, sendo usado o valor por omissão do hipervisor, normalmente 1 CPU virtual.", + "OK":"OK", + "Open VNC Session":"Abrir Sessão VNC", + "Open vSwitch":"Abrir vSwitch", + "Optional, please select":"Opcional, por favor escolha", + "OS":"SO", + "OS and Boot options":"SO e opções de arranque", + "Other":"Outros", + "Owned by group":"Pertencente ao grupo", + "Owner":"Dono", + "PAE":"PAE", + "Password":"Palavra-passe", + "Password for the VNC server":"Palavra-passe para os ervidor VNC", + "Path":"Caminho", + "Path to the bootloader executable":"Caminho para o executável bootloader", + "Path to the initrd image":"Caminho para a imagem 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.":"Caminho para o ficheiro original que vai ser copiado para o repositório de imagens. Se não especificado para um tipo de imagem DATABLOCK, uma imagem vazia será criada.", + "Path to the OS kernel to boot the image":"Caminho para o kernel do SO para arrancar a imagem", + "Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.":"Percentagem de CPU dividida por 100 necessária para a Máquina Virtual VM. Metade de um processador escreve-se 0.5.", + "Permissions":"Permissões", + "Permits access to the VM only through the specified ports in the TCP protocol":"Permite o acesso à VM através dos portos especificados do protocolo TCP", + "Permits access to the VM only through the specified ports in the UDP protocol":"Permits o acesso à VM através dos portos especificados do protocolo UDP", + "Persistence of the image":"Persistência da imagem", + "Persistent":"Persistente", + "Physical address extension mode allows 32-bit guests to address more than 4 GB of memory":"O modo de extensão de endereço físico permite a guests de 32-bit alocar mais do que 4GB de memória", + "Physical device":"Dispositivo físico", + "Placement":"Colocação", + "Please choose":"Por favor seleccione", + "Please, choose and modify the datastore you want to update":"Por favor, seleccione e modifique a datastore que quer actualizar", + "Please, choose and modify the image you want to update":"Por favor, seleccione e modifique a imagem que quer actualizar", + "Please, choose and modify the template you want to update":"Por favor, seleccione e modifique o modelo que quer actualizar", + "Please, choose and modify the virtual machine you want to update":"Por favor, seleccione e modifique a máquina virtual que quer actualizar", + "Please, choose and modify the virtual network you want to update":"Por favor, seleccione e modifique a rede virtual que quer actualizar", + "Please choose path if you have a file-based image. Choose source otherwise or create an empty datablock disk.":"Por favor seleccione o caminho se tiver uma image de ficheiro. Seleccione a fonte caso contrário ou crie um disco bloco de dados vazio.", + "Please choose the new type of authentication for the selected users":"Por favor seleccione the novo tipo de autenticação para os utilizadores seleccionados", + "Please provide a lease IP":"Por favor insira a alocação IP", + "Please provide a resource ID for the resource(s) in this rule":"Por favor insira o ID de recurso para os recurso(s) nesta regra", + "Please select":"Por favor seleccione", + "Please select a datastore for this image":"Por favor seleccione a datastore para esta imagem", + "Please select at least one resource":"Por favor seleccione pelo menos um recurso", + "Please specify to who this ACL applies":"Por favor especifique a quem se aplica este ACL", + "Port":"Porto", + "Port blacklist":"Lista negra de portos", + "Port for the VNC server":"Porto para o servidor VNC", + "Port whitelist":"Lista verde de portos", + "Predefined":"Pré-definido", + "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”).":"Prefixp para o dispositivo emulado com esta imagem. Por exemplo, “hd”, “sd”. Se omitido, o valor por omissão é o definido em oned.conf (instalação por omissão é “hd”).", + "Previous action":"Acção anterior", + "Prolog time":"Tempo de prolog", + "Provide a path":"Indique um caminho", + "Provide a source":"Indique uma fonte", + "PS2":"PS2", + "Public":"Público", + "Quickstart":"Início rápido", + "Ranged network":"Rede com limite de intervalo", + "Rank":"Posição", + "Raw":"Raw", + "Raw data to be passed directly to the hypervisor":"Dados raw a serem passados directamente ao hipervisor", + "Read only":"Só de leitura", + "Reason":"Razão", + "Reboot":"Reiniciar", + "Refresh list":"Actualizar lista", + "Register time":"Registar tempo", + "Registration time":"Registo de tempo", + "release":"libertar", + "Release":"Libertar", + "Remove selected":"Remover seleccionado", + "Request an specific IP from the Network":"Pedir um IP específico de rede", + "Requirements":"Rquisitos", + "Reset":"Reset", + "Resource ID":"ID do recurso", + "Resource ID / Owned by":"ID do recurso / Pertencente a", + "Resource subset":"Subconjunto do recurso", + "Restart":"Reiniciar", + "Resubmit":"Resubmeter", + "Resume":"Continuar", + "Retrieving":"A obter", + "Root":"Root", + "running":"A correr", + "Running VMs":"VMs a correr", + "Running #VMS":"#VMS a correr", + "Russian":"Russian", + "Save":"Guardar", + "Save as":"Guardar como", + "Saveas for VM with ID":"Guardar como para VM com ID", + "Save this image after shutting down the VM":"Guardar esta imagem depois de desligar a VM", + "Script":"Script", + "SCSI":"SCSI", + "SDL":"SDL", + "Secure websockets connection":"Ligação segura de websockets", + "Select a datastore":"Seleccionar a datastore", + "Select a network":"Seleccionar a rede", + "Select an image":"Seleccionar a imagem", + "Select a template":"Seleccionar o modelo", + "Select a VM":"Seleccionar a VM", + "Select boot method":"Seleccionar o método de arranque", + "Select cluster":"Seleccionar cluster", + "Select disk":"Seleccionar disco", + "Select template":"Seleccionar modelo", + "Select the datastore for this image":"Seleccione a datastore para este imagem", + "Select the destination cluster:":"Seleccione o cluster de destino:", + "Select the new group":"Seleccione o novo grupo", + "Select the new owner":"Seleccione o novo dono", + "Sequence":"Sequência", + "Server (Cipher)":"Servidor (Cipher)", + "Server (x509)":"Servidor (x509)", + "Setup Networks":"Configuração de redes", + "Shared":"Shared", + "shared,ssh,iscsi,dummy":"shared,ssh,iscsi,dummy", + "Shutdown":"Desligar", + "Sign out":"Terminar sessão", + "Size":"Tamanho", + "Size in MB":"Tamanho in MB", + "Size (Mb)":"Tamanho (Mb)", + "Size of the datablock in MB.":"Tamanho do bloco de dados em MB.", + "Skipping VM ":"A saltar VM ", + "Source":"Fonte", + "Source to be used in the DISK attribute. Useful for not file-based images.":"A fonte deve ser usada no atributo de disco. Útil para as imagens não baseadas em fichieiros.", + "Specific ID":"ID específico", + "Specific image mapping driver. KVM: raw, qcow2. XEN: tap:aio, file:":"Driver de mapeamento específico de imagem. KVM: raw, qcow2. XEN: tap:aio, file:", + "Specific image mapping driver. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware unsupported":"Driver de mapeamento específico de imagem. KVM: raw, qcow2. Xen:tap:aio:, file:. VMware não suportado", + "SSH":"SSH", + "Start time":"Hora de início", + "Start Time":"Hora de Início", + "State":"Estado", + "State change time":"Hora de alteração de estado", + "Status":"Estado", + "Stop":"Parar", + "style":"estilo", + "Submitted":"Submetido", + "Summary of infrastructure resources":"Sumário dos recursos da nfrastructura", + "Summary of resources":"Sumário dos recursos", + "Summary of system resources":"Sumário recursos do sistema", + "Summary of virtual resources":"Sumário recursos virtuais", + "Sunstone UI Configuration":"Configuração da Sunstone UI ", + "Support":"Suporte", + "Suspend":"Suspender", + "Swap":"Substituir", + "System":"Sistema", + "System Resources":"Recursos do sistema", + "System resources management is only accesible to users of the oneadmin group. It comprises the operations regarding OpenNebula groups, users and ACLs.":"A gestão de recursos do sistema só está acessível a utilizadores do grupo oneadmin. Inclui as operações respeitantes a gripos, utilizadores e ACLs.", + "Tablet":"Tablet", + "Target":"Alvo", + "Tcp black ports":"Portos bloqueados Tcp", + "Tcp firewall mode":"Modo de firewall Tcp", + "Tcp white ports":"Portos abertos Tcp", + "Template":"Modelo", + "Template information":"Informação de modelo", + "Templates":"Modelos", + "Template updated correctly":"Modelo actualizado correctamente", + "The Infrastructure menu allows management of Hosts, Datastores, Virtual Networks. Users in the oneadmin group can manage clusters as well.":"O menu Infrastructura permite a gestão de Hosts, Datastores, e Redes Virtuais. Utilizadors no grupo oneadmin podem gerir clusters também.", + "There are mandatory fields missing in the capacity section":"Há campos obrigatórios em falta na secção secção capacidade", + "There are mandatory fields missing in the OS Boot options section":"Há campos obrigatórios em falta na secção arranque do SO", + "There are mandatory parameters missing":"Há campos obrigatórios em falta", + "There are mandatory parameters missing in this section":"Há campos obrigatórios em falta nesta secção", + "There are missing network parameters":"Há parâmetros de rede em falta", + "The Virtual Resources menu allows management of Virtual Machine Templates, Instances and Images.":"O menu de Recursos Virtuais permite a gestão de Modelos de VM, instâncias e imagens.", + "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":"Este campo define qual atributo irá ser usado para ordenar os hosts indicados para esta VM. Basicamente, define que hosts são mais indicados que outros", + "This rule applies to":"Esta regra aplica-se a", + "This will cancel selected VMs":"Isto vai cancelar selected VMs", + "This will change the main group of the selected users. Select the new group":"Isto vai alterar the main grupo of the selected utilizadors. Seleccione the novo grupo", + "This will change the password for the selected users":"Isto vai alterar the palavra-passe for the selected utilizadors", + "This will delete the selected VMs from the database":"Isto vai apagar the selected VMs from the database", + "This will deploy the selected VMs on the chosen host":"Isto vai lançar as VMs seleccionadas no host escolhido", + "This will hold selected pending VMs from being deployed":"Isto vai pausar as VMs pendentes à espera de serem lançadas", + "This will initiate the shutdown process in the selected VMs":"Isto vai iniciar o processo de encerramento nas VMs seleccionadas", + "This will live-migrate the selected VMs to the chosen host":"Isto vai migrar em tempo real as VMs seleccionadas para o host seleccionado", + "This will migrate the selected VMs to the chosen host":"Isto vai migrar as VMs seleccionadas para o host seleccionado", + "This will redeploy selected VMs (in UNKNOWN or BOOT state)":"Isto vai relançar as VMs seleccionadas (em estado UNKNOWN ou BOOT)", + "This will release held machines":"Isto vai libertar as máquinas pausadas", + "This will resubmits VMs to PENDING state":"Isto vai resubmeter VMs para o estado PENDING", + "This will resume selected stopped or suspended VMs":"Isto vai continuar VMs seleccionadas, paradas ou suspensas", + "This will send a reboot action to running VMs":"Isto vai enviar a acção de encerramento às VMs em execução", + "This will suspend selected machines":"Isto vai suspender as VMs seleccionadas", + "TM Mad":"TM Mad", + "TM MAD":"TM MAD", + "total":"total", + "Total Leases":"Alocações totais", + "Total time":"Tempo total", + "Total VM count":"Contagem total de VM", + "Total VM CPU":"CPU Total VM ", + "Total VM Memory":"Memória Total VM", + "Transfer manager":"Gestão de transferência", + "Transfer Manager":"Gestão de Transferência", + "Type":"Tipo", + "Type of disk device to emulate.":"Tipo de dispositivo de disco a emular.", + "Type of disk device to emulate: ide, scsi":"Tipo de dispositivo de disco a emular: ide, scsi", + "Type of file system to be built. This can be any value understood by mkfs unix command.":"Tipo de sistema de ficheiros a contruir. Este pode ser qualquer valor compreendido pelo 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 de imagem, explicado em detalhe na secção seguinte. Se omitido, o valor por omissão é o valor definido em oned.conf (instalação por omissão é SO).", + "Udp black ports":"Portos bloqueados Udp", + "Udp firewall mode":"Modo de firewall Udp", + "Udp white ports":"Portos abertos Udp", + "Unauthorized":"Não autorizado", + "Update":"Actualizar", + "Update a template":"Actualizar o modelo", + "Update Datastore properties":"Actualizar as propriedades Datastore", + "Update image properties":"Actualizar propriedades da imagem", + "Update network properties":"Actualizar propriedades de rede", + "Update properties":"Actualizar propriedades", + "Update template":"Actualizar modelo", + "Update template properties":"Actualizar propriedades de modelo", + "Update VM properties":"Actualizar propriedades de VM", + "Upload":"Enviar", + "Upload file":"Enviar ficheiro", + "Uploading...":"A enviar...", + "USB":"USB", + "Use":"Utilização", + "Used by VM":"Utilizado pela VM", + "Used CPU":"CPU utilizado", + "Used CPU (allocated)":"Used CPU utilizado(alocado)", + "Used CPU (real)":"Used CPU utilizado(real)", + "Used Mem (allocated)":"Memória utilizada(alocada)", + "Used Memory":"Memória utilizada", + "Used Mem (real)":"Memória utilizada(real)", + "Useful for power management, for example, normally required for graceful shutdown to work":"Útil para gestão de energia, por exemplo, normalmente necessário para um encerramento normal funcionar", + "User":"Utilizador", + "User information":"Informação de utilizador", + "Username":"Nome de utilizador", + "User name and password must be filled in":"O nome de utilizador e a palavra-passe devem ser preenchidos", + "Users":"Utilizadores", + "User template":"Modelo de utilizadores", + "Value":"Valor", + "Value of the context variable":"Valor da variável de contexto", + "Value of the custom variable":"Valor variável personalizada", + "VCPU":"VCPU", + "Virtio":"Virtio", + "Virtio (KVM)":"Virtio (KVM)", + "Virtualization Manager":"Gestão de Virtualização", + "Virtual Machine information":"Informação de VM", + "Virtual Machines":"Máquinas Virtuais", + "Virtual Network":"Rede virtual", + "Virtual network information":"Informação da rede virtual", + "Virtual Network information":"Informação da rede virtual", + "Virtual Network name missing!":"Falta preencher o nome da rede virutal!", + "Virtual Networks":"Redes virtuais", + "Virtual Network template (attributes)":"Modelo de rede virtual (atributos)", + "Virtual Resources":"Recursos virtuais", + "VLAN":"VLAN", + "VLAN ID":"ID VLAN", + "VM information":"Informação VM", + "VM Instance":"Instância VM", + "VM Instances":"Instâncias VM", + "VM log":"Log VM", + "VM MAD":"VM MAD", + "VM Name":"Nome VM", + "VM Network stats":"Estatística de rede VM", + "#VMS":"#VMS", + "VM Save As":"Guardar como VM", + "VM template":"modelo de VM", + "VM Template":"Modelo de VM", + "VM Templates":"Modelos de VM", + "VMware":"VMware", + "VNC":"VNC", + "VNC Access":"Acesso VNC", + "VNC connection":"Ligação VNC", + "VNC Disabled":"VNC desactivado", + "VNC Session":"Sessão VNC", + "VN MAD":"VN MAD", + "Welcome":"Bem-vindo", + "Wizard":"Assistente", + "Wizard KVM":"Assistente KVM", + "Wizard VMware":"Assistente VMware", + "Wizard XEN":"Assistente XEN", + "Write the image template here":"Introduza o modelo de imagem aqui", + "Write the Virtual Machine template here":"Introduza o modelo de VM aqui", + "Write the Virtual Network template here":"Introduza o modelo de rede virtual aqui", + "x509":"x509", + "XEN":"XEN", + "Xen templates must specify a boot method":"Os modelos Xen têm que especificar um método de arranque", + "yes":"sim", + "Yes":"Sim", + "You can find further information on the following links:":"Pode encontrar mais informação nas ligações seguintes:", + "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":"Pode usar o asterisco %i. Aquando da criação de várias VMs, i% será substituído por um número diferente a começar por 0 em cada uma delas", + "You have not selected a template":"Não seleccionou um modelo", + "You have to confirm this action.":"É necessário confirmar esta acção.", + "You need to select something.":"É necessário seleccionar alguma opção", +}; \ No newline at end of file diff --git a/src/sunstone/public/locale/pt_PT/pt_datatable.txt b/src/sunstone/public/locale/pt_PT/pt_datatable.txt new file mode 100644 index 0000000000..ce112914ad --- /dev/null +++ b/src/sunstone/public/locale/pt_PT/pt_datatable.txt @@ -0,0 +1,17 @@ +{ + "sProcessing": "A processar...", + "sLengthMenu": "Mostrar _MENU_ registos", + "sZeroRecords": "Não foram encontrados resultados", + "sInfo": "Mostrando de _START_ até _END_ de _TOTAL_ registos", + "sInfoEmpty": "Mostrando de 0 até 0 de 0 registros", + "sInfoFiltered": "(filtrado de _MAX_ registos no total)", + "sInfoPostFix": "", + "sSearch": "Procurar:", + "sUrl": "", + "oPaginate": { + "sFirst": "Primeiro", + "sPrevious": "Anterior", + "sNext": "Seguinte", + "sLast": "Último" + } +} diff --git a/src/tm/TransferManager.cc b/src/tm/TransferManager.cc index 13af39a96b..67a46e8c67 100644 --- a/src/tm/TransferManager.cc +++ b/src/tm/TransferManager.cc @@ -215,6 +215,7 @@ void TransferManager::prolog_action(int vid) string size; string format; string tm_mad, system_tm_mad; + string ds_id; VirtualMachine * vm; Nebula& nd = Nebula::instance(); @@ -265,7 +266,7 @@ void TransferManager::prolog_action(int vid) num = vm->get_template_attribute("DISK",attrs); - for (int i=0; i < num ;i++, source="", type="", clon="", tm_mad="") + for (int i=0; i < num ;i++, source="", type="", clon="",tm_mad="",ds_id="-") { disk = dynamic_cast(attrs[i]); @@ -282,6 +283,13 @@ void TransferManager::prolog_action(int vid) (int(*)(int))toupper); } + ds_id = disk->vector_value("DATASTORE_ID"); + + if ( ds_id.empty() ) + { + ds_id = "-"; + } + if ( type == "SWAP" ) { // ----------------------------------------------------------------- @@ -300,7 +308,9 @@ void TransferManager::prolog_action(int vid) << system_tm_mad << " " << size << " " << vm->get_hostname() << ":" - << vm->get_remote_system_dir() << "/disk." << i << endl; + << vm->get_remote_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } else if ( type == "FS" ) { @@ -322,7 +332,9 @@ void TransferManager::prolog_action(int vid) << size << " " << format << " " << vm->get_hostname() << ":" - << vm->get_remote_system_dir() << "/disk." << i << endl; + << vm->get_remote_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } else { @@ -388,7 +400,7 @@ void TransferManager::prolog_action(int vid) xfr << " " << size; } - xfr << endl; + xfr << " " << vm->get_oid() << " " << ds_id << endl; } } @@ -417,7 +429,7 @@ void TransferManager::prolog_action(int vid) xfr << vm->get_hostname() << ":" << vm->get_remote_system_dir() << "/disk." << num - << endl; + << " " << vm->get_oid() << " -" << endl; } xfr.close(); @@ -478,6 +490,7 @@ void TransferManager::prolog_migr_action(int vid) const VectorAttribute * disk; string tm_mad; string system_tm_mad; + string ds_id; vector attrs; int num; @@ -526,7 +539,7 @@ void TransferManager::prolog_migr_action(int vid) num = vm->get_template_attribute("DISK",attrs); - for (int i=0 ; i < num ; i++, tm_mad="") + for (int i=0 ; i < num ; i++, tm_mad="", ds_id="-") { disk = dynamic_cast(attrs[i]); @@ -542,13 +555,22 @@ void TransferManager::prolog_migr_action(int vid) continue; } + ds_id = disk->vector_value("DATASTORE_ID"); + + if ( ds_id.empty() ) + { + ds_id = "-"; + } + //MV tm_mad prev_host:remote_system_dir/disk.i host:remote_system_dir/disk.i xfr << "MV " << tm_mad << " " << vm->get_previous_hostname() << ":" << vm->get_remote_system_dir() << "/disk." << i << " " << vm->get_hostname() << ":" - << vm->get_remote_system_dir() << "/disk." << i << endl; + << vm->get_remote_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } //MV tm_mad prev_host:remote_system_dir host:remote_system_dir @@ -557,7 +579,8 @@ void TransferManager::prolog_migr_action(int vid) << vm->get_previous_hostname() << ":" << vm->get_remote_system_dir() << " " << vm->get_hostname() << ":" - << vm->get_remote_system_dir() << endl; + << vm->get_remote_system_dir() << " " + << vm->get_oid() << " -" << endl; xfr.close(); @@ -601,6 +624,7 @@ void TransferManager::prolog_resume_action(int vid) const VectorAttribute * disk; string tm_mad; string system_tm_mad; + string ds_id; vector attrs; int num; @@ -648,7 +672,7 @@ void TransferManager::prolog_resume_action(int vid) // ------------------------------------------------------------------------ num = vm->get_template_attribute("DISK",attrs); - for (int i=0 ; i < num ; i++, tm_mad="") + for (int i=0 ; i < num ; i++, tm_mad="", ds_id="-") { disk = dynamic_cast(attrs[i]); @@ -664,20 +688,30 @@ void TransferManager::prolog_resume_action(int vid) continue; } + ds_id = disk->vector_value("DATASTORE_ID"); + + if ( ds_id.empty() ) + { + ds_id = "-"; + } + //MV tm_mad fe:system_dir/disk.i host:remote_system_dir/disk.i xfr << "MV " << tm_mad << " " << nd.get_nebula_hostname() << ":" << vm->get_system_dir() << "/disk." << i << " " << vm->get_hostname() << ":" - << vm->get_remote_system_dir() << "/disk." << i << endl; + << vm->get_remote_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } //MV tm_mad fe:system_dir host:remote_system_dir xfr << "MV " << system_tm_mad << " " << nd.get_nebula_hostname() << ":"<< vm->get_system_dir() << " " - << vm->get_hostname() << ":" << vm->get_remote_system_dir() << endl; + << vm->get_hostname() << ":" << vm->get_remote_system_dir()<< " " + << vm->get_oid() << " -" << endl; xfr.close(); @@ -719,6 +753,7 @@ void TransferManager::epilog_action(int vid) string xfr_name; string system_tm_mad; string tm_mad; + string ds_id; const VectorAttribute * disk; string save; @@ -770,7 +805,7 @@ void TransferManager::epilog_action(int vid) num = vm->get_template_attribute("DISK",attrs); - for (int i=0; i < num ;i++,save="") + for (int i=0; i < num; i++, save="", ds_id="-") { disk = dynamic_cast(attrs[i]); @@ -786,6 +821,13 @@ void TransferManager::epilog_action(int vid) continue; } + ds_id = disk->vector_value("DATASTORE_ID"); + + if ( ds_id.empty() ) + { + ds_id = "-"; + } + transform(save.begin(),save.end(),save.begin(),(int(*)(int))toupper); tm_mad = disk->vector_value("TM_MAD"); @@ -814,7 +856,9 @@ void TransferManager::epilog_action(int vid) << tm_mad << " " << vm->get_hostname() << ":" << vm->get_remote_system_dir() << "/disk." << i << " " - << source << endl; + << source << " " + << vm->get_oid() << " " + << ds_id << endl; } else if ( !tm_mad.empty() ) //No saving disk and no system_ds disk { @@ -822,14 +866,17 @@ void TransferManager::epilog_action(int vid) xfr << "DELETE " << tm_mad << " " << vm->get_hostname() << ":" - << vm->get_remote_system_dir() << "/disk." << i << endl; + << vm->get_remote_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } } //DELETE system_tm_mad hostname:remote_system_dir xfr << "DELETE " << system_tm_mad << " " - << vm->get_hostname() << ":" << vm->get_remote_system_dir() << endl; + << vm->get_hostname() << ":" << vm->get_remote_system_dir() << " " + << vm->get_oid() << " -" << endl; xfr.close(); @@ -871,6 +918,7 @@ void TransferManager::epilog_stop_action(int vid) string xfr_name; string tm_mad; string system_tm_mad; + string ds_id; VirtualMachine * vm; Nebula& nd = Nebula::instance(); @@ -918,7 +966,7 @@ void TransferManager::epilog_stop_action(int vid) // ------------------------------------------------------------------------ num = vm->get_template_attribute("DISK",attrs); - for (int i=0 ; i < num ; i++, tm_mad="") + for (int i=0 ; i < num ; i++, tm_mad="", ds_id="-") { disk = dynamic_cast(attrs[i]); @@ -934,20 +982,30 @@ void TransferManager::epilog_stop_action(int vid) continue; } + ds_id = disk->vector_value("DATASTORE_ID"); + + if ( ds_id.empty() ) + { + ds_id = "-"; + } + //MV tm_mad host:remote_system_dir/disk.i fe:system_dir/disk.i xfr << "MV " << tm_mad << " " << vm->get_hostname() << ":" << vm->get_remote_system_dir() << "/disk." << i << " " << nd.get_nebula_hostname() << ":" - << vm->get_system_dir() << "/disk." << i << endl; + << vm->get_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } //MV system_tm_mad hostname:remote_system_dir fe:system_dir xfr << "MV " << system_tm_mad << " " << vm->get_hostname() << ":" << vm->get_remote_system_dir() << " " - << nd.get_nebula_hostname() << ":" << vm->get_system_dir() << endl; + << nd.get_nebula_hostname() << ":" << vm->get_system_dir() << " " + << vm->get_oid() << " -" << endl; xfr.close(); @@ -990,6 +1048,7 @@ void TransferManager::epilog_delete_action(int vid) string xfr_name; string system_tm_mad; string tm_mad; + string ds_id; VirtualMachine * vm; Nebula& nd = Nebula::instance(); @@ -1037,7 +1096,7 @@ void TransferManager::epilog_delete_action(int vid) // ------------------------------------------------------------------------- num = vm->get_template_attribute("DISK",attrs); - for (int i=0 ; i < num ; i++, tm_mad="") + for (int i=0 ; i < num ; i++, tm_mad="", ds_id="-") { disk = dynamic_cast(attrs[i]); @@ -1053,17 +1112,27 @@ void TransferManager::epilog_delete_action(int vid) continue; } + ds_id = disk->vector_value("DATASTORE_ID"); + + if ( ds_id.empty() ) + { + ds_id = "-"; + } + //DELETE tm_mad host:remote_system_dir/disk.i xfr << "DELETE " << tm_mad << " " << vm->get_hostname() << ":" - << vm->get_remote_system_dir() << "/disk." << i << endl; + << vm->get_remote_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } //DELETE system_tm_mad hostname:remote_system_dir xfr << "DELETE " << system_tm_mad << " " - << vm->get_hostname() <<":"<< vm->get_remote_system_dir() << endl; + << vm->get_hostname() <<":"<< vm->get_remote_system_dir() << " " + << vm->get_oid() << " -"; xfr.close(); @@ -1108,6 +1177,7 @@ void TransferManager::epilog_delete_previous_action(int vid) string xfr_name; string system_tm_mad; string tm_mad; + string ds_id; VirtualMachine * vm; Nebula& nd = Nebula::instance(); @@ -1156,7 +1226,7 @@ void TransferManager::epilog_delete_previous_action(int vid) // ------------------------------------------------------------------------ num = vm->get_template_attribute("DISK",attrs); - for (int i=0 ; i < num ; i++, tm_mad="") + for (int i=0 ; i < num ; i++, tm_mad="", ds_id="-") { disk = dynamic_cast(attrs[i]); @@ -1172,18 +1242,27 @@ void TransferManager::epilog_delete_previous_action(int vid) continue; } + ds_id = disk->vector_value("DATASTORE_ID"); + + if ( ds_id.empty() ) + { + ds_id = "-"; + } + //DELETE tm_mad prev_host:remote_system_dir/disk.i xfr << "DELETE " << tm_mad << " " << vm->get_previous_hostname() << ":" - << vm->get_remote_system_dir() << "/disk." << i << endl; + << vm->get_remote_system_dir() << "/disk." << i << " " + << vm->get_oid() << " " + << ds_id << endl; } //DELTE system_tm_mad prev_host:remote_system_dir xfr << "DELETE " << system_tm_mad << " " << vm->get_previous_hostname() <<":"<< vm->get_remote_system_dir() - << endl; + << " " << vm->get_oid() << " -" << endl; xfr.close();