1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #5552: Added possibility work with all resources in onedb command (#575)

This commit is contained in:
juanmont 2017-11-15 18:10:52 +01:00 committed by Tino Vázquez
parent c242633bc7
commit 0e6add9dba
2 changed files with 25 additions and 5 deletions

View File

@ -518,7 +518,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
change_body_desc = <<-EOT.unindent
Changes a value from the body of an object. The possible objects are:
vm, host, vnet, image, cluster, document, group, marketplace,
marketplaceapp, secgroup, template, vrouter or zone
marketplaceapp, secgroup, template, vrouter, datastore, user, vmgroup, vdc or zone
You can filter the objects to modify using one of these options:
@ -605,8 +605,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do
update_body_desc = <<-EOT.unindent
Update body of an object. The possible objects are:
vm, host, vnet, image, cluster, document, group, marketplace,
marketplaceapp, secgroup, template, vrouter or zone. Objects are
specified by their ID:
marketplaceapp, secgroup, template, vrouter, datastore, user, vmgroup, vdc or zone.
Objects are specified by their ID:
* --id: object id, example: 156
For example to update the XML document of VM 23:
@ -638,8 +638,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do
show_body_desc = <<-EOT.unindent
Show body of an object. The possible objects are:
vm, host, vnet, image, cluster, document, group, marketplace,
marketplaceapp, secgroup, template, vrouter or zone. Objects are
specified by their ID:
marketplaceapp, secgroup, template, vrouter, datastore, user, vmgroup, vdc or zone.
Objects are specified by their ID:
* --id: object id, example: 156
For example to show the XML document of VM 23:

View File

@ -327,6 +327,26 @@ class OneDBLive
object = OpenNebula::ZonePool.new(client)
federate = true
when :datastore
table = 'datastore_pool'
object = OpenNebula::DatastorePool.new(client)
federate = false
when :user
table = 'user_pool'
object = OpenNebula::UserPool.new(client)
federate = false
when :vmgroup
table = 'vmgroup_pool'
object = OpenNebula::VMGroupPool.new(client)
federate = false
when :vdc
table = 'vdc_pool'
object = OpenNebula::VdcPool.new(client)
federate = false
else
raise "Object type '#{object}' not supported"
end