forked from telcat/vagrant-proxmox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VAGPROX-11 - Add call to delete file from proxmox local storage
- Loading branch information
Showing
16 changed files
with
364 additions
and
126 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ruby-2.0.0 | ||
ruby-2.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Feature: Use new iso file | ||
As a system administrator I want to choose an iso file to be uploaded to the proxmox server in order to | ||
use its contents for the virtual machine. It should replace the already existing file of the same name. | ||
|
||
Background: | ||
Given a Vagrantfile with these provider settings: | ||
""" | ||
Vagrant.configure('2') do |config| | ||
config.vm.provider :proxmox do |proxmox| | ||
proxmox.endpoint = 'https://proxmox.example.com/api2/json' | ||
proxmox.user_name = 'vagrant' | ||
proxmox.password = 'password' | ||
proxmox.vm_type = :qemu | ||
proxmox.qemu_os = :l26 | ||
proxmox.qemu_iso_file = './tmp/justanisofile.iso' | ||
proxmox.replace_qemu_iso_file = true | ||
proxmox.qemu_disk_size = '30G' | ||
end | ||
config.vm.define :machine, primary: true do |machine| | ||
machine.vm.box = 'b681e2bc-617b-4b35-94fa-edc92e1071b8' | ||
machine.vm.network :public_network, ip: '172.16.100.1', macaddress: 'aa:bb:cc:dd:ee:ff' | ||
end | ||
end | ||
""" | ||
|
||
Scenario: An iso file is specified in the Vagrantfile and does not exist on the proxmox server | ||
Given An iso file "./tmp/justanisofile.iso" exists locally | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then The iso file "./tmp/justanisofile.iso" is uploaded into the local storage of the vm node | ||
And the new virtual machine using the iso "local:iso/justanisofile.iso" is created | ||
|
||
Scenario: An iso file is specified in the Vagrantfile and already exists on the proxmox server | ||
Given An iso file "./tmp/justanisofile.iso" exists locally | ||
And the iso file "justanisofile.iso" exists locally" already exists in the proxmox storage | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then The iso file "local:iso/justanisofile.iso" is deleted from proxmox | ||
And The iso file "./tmp/justanisofile.iso" is uploaded into the local storage of the vm node | ||
And the new virtual machine using the iso "local:iso/justanisofile.iso" is created | ||
Scenario: An iso file is specified in the Vagrantfile but does not exist locally | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then I should see "File for upload not found" | ||
Scenario: An iso file is specified in the Vagrantfile and an error occurs during upload | ||
Given An iso file "./tmp/justanisofile.iso" exists locally | ||
But during upload an error will occur | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then I should see "Error during upload" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Feature: Use new template file | ||
As a system administrator I want to choose a template file to be uploaded to the proxmox server in order to | ||
generate the filesystem of the virtual machine. | ||
|
||
Background: | ||
Given a Vagrantfile with these provider settings: | ||
""" | ||
Vagrant.configure('2') do |config| | ||
config.vm.provider :proxmox do |proxmox| | ||
proxmox.endpoint = 'https://proxmox.example.com/api2/json' | ||
proxmox.user_name = 'vagrant' | ||
proxmox.password = 'password' | ||
proxmox.vm_type = :openvz | ||
proxmox.openvz_template_file = './tmp/mytemplate.tar.gz' | ||
proxmox.replace_openvz_template_file = true | ||
end | ||
config.vm.define :machine, primary: true do |machine| | ||
machine.vm.box = 'b681e2bc-617b-4b35-94fa-edc92e1071b8' | ||
machine.vm.network :public_network, ip: '172.16.100.1' | ||
end | ||
end | ||
""" | ||
|
||
Scenario: A template is specified in the Vagrantfile and does not exist on the proxmox server | ||
Given A templatefile "./tmp/mytemplate.tar.gz" exists locally | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then The template file "./tmp/mytemplate.tar.gz" is uploaded into the local storage of the vm node | ||
And the new virtual machine using the template "local:vztmpl/mytemplate.tar.gz" is created | ||
|
||
Scenario: A template is specified in the Vagrantfile and already exists on the proxmox server | ||
Given A templatefile "./tmp/mytemplate.tar.gz" exists locally | ||
And the template file "mytemplate.tar.gz" already exists in the proxmox storage | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then The template file "local:vztmpl/mytemplate.tar.gz" is deleted from proxmox | ||
And the new virtual machine using the template "local:vztmpl/mytemplate.tar.gz" is created | ||
|
||
Scenario: A template is specified in the Vagrantfile but does not exist locally | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then I should see "File for upload not found" | ||
|
||
Scenario: A template is specified in the Vagrantfile and an error occurs during upload | ||
Given A templatefile "./tmp/mytemplate.tar.gz" exists locally | ||
But during upload an error will occur | ||
When I run "vagrant up --provider=proxmox --no-provision" | ||
Then I should see "Error during upload" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.