mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Added cloudstack in as a provider since there's a gem.
This commit is contained in:
parent
d27d9c5e19
commit
88f9aecb04
7 changed files with 63 additions and 19 deletions
|
@ -46,7 +46,7 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.required_ruby_version = '>= 2.0.0'
|
||||
|
||||
s.add_dependency("fog-core", "~> 1.45")
|
||||
s.add_dependency("fog-core", "~> 2.1")
|
||||
s.add_dependency("fog-json")
|
||||
s.add_dependency("fog-xml", "~> 0.1.1")
|
||||
|
||||
|
@ -58,14 +58,14 @@ Gem::Specification.new do |s|
|
|||
s.add_dependency("fog-atmos")
|
||||
s.add_dependency("fog-aws", ">= 0.6.0")
|
||||
s.add_dependency("fog-brightbox", "~> 0.4")
|
||||
s.add_dependency("fog-cloudatcost", "~> 0.1.0")
|
||||
s.add_dependency("fog-cloudatcost", "~> 0.4")
|
||||
s.add_dependency("fog-cloudstack", "~> 0.1.0")
|
||||
s.add_dependency("fog-digitalocean", ">= 0.3.0")
|
||||
s.add_dependency("fog-dnsimple", "~> 1.0")
|
||||
s.add_dependency("fog-dnsimple", "~> 2.1")
|
||||
s.add_dependency("fog-dynect", "~> 0.0.2")
|
||||
s.add_dependency("fog-ecloud", "~> 0.1")
|
||||
s.add_dependency("fog-google", "~> 1.0")
|
||||
s.add_dependency("fog-internet-archive")
|
||||
s.add_dependency("fog-joyent")
|
||||
s.add_dependency("fog-local")
|
||||
s.add_dependency("fog-openstack")
|
||||
s.add_dependency("fog-ovirt")
|
||||
|
|
|
@ -23,6 +23,7 @@ require 'fog/atmos'
|
|||
require 'fog/aws'
|
||||
require 'fog/brightbox'
|
||||
require 'fog/clodo'
|
||||
require 'fog/cloudstack'
|
||||
require 'fog/digitalocean'
|
||||
require 'fog/dnsimple'
|
||||
require 'fog/dnsmadeeasy'
|
||||
|
@ -35,7 +36,6 @@ require 'fog/go_grid'
|
|||
require 'fog/google'
|
||||
require 'fog/ibm'
|
||||
require 'fog/internet_archive'
|
||||
require 'fog/joyent'
|
||||
require 'fog/linode'
|
||||
require 'fog/local'
|
||||
require 'fog/bare_metal_cloud'
|
||||
|
|
|
@ -55,6 +55,7 @@ require 'fog/bin/atmos'
|
|||
require 'fog/bin/aws'
|
||||
require 'fog/bin/brightbox'
|
||||
require 'fog/bin/clodo'
|
||||
require 'fog/bin/cloudstack'
|
||||
require 'fog/bin/digitalocean'
|
||||
require 'fog/bin/dnsimple'
|
||||
require 'fog/bin/dnsmadeeasy'
|
||||
|
@ -67,7 +68,6 @@ require 'fog/bin/go_grid'
|
|||
require 'fog/bin/google'
|
||||
require 'fog/bin/ibm'
|
||||
require 'fog/bin/internet_archive'
|
||||
require 'fog/bin/joyent'
|
||||
require 'fog/bin/linode'
|
||||
require 'fog/bin/local'
|
||||
require 'fog/bin/bare_metal_cloud'
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
require "minitest/autorun"
|
||||
require "fog"
|
||||
require "fog/bin"
|
||||
require "helpers/bin"
|
||||
|
||||
describe Joyent do
|
||||
include Fog::BinSpec
|
||||
|
||||
let(:subject) { Joyent }
|
||||
end
|
|
@ -10,6 +10,7 @@ describe Fog do
|
|||
assert_equal "Brightbox", Fog.providers[:brightbox]
|
||||
assert_equal "Clodo", Fog.providers[:clodo]
|
||||
assert_equal "CloudSigma", Fog.providers[:cloudsigma]
|
||||
assert_equal "Cloudstack", Fog.providers[:cloudstack]
|
||||
assert_equal "DigitalOcean", Fog.providers[:digitalocean]
|
||||
assert_equal "Dnsimple", Fog.providers[:dnsimple]
|
||||
assert_equal "DNSMadeEasy", Fog.providers[:dnsmadeeasy]
|
||||
|
@ -22,7 +23,6 @@ describe Fog do
|
|||
assert_equal "Google", Fog.providers[:google]
|
||||
assert_equal "IBM", Fog.providers[:ibm]
|
||||
assert_equal "InternetArchive", Fog.providers[:internetarchive]
|
||||
assert_equal "Joyent", Fog.providers[:joyent]
|
||||
assert_equal "Linode", Fog.providers[:linode]
|
||||
assert_equal "Local", Fog.providers[:local]
|
||||
assert_equal "OpenNebula", Fog.providers[:opennebula]
|
||||
|
@ -55,6 +55,7 @@ describe Fog do
|
|||
assert_includes Fog.registered_providers, "Brightbox"
|
||||
assert_includes Fog.registered_providers, "Clodo"
|
||||
assert_includes Fog.registered_providers, "CloudSigma"
|
||||
assert_includes Fog.registered_providers, "Cloudstack"
|
||||
assert_includes Fog.registered_providers, "DigitalOcean"
|
||||
assert_includes Fog.registered_providers, "Dnsimple"
|
||||
assert_includes Fog.registered_providers, "DNSMadeEasy"
|
||||
|
@ -67,7 +68,6 @@ describe Fog do
|
|||
assert_includes Fog.registered_providers, "Google"
|
||||
assert_includes Fog.registered_providers, "IBM"
|
||||
assert_includes Fog.registered_providers, "InternetArchive"
|
||||
assert_includes Fog.registered_providers, "Joyent"
|
||||
assert_includes Fog.registered_providers, "Linode"
|
||||
assert_includes Fog.registered_providers, "Local"
|
||||
assert_includes Fog.registered_providers, "OpenNebula"
|
||||
|
@ -100,6 +100,7 @@ describe Fog do
|
|||
assert_includes Fog.available_providers, "Brightbox" if Brightbox.available?
|
||||
assert_includes Fog.available_providers, "Clodo" if Clodo.available?
|
||||
assert_includes Fog.available_providers, "CloudSigma" if CloudSigma.available?
|
||||
assert_includes Fog.available_providers, "Cloudstack" if Cloudstack.available?
|
||||
assert_includes Fog.available_providers, "DigitalOcean" if DigitalOcean.available?
|
||||
assert_includes Fog.available_providers, "Dnsimple" if Dnsimple.available?
|
||||
assert_includes Fog.available_providers, "DNSMadeEasy" if DNSMadeEasy.available?
|
||||
|
@ -112,7 +113,6 @@ describe Fog do
|
|||
assert_includes Fog.available_providers, "Google" if Google.available?
|
||||
assert_includes Fog.available_providers, "IBM" if IBM.available?
|
||||
assert_includes Fog.available_providers, "InternetArchive" if InternetArchive.available?
|
||||
assert_includes Fog.available_providers, "Joyent" if Joyent.available?
|
||||
assert_includes Fog.available_providers, "Linode" if Linode.available?
|
||||
assert_includes Fog.available_providers, "Local" if Local.available?
|
||||
assert_includes Fog.available_providers, "OpenNebula" if OpenNebula.available?
|
||||
|
|
|
@ -4,6 +4,53 @@ def compute_providers
|
|||
:server_attributes => {},
|
||||
:mocked => true
|
||||
},
|
||||
:cloudstack => {
|
||||
:provider_attributes => {
|
||||
:cloudstack_host => 'http://host.foo'
|
||||
},
|
||||
:server_attributes => {}.tap do |hash|
|
||||
[:zone_id, :network_ids, :template_id, :service_offering_id].each do |k|
|
||||
key = "cloudstack_#{k}".to_sym
|
||||
if Fog.credentials[key]
|
||||
hash[k]= Fog.credentials[key]
|
||||
end
|
||||
end
|
||||
end,
|
||||
:volume_attributes => {:name => "somevolume"}.tap do |hash|
|
||||
[:zone_id, :disk_offering_id].each do |k|
|
||||
key = "cloudstack_#{k}".to_sym
|
||||
if Fog.credentials[key]
|
||||
hash[k]= Fog.credentials[key]
|
||||
end
|
||||
end
|
||||
end,
|
||||
:snapshot_attributes => {:volume_id => "89198f7c-0245-aa1d-136a-c5f479ef9db7"}.tap do |hash|
|
||||
[:volume_id, :domain_id, :policy_id].each do |k|
|
||||
key = "cloudstack_#{k}".to_sym
|
||||
if Fog.credentials[key]
|
||||
hash[k]= Fog.credentials[key]
|
||||
end
|
||||
end
|
||||
end,
|
||||
:security_group_attributes => {:name => "cloudstack.sg.#{Time.now.to_i}"},
|
||||
:security_group_rule_attributes => {
|
||||
:cidr => '0.0.0.0/0',
|
||||
:start_port => 123,
|
||||
:end_port => 456,
|
||||
:protocol => 'tcp'
|
||||
},
|
||||
:disk_offering_attributes => { :name => "new disk offering", :display_text => 'New Disk Offering' },
|
||||
:egress_firewall_rule_attributes => { :protocol => "tcp", :network_id => "8aacae29-e0a4-4b7b-8a7a-3ee11cfb4362", :cidr_list =>"10.1.1.0/24"},
|
||||
:public_ip_address_attributes => {}.tap do |hash|
|
||||
[:zone_id].each do |k|
|
||||
key = "cloudstack_#{k}".to_sym
|
||||
if Fog.credentials[key]
|
||||
hash[k]= Fog.credentials[key]
|
||||
end
|
||||
end
|
||||
end,
|
||||
:mocked => true
|
||||
},
|
||||
:glesys => {
|
||||
:server_attributes => {
|
||||
:rootpassword => "secret_password_#{Time.now.to_i}",
|
||||
|
|
|
@ -17,6 +17,13 @@ if Fog.mock?
|
|||
:brightbox_secret => 'brightbox_secret',
|
||||
:clodo_api_key => 'clodo_api_key',
|
||||
:clodo_username => 'clodo_username',
|
||||
:cloudstack_disk_offering_id => '',
|
||||
:cloudstack_host => 'http://cloudstack.example.org',
|
||||
:cloudstack_network_ids => '',
|
||||
:cloudstack_service_offering_id => '4437ac6c-9fe3-477a-57ec-60a5a45896a4',
|
||||
:cloudstack_template_id => '8a31cf9c-f248-0588-256e-9dbf58785216',
|
||||
:cloudstack_zone_id => 'c554c592-e09c-9df5-7688-4a32754a4305',
|
||||
:cloudstack_project_id => 'f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1',
|
||||
:digitalocean_api_key => 'digitalocean_api_key',
|
||||
:digitalocean_client_id => 'digitalocean_client_id',
|
||||
:digitalocean_token => 'digitalocean_token',
|
||||
|
|
Loading…
Add table
Reference in a new issue