Created
November 11, 2012 18:28
-
-
Save ohadlevy/4055794 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Fog | |
module Compute | |
class Vsphere | |
class Datacenter < Fog::Model | |
identity :id | |
attribute :name | |
attribute :status | |
def clusters | |
connection.clusters(:datacenter => name) | |
end | |
def networks | |
connection.networks(:datacenter => name) | |
end | |
def datastores | |
connection.datastores(:datacenter => name) | |
end | |
def vm_folders | |
connection.folders(:datacenter => name, :type => 'vm') | |
end | |
def network_folders | |
connection.folders(:datacenter => name, :type => 'network') | |
end | |
def to_s | |
name | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/a5afcf2ef59ca76ace7f