1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/cloudstack/requests/compute/create_security_group.rb
Josh Lane & Jason Hansen 722b33cdad [cloudstack|security_groups] add groups and rules
* add volume tests back into tests/cloudstack/models/
* represent rules as a resource
* fix job representations
2012-07-18 12:59:16 -07:00

28 lines
661 B
Ruby

module Fog
module Compute
class Cloudstack
class Real
def create_security_group(options={})
options.merge!(
'command' => 'createSecurityGroup'
)
request(options)
end
end # Real
class Mock
def create_security_group(options={})
security_group_id = Fog::Cloudstack.uuid
security_group = {
"id" => security_group_id,
}.merge(options)
self.data[:security_groups][security_group_id]= security_group
{"createsecuritygroupresponse" => { "securitygroup" => security_group}}
end
end
end
end
end