Sha256: dea7cebbc2fde70702b471a270d267027945767ecfb44a030f175203e6b7399b

Contents?: true

Size: 552 Bytes

Versions: 60

Compression:

Stored size: 552 Bytes

Contents

module CloudstackClient

	module Project

		##
    # Get project by name.

    def get_project(name)
      params = {
          'command' => 'listProjects',
          'name' => name,
          'listall' => true,
      }
      json = send_request(params)
      json['project'] ? json['project'].first : nil
    end

    ##
    # Lists projects.
            
    def list_projects
      params = {
          'command' => 'listProjects',
          'listall' => true,
      }
      json = send_request(params)
      json['project'] || []
    end

	end

end

Version data entries

60 entries across 60 versions & 3 rubygems

Version Path
cloudstack-nagios-0.3.1 lib/cloudstack-client/commands/project.rb
cloudstack-nagios-0.3.0 lib/cloudstack-client/commands/project.rb
cloudstack-nagios-0.2.0 lib/cloudstack-client/commands/project.rb
cloudstack-nagios-0.1.3 lib/cloudstack-client/commands/project.rb
cloudstack-nagios-0.1.1 lib/cloudstack-client/commands/project.rb
cloudstack-nagios-0.1.0 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.11 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.10 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.9 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.8 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.7 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.6 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.5 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.4 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.3 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.2 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.3.1 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.2.2 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.2.1 lib/cloudstack-client/commands/project.rb
cloudstack-cli-0.2.0 lib/cloudstack-client/commands/project.rb