Module: Chef::Sugar::Cloud

Extended by:
Cloud
Included in:
Cloud
Defined in:
lib/chef/sugar/cloud.rb

Instance Method Summary collapse

Instance Method Details

#azure?(node) ⇒ Boolean

Return true if the current current node is in Azure

Parameters:

Returns:

  • (Boolean)


127
128
129
# File 'lib/chef/sugar/cloud.rb', line 127

def azure?(node)
  node.key?('azure')
end

#cloud?(node) ⇒ Boolean

Return true if the current current node is in “the cloud”.

Parameters:

Returns:

  • (Boolean)


30
31
32
# File 'lib/chef/sugar/cloud.rb', line 30

def cloud?(node)
  node.key?('cloud')
end

#cloudstack?(node) ⇒ Boolean

Return true if the current current node is in Cloudstack

Parameters:

Returns:

  • (Boolean)


115
116
117
# File 'lib/chef/sugar/cloud.rb', line 115

def cloudstack?(node)
  node.key?('cloudstack')
end

#digitalocean?(node) ⇒ Boolean

Return true if the current current node is in DigitalOcean

Parameters:

Returns:

  • (Boolean)


139
140
141
# File 'lib/chef/sugar/cloud.rb', line 139

def digitalocean?(node)
  node.key?('digital_ocean')
end

#ec2?(node) ⇒ Boolean

Return true if the current current node is in EC2

Parameters:

Returns:

  • (Boolean)


42
43
44
# File 'lib/chef/sugar/cloud.rb', line 42

def ec2?(node)
  node.key?('ec2')
end

#eucalyptus?(node) ⇒ Boolean Also known as: euca?

Return true if the current current node is in Eucalyptus

Parameters:

Returns:

  • (Boolean)


78
79
80
# File 'lib/chef/sugar/cloud.rb', line 78

def eucalyptus?(node)
  node.key?('eucalyptus')
end

#gce?(node) ⇒ Boolean

Return true if the current current node is in GCE

Parameters:

Returns:

  • (Boolean)


54
55
56
# File 'lib/chef/sugar/cloud.rb', line 54

def gce?(node)
  node.key?('gce')
end

#linode?(node) ⇒ Boolean

Return true if the current current node is in Linode

Parameters:

Returns:

  • (Boolean)


91
92
93
# File 'lib/chef/sugar/cloud.rb', line 91

def linode?(node)
  node.key?('linode')
end

#openstack?(node) ⇒ Boolean

Return true if the current current node is in Openstack

Parameters:

Returns:

  • (Boolean)


103
104
105
# File 'lib/chef/sugar/cloud.rb', line 103

def openstack?(node)
  node.key?('openstack')
end

#rackspace?(node) ⇒ Boolean

Return true if the current current node is in Rackspace

Parameters:

Returns:

  • (Boolean)


66
67
68
# File 'lib/chef/sugar/cloud.rb', line 66

def rackspace?(node)
  node.key?('rackspace')
end

#softlayer?(node) ⇒ Boolean

Return true if the current current node is in SoftLayer

Parameters:

Returns:

  • (Boolean)


151
152
153
# File 'lib/chef/sugar/cloud.rb', line 151

def softlayer?(node)
  node.key?('softlayer')
end