mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-04 22:21:36 +09:00
1 parent
e13d34d26b
commit
39210fcee0
6 files changed
+21
-5
No files matched your search
@@ -19,7 +19,7 @@ require 'opennebula/document_pool_json'
|
||||
module OneProvision
|
||||
|
||||
# ProviderPool class
|
||||
class ProviderPool < DocumentPoolJSON
|
||||
class ProviderPool < OpenNebula::DocumentPoolJSON
|
||||
|
||||
DOCUMENT_TYPE = 102
|
||||
|
||||
|
||||
@@ -434,6 +434,23 @@ module OneProvision
|
||||
return [false, "user input #{match[1]} not found"]
|
||||
end
|
||||
|
||||
@config['inputs'].each do |input|
|
||||
case input['type']
|
||||
when 'list'
|
||||
next if input['options']
|
||||
|
||||
return [false, 'input type list needs options']
|
||||
when 'range'
|
||||
next if input['min_value'] && input['max_value']
|
||||
|
||||
return [false,
|
||||
'input type range needs min_value ' \
|
||||
'and max_value']
|
||||
else
|
||||
next
|
||||
end
|
||||
end
|
||||
|
||||
next
|
||||
end
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ require 'opennebula/document_pool_json'
|
||||
module OneProvision
|
||||
|
||||
# ProvisionPool class
|
||||
class ProvisionPool < DocumentPoolJSON
|
||||
class ProvisionPool < OpenNebula::DocumentPoolJSON
|
||||
|
||||
DOCUMENT_TYPE = 103
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
require 'provision/resources/virtual/virtual_resource'
|
||||
require 'models'
|
||||
|
||||
require 'json'
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ require 'opennebula/document_json'
|
||||
module OneProvision
|
||||
|
||||
# Provision element
|
||||
class ProvisionElement < DocumentJSON
|
||||
class ProvisionElement < OpenNebula::DocumentJSON
|
||||
|
||||
TEMPLATE_TAG = 'PROVISION_BODY'
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ require 'opennebula/document_pool_json'
|
||||
module OneProvision
|
||||
|
||||
# Provision Template Pool class
|
||||
class ProvisionTemplatePool < DocumentPoolJSON
|
||||
class ProvisionTemplatePool < OpenNebula::DocumentPoolJSON
|
||||
|
||||
DOCUMENT_TYPE = 104
|
||||
|
||||
|
||||
Reference in new issue
Block a user