class StudioApi::Repository

Represents available repositories for appliance.

Allows finding and importing repositories. When using find :all then there is optional parameters for base_system and filter

@example Find repository with kde for SLE11

StudioApi::Repository.find :all, :params => { :base_system => "sle11", :filter => "kde" }

Public Class Methods

import(url, name) click to toggle source

Import new repository to Studio

note: Repository will be available to everyone @param (to_s) url to repository @param (to_s) name of created repository @return [StudioApi::Repository] imported repository

   # File lib/studio_api/repository.rb
23 def self.import (url, name)
24   response = post '',:url => url, :name => name
25   attrs = Hash.from_xml response.body
26   Repository.new attrs["repository"]
27 end

Private Class Methods

custom_method_collection_url(method_name, options = {}) click to toggle source

handle special studio collection method for import

   # File lib/studio_api/repository.rb
30 def self.custom_method_collection_url(method_name, options = {})
31   prefix_options, query_options = split_options(options)
32   "#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}"
33 end