runcible 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/runcible.rb +0 -0
- data/lib/runcible/base.rb +0 -0
- data/lib/runcible/extensions/consumer.rb +0 -0
- data/lib/runcible/extensions/consumer_group.rb +0 -0
- data/lib/runcible/extensions/distribution.rb +0 -0
- data/lib/runcible/extensions/distributor.rb +0 -0
- data/lib/runcible/extensions/errata.rb +0 -0
- data/lib/runcible/extensions/importer.rb +0 -0
- data/lib/runcible/extensions/package_category.rb +0 -0
- data/lib/runcible/extensions/package_group.rb +0 -0
- data/lib/runcible/extensions/repository.rb +0 -0
- data/lib/runcible/extensions/rpm.rb +0 -0
- data/lib/runcible/extensions/unit.rb +0 -0
- data/lib/runcible/extensions/yum_distributor.rb +0 -0
- data/lib/runcible/extensions/yum_importer.rb +0 -0
- data/lib/runcible/resources/consumer.rb +0 -0
- data/lib/runcible/resources/consumer_group.rb +0 -0
- data/lib/runcible/resources/event_notifier.rb +0 -0
- data/lib/runcible/resources/repository.rb +0 -0
- data/lib/runcible/resources/repository_group.rb +93 -0
- data/lib/runcible/resources/repository_schedule.rb +0 -0
- data/lib/runcible/resources/role.rb +0 -0
- data/lib/runcible/resources/task.rb +0 -0
- data/lib/runcible/resources/unit.rb +0 -0
- data/lib/runcible/resources/user.rb +0 -0
- data/lib/runcible/version.rb +1 -1
- metadata +78 -72
data/lib/runcible.rb
CHANGED
File without changes
|
data/lib/runcible/base.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# Copyright (c) 2012 Red Hat, Inc.
|
2
|
+
#
|
3
|
+
# MIT License
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
# a copy of this software and associated documentation files (the
|
7
|
+
# "Software"), to deal in the Software without restriction, including
|
8
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
# the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be
|
14
|
+
# included in all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
require 'active_support/core_ext/hash'
|
25
|
+
|
26
|
+
module Runcible
|
27
|
+
module Resources
|
28
|
+
# @see https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/repo/groups/
|
29
|
+
class RepositoryGroup < Runcible::Base
|
30
|
+
|
31
|
+
# Generates the API path for Repository Groups
|
32
|
+
#
|
33
|
+
# @param [String] id the ID of the Repository group
|
34
|
+
# @return [String] the Repository group path, may contain the id if passed
|
35
|
+
def self.path(id=nil)
|
36
|
+
groups = "repo_groups/"
|
37
|
+
id.nil? ? groups : groups + "#{id}/"
|
38
|
+
end
|
39
|
+
|
40
|
+
# Creates a Repository Group
|
41
|
+
#
|
42
|
+
# @param [String] id the ID of the group
|
43
|
+
# @param [Hash] optional container for all optional parameters
|
44
|
+
# @return [RestClient::Response]
|
45
|
+
def self.create(id, optional={})
|
46
|
+
required = required_params(binding.send(:local_variables), binding)
|
47
|
+
call(:post, path, :payload => { :required => required, :optional => optional })
|
48
|
+
end
|
49
|
+
|
50
|
+
# Retrieves a Repository Group
|
51
|
+
#
|
52
|
+
# @param [String] id the ID of the Repository group
|
53
|
+
# @return [RestClient::Response]
|
54
|
+
def self.retrieve(id)
|
55
|
+
call(:get, path(id))
|
56
|
+
end
|
57
|
+
|
58
|
+
# Retrieves all Repository Group
|
59
|
+
#
|
60
|
+
# @return [RestClient::Response]
|
61
|
+
def self.retrieve_all
|
62
|
+
call(:get, path)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Deletes a Repository Group
|
66
|
+
#
|
67
|
+
# @param [String] id the ID of the Repository group
|
68
|
+
# @return [RestClient::Response]
|
69
|
+
def self.delete(id)
|
70
|
+
call(:delete, path(id))
|
71
|
+
end
|
72
|
+
|
73
|
+
# Associates Repositories with a Repository Group
|
74
|
+
#
|
75
|
+
# @param [String] id the ID of the Repository group
|
76
|
+
# @param [Hash] criteria criteria based on Mongo syntax representing repos to associate
|
77
|
+
# @return [RestClient::Response]
|
78
|
+
def self.associate(id, criteria)
|
79
|
+
call(:post, path(id) + "actions/associate/", :payload => {:required => criteria})
|
80
|
+
end
|
81
|
+
|
82
|
+
# Unassociates Repositories with a Repository Group
|
83
|
+
#
|
84
|
+
# @param [String] id the ID of the Repository group
|
85
|
+
# @param [Hash] criteria criteria based on Mongo syntax representing repos ta unassociate
|
86
|
+
# @return [RestClient::Response]
|
87
|
+
def self.unassociate(id, criteria)
|
88
|
+
call(:post, path(id) + "actions/unassociate/", :payload => {:required => criteria})
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/runcible/version.rb
CHANGED
metadata
CHANGED
@@ -1,96 +1,100 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runcible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
5
|
-
prerelease:
|
4
|
+
version: 0.4.1
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Eric D Helms, Justin Sherrill
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
|
17
|
-
none: false
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
17
|
requirements:
|
19
|
-
- -
|
18
|
+
- - ">="
|
20
19
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
version: !binary |-
|
21
|
+
MA==
|
25
22
|
none: false
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
|
-
- -
|
25
|
+
- - ">="
|
28
26
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
27
|
+
version: !binary |-
|
28
|
+
MA==
|
29
|
+
none: false
|
30
|
+
prerelease: false
|
31
|
+
type: :runtime
|
30
32
|
- !ruby/object:Gem::Dependency
|
31
33
|
name: rest-client
|
32
|
-
|
33
|
-
none: false
|
34
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
35
|
requirements:
|
35
|
-
- -
|
36
|
+
- - ">="
|
36
37
|
- !ruby/object:Gem::Version
|
37
38
|
version: 1.6.1
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
42
41
|
requirements:
|
43
|
-
- -
|
42
|
+
- - ">="
|
44
43
|
- !ruby/object:Gem::Version
|
45
44
|
version: 1.6.1
|
45
|
+
none: false
|
46
|
+
prerelease: false
|
47
|
+
type: :runtime
|
46
48
|
- !ruby/object:Gem::Dependency
|
47
49
|
name: oauth
|
48
|
-
|
49
|
-
none: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
51
|
requirements:
|
51
|
-
- -
|
52
|
+
- - ">="
|
52
53
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
54
|
-
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
version: !binary |-
|
55
|
+
MA==
|
57
56
|
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: !binary |-
|
62
|
+
MA==
|
63
|
+
none: false
|
64
|
+
prerelease: false
|
65
|
+
type: :runtime
|
62
66
|
- !ruby/object:Gem::Dependency
|
63
67
|
name: activesupport
|
64
|
-
|
65
|
-
none: false
|
68
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
69
|
requirements:
|
67
|
-
- -
|
70
|
+
- - ">="
|
68
71
|
- !ruby/object:Gem::Version
|
69
72
|
version: 3.0.10
|
70
|
-
type: :runtime
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
74
75
|
requirements:
|
75
|
-
- -
|
76
|
+
- - ">="
|
76
77
|
- !ruby/object:Gem::Version
|
77
78
|
version: 3.0.10
|
79
|
+
none: false
|
80
|
+
prerelease: false
|
81
|
+
type: :runtime
|
78
82
|
- !ruby/object:Gem::Dependency
|
79
83
|
name: i18n
|
80
|
-
|
81
|
-
none: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
85
|
requirements:
|
83
|
-
- -
|
86
|
+
- - ">="
|
84
87
|
- !ruby/object:Gem::Version
|
85
88
|
version: 0.5.0
|
86
|
-
type: :runtime
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
90
91
|
requirements:
|
91
|
-
- -
|
92
|
+
- - ">="
|
92
93
|
- !ruby/object:Gem::Version
|
93
94
|
version: 0.5.0
|
95
|
+
none: false
|
96
|
+
prerelease: false
|
97
|
+
type: :runtime
|
94
98
|
description: Exposing Pulp's juiciest components to the Ruby world.
|
95
99
|
email:
|
96
100
|
- ehelms@redhat.com, jsherril@redhat.com
|
@@ -98,54 +102,56 @@ executables: []
|
|
98
102
|
extensions: []
|
99
103
|
extra_rdoc_files: []
|
100
104
|
files:
|
101
|
-
- lib/runcible
|
102
|
-
- lib/runcible/resources/consumer.rb
|
103
|
-
- lib/runcible/resources/repository_schedule.rb
|
104
|
-
- lib/runcible/resources/consumer_group.rb
|
105
|
-
- lib/runcible/resources/unit.rb
|
106
|
-
- lib/runcible/resources/task.rb
|
107
|
-
- lib/runcible/resources/repository.rb
|
108
|
-
- lib/runcible/resources/role.rb
|
109
|
-
- lib/runcible/resources/event_notifier.rb
|
110
|
-
- lib/runcible/base.rb
|
105
|
+
- lib/runcible.rb
|
111
106
|
- lib/runcible/version.rb
|
107
|
+
- lib/runcible/base.rb
|
112
108
|
- lib/runcible/extensions/package_category.rb
|
109
|
+
- lib/runcible/extensions/errata.rb
|
110
|
+
- lib/runcible/extensions/distributor.rb
|
111
|
+
- lib/runcible/extensions/consumer_group.rb
|
113
112
|
- lib/runcible/extensions/consumer.rb
|
114
|
-
- lib/runcible/extensions/
|
113
|
+
- lib/runcible/extensions/repository.rb
|
115
114
|
- lib/runcible/extensions/yum_distributor.rb
|
116
|
-
- lib/runcible/extensions/yum_importer.rb
|
117
|
-
- lib/runcible/extensions/package_group.rb
|
118
115
|
- lib/runcible/extensions/rpm.rb
|
119
|
-
- lib/runcible/extensions/consumer_group.rb
|
120
116
|
- lib/runcible/extensions/unit.rb
|
121
|
-
- lib/runcible/extensions/
|
117
|
+
- lib/runcible/extensions/yum_importer.rb
|
118
|
+
- lib/runcible/extensions/package_group.rb
|
119
|
+
- lib/runcible/extensions/importer.rb
|
122
120
|
- lib/runcible/extensions/distribution.rb
|
123
|
-
- lib/runcible/
|
124
|
-
- lib/runcible/
|
125
|
-
- lib/runcible.rb
|
121
|
+
- lib/runcible/resources/role.rb
|
122
|
+
- lib/runcible/resources/consumer_group.rb
|
123
|
+
- lib/runcible/resources/consumer.rb
|
124
|
+
- lib/runcible/resources/repository_schedule.rb
|
125
|
+
- lib/runcible/resources/task.rb
|
126
|
+
- lib/runcible/resources/event_notifier.rb
|
127
|
+
- lib/runcible/resources/repository.rb
|
128
|
+
- lib/runcible/resources/user.rb
|
129
|
+
- lib/runcible/resources/unit.rb
|
130
|
+
- lib/runcible/resources/repository_group.rb
|
126
131
|
homepage: https://github.com/Katello/runcible
|
127
132
|
licenses: []
|
128
|
-
post_install_message:
|
133
|
+
post_install_message:
|
129
134
|
rdoc_options: []
|
130
135
|
require_paths:
|
131
136
|
- lib
|
132
137
|
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
-
none: false
|
134
138
|
requirements:
|
135
|
-
- -
|
139
|
+
- - ">="
|
136
140
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
138
|
-
|
141
|
+
version: !binary |-
|
142
|
+
MA==
|
139
143
|
none: false
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
145
|
requirements:
|
141
|
-
- -
|
146
|
+
- - ">="
|
142
147
|
- !ruby/object:Gem::Version
|
143
|
-
version:
|
148
|
+
version: !binary |-
|
149
|
+
MA==
|
150
|
+
none: false
|
144
151
|
requirements: []
|
145
|
-
rubyforge_project:
|
146
|
-
rubygems_version: 1.8.
|
147
|
-
signing_key:
|
152
|
+
rubyforge_project:
|
153
|
+
rubygems_version: 1.8.24
|
154
|
+
signing_key:
|
148
155
|
specification_version: 3
|
149
156
|
summary: ''
|
150
157
|
test_files: []
|
151
|
-
has_rdoc:
|