mirror of
https://github.com/puppetlabs/vmpooler-provider-ec2.git
synced 2026-01-26 10:28:41 -05:00
create_vm method implimented
This commit is contained in:
parent
6fbca839ed
commit
72260b719d
2 changed files with 71 additions and 69 deletions
|
|
@ -12,27 +12,27 @@ describe 'Vmpooler::PoolManager::Provider::Aws' do
|
|||
let(:poolname) { 'debian-9' }
|
||||
let(:provider_options) { { 'param' => 'value' } }
|
||||
let(:project) { 'vmpooler-test' }
|
||||
let(:zone) { 'us-west1-b' }
|
||||
let(:zone) { 'us-west-2b' }
|
||||
let(:region) { 'us-west-2'}
|
||||
let(:config) { YAML.load(<<~EOT
|
||||
---
|
||||
:config:
|
||||
max_tries: 3
|
||||
retry_factor: 10
|
||||
:providers:
|
||||
:gce:
|
||||
:aws:
|
||||
connection_pool_timeout: 1
|
||||
project: '#{project}'
|
||||
zone: '#{zone}'
|
||||
network_name: global/networks/default
|
||||
region: '#{region}'
|
||||
:pools:
|
||||
- name: '#{poolname}'
|
||||
alias: [ 'mockpool' ]
|
||||
template: 'projects/debian-cloud/global/images/family/debian-9'
|
||||
amisize: 'a1.large'
|
||||
template: 'ami-03c1b544a7566b3e5'
|
||||
size: 5
|
||||
timeout: 10
|
||||
ready_ttl: 1440
|
||||
provider: 'aws'
|
||||
machine_type: 'zones/#{zone}/machineTypes/e2-micro'
|
||||
EOT
|
||||
)
|
||||
}
|
||||
|
|
@ -51,38 +51,11 @@ EOT
|
|||
|
||||
subject { Vmpooler::PoolManager::Provider::Aws.new(config, logger, metrics, redis_connection_pool, 'aws', provider_options) }
|
||||
|
||||
before(:each) { allow(subject).to receive(:dns).and_return(MockDNS.new()) }
|
||||
|
||||
describe '#manual tests live' do
|
||||
context 'in itsysops' do
|
||||
before(:each) { allow(subject).to receive(:dns).and_call_original }
|
||||
let(:vmname) { "instance-24" }
|
||||
let(:project) { 'vmpooler-test' }
|
||||
let(:config) { YAML.load(<<~EOT
|
||||
---
|
||||
:config:
|
||||
max_tries: 3
|
||||
retry_factor: 10
|
||||
:providers:
|
||||
:gce:
|
||||
connection_pool_timeout: 1
|
||||
project: '#{project}'
|
||||
zone: '#{zone}'
|
||||
network_name: 'projects/itsysopsnetworking/global/networks/shared1'
|
||||
dns_zone_resource_name: 'test-vmpooler-puppet-net'
|
||||
domain: 'test.vmpooler.puppet.net'
|
||||
:pools:
|
||||
- name: '#{poolname}'
|
||||
alias: [ 'mockpool' ]
|
||||
template: 'projects/debian-cloud/global/images/family/debian-9'
|
||||
size: 5
|
||||
timeout: 10
|
||||
ready_ttl: 1440
|
||||
provider: 'gce'
|
||||
subnetwork_name: 'projects/itsysopsnetworking/regions/us-west1/subnetworks/vmpooler-test'
|
||||
machine_type: 'zones/#{zone}/machineTypes/e2-micro'
|
||||
EOT
|
||||
) }
|
||||
it 'gets a vm' do
|
||||
result = subject.create_vm(poolname, vmname)
|
||||
#result = subject.destroy_vm(poolname, vmname)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue