2011-09-07 10:00:25 -04:00
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Cloudstack
|
|
|
|
class Real
|
|
|
|
def create_security_group(options={})
|
|
|
|
options.merge!(
|
|
|
|
'command' => 'createSecurityGroup'
|
|
|
|
)
|
|
|
|
|
|
|
|
request(options)
|
|
|
|
end
|
2012-07-17 18:24:04 -04:00
|
|
|
end # Real
|
|
|
|
|
|
|
|
class Mock
|
|
|
|
def create_security_group(options={})
|
|
|
|
security_group_id = Fog::Cloudstack.uuid
|
2011-09-07 10:00:25 -04:00
|
|
|
|
2012-07-17 18:24:04 -04:00
|
|
|
security_group = {
|
|
|
|
"id" => security_group_id,
|
|
|
|
}.merge(options)
|
|
|
|
|
|
|
|
self.data[:security_groups][security_group_id]= security_group
|
|
|
|
{"createsecuritygroupresponse" => { "securitygroup" => security_group}}
|
|
|
|
end
|
2011-09-07 10:00:25 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|