WIP: ovirt templates -> bases

This commit is contained in:
thomashaw
2017-09-18 11:25:56 +01:00
parent e30d4b007c
commit f58fb0d2b4
4 changed files with 5 additions and 9 deletions

View File

@@ -57,6 +57,7 @@
<xs:element name="reference" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="software_name" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="software_license" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ovirt_template" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<!-- cannot co-exist with a system matching ALL of the optionally specified values (can be repeated for OR)-->
<xs:element name="conflict" minOccurs="0" maxOccurs="unbounded">

View File

@@ -28,8 +28,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
else
" ovirt.cluster = 'DEFAULT_OVIRT_CLUSTER'"
end %>
<%= if(@options.has_key? :ovirttemplate)
" ovirt.template = '#{@options[:ovirttemplate]}'"
<%= if false # TODO
" ovirt.template = '#{true}'" # TODO
else
" ovirt.template = 'DEFAULT_OVIRT_TEMPLATE'"
end %>

View File

@@ -20,4 +20,6 @@
<reference>https://atlas.hashicorp.com/puppetlabs</reference>
<software_license>various</software_license>
<ovirt_template>debian_server</ovirt_template>
</base>

View File

@@ -32,7 +32,6 @@ def usage
--ovirt-vmname [ovirt_vm_name] (OPTIONAL)
--ovirt-url [ovirt_api_url] (OPTIONAL)
--ovirt-cluster [ovirt_cluster] (OPTIONAL)
--ovirt-template [ovirt_template] (OPTIONAL)
--ovirt-ip [ovirt_static_ip] (OPTIONAL)
--ovirt-network [ovirt_network_name] (OPTIONAL)
@@ -250,7 +249,6 @@ opts = GetoptLong.new(
[ '--ovirtpass', GetoptLong::REQUIRED_ARGUMENT ],
[ '--ovirt-url', GetoptLong::REQUIRED_ARGUMENT ],
[ '--ovirt-cluster', GetoptLong::REQUIRED_ARGUMENT ],
[ '--ovirt-template', GetoptLong::REQUIRED_ARGUMENT ],
[ '--ovirt-ip', GetoptLong::REQUIRED_ARGUMENT ],
[ '--ovirt-network', GetoptLong::REQUIRED_ARGUMENT ],
)
@@ -316,7 +314,6 @@ opts.each do |opt, arg|
when '--ovirt-vmname'
Print.info "Ovirt VM Name : #{arg}"
options[:ovirtvmname] = arg
filename = arg;
when '--ovirtuser'
Print.info "Ovirt Username : #{arg}"
options[:ovirtuser] = arg
@@ -329,9 +326,6 @@ opts.each do |opt, arg|
when '--ovirt-cluster'
Print.info "Ovirt Cluster : #{arg}"
options[:ovirtcluster] = arg
when '--ovirt-template'
Print.info "Ovirt Template : #{arg}"
options[:ovirttemplate] = arg
when '--ovirt-ip'
Print.info "Ovirt Static IP : #{arg}"
options[:ovirtip] = arg
@@ -411,5 +405,4 @@ end
# set DEFAULT Value in lib/templates/Vagrantfile.erb or use command argument
# ovirt-api-url : set DEFAULT_URL (Line 36)
# ovirt-cluster : set DEFAULT_CLUSTER (Line 41)
# ovirt-template : set DEFAULT_TEMPLATE (Line 46)
# ovirt-network : set DEFAULT_NETWORK (Line 121)