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_client-0.9.7 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.9.6 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.9.5 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.9.3 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.9.2 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.9.1 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.9.0 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.8.0 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.7.1 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.7.0 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.6.4 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.6.3 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.6.2 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.6.0 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.6.1 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.5.0 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.4.4 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.4.3 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.4.2 lib/cloudstack_client/commands/project.rb
cloudstack_client-0.4.1 lib/cloudstack_client/commands/project.rb