katello_api 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. data/Gemfile +8 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +53 -0
  4. data/Rakefile +2 -0
  5. data/katello_api.gemspec +25 -0
  6. data/lib/katello_api/base.rb +134 -0
  7. data/lib/katello_api/config.yml +6 -0
  8. data/lib/katello_api/resources/activation_key.rb +104 -0
  9. data/lib/katello_api/resources/architecture.rb +64 -0
  10. data/lib/katello_api/resources/changeset.rb +83 -0
  11. data/lib/katello_api/resources/changesets_content.rb +149 -0
  12. data/lib/katello_api/resources/compute_resource.rb +82 -0
  13. data/lib/katello_api/resources/config_template.rb +92 -0
  14. data/lib/katello_api/resources/content_view.rb +55 -0
  15. data/lib/katello_api/resources/content_view_definition.rb +107 -0
  16. data/lib/katello_api/resources/crl.rb +19 -0
  17. data/lib/katello_api/resources/distribution.rb +29 -0
  18. data/lib/katello_api/resources/distributor.rb +112 -0
  19. data/lib/katello_api/resources/domain.rb +71 -0
  20. data/lib/katello_api/resources/environment.rb +106 -0
  21. data/lib/katello_api/resources/erratum.rb +33 -0
  22. data/lib/katello_api/resources/gpg_key.rb +78 -0
  23. data/lib/katello_api/resources/hardware_model.rb +70 -0
  24. data/lib/katello_api/resources/organization.rb +64 -0
  25. data/lib/katello_api/resources/package.rb +42 -0
  26. data/lib/katello_api/resources/permission.rb +57 -0
  27. data/lib/katello_api/resources/ping.rb +37 -0
  28. data/lib/katello_api/resources/product.rb +119 -0
  29. data/lib/katello_api/resources/provider.rb +151 -0
  30. data/lib/katello_api/resources/repository.rb +128 -0
  31. data/lib/katello_api/resources/repository_set.rb +45 -0
  32. data/lib/katello_api/resources/role.rb +74 -0
  33. data/lib/katello_api/resources/role_ldap_group.rb +41 -0
  34. data/lib/katello_api/resources/smart_proxy.rb +67 -0
  35. data/lib/katello_api/resources/statu.rb +19 -0
  36. data/lib/katello_api/resources/subnet.rb +64 -0
  37. data/lib/katello_api/resources/subscription.rb +64 -0
  38. data/lib/katello_api/resources/sync.rb +49 -0
  39. data/lib/katello_api/resources/sync_plan.rb +78 -0
  40. data/lib/katello_api/resources/system.rb +226 -0
  41. data/lib/katello_api/resources/system_group.rb +136 -0
  42. data/lib/katello_api/resources/system_group_erratum.rb +34 -0
  43. data/lib/katello_api/resources/system_group_package.rb +49 -0
  44. data/lib/katello_api/resources/system_package.rb +45 -0
  45. data/lib/katello_api/resources/task.rb +30 -0
  46. data/lib/katello_api/resources/template.rb +107 -0
  47. data/lib/katello_api/resources/templates_content.rb +143 -0
  48. data/lib/katello_api/resources/uebercert.rb +20 -0
  49. data/lib/katello_api/resources/user.rb +113 -0
  50. data/lib/katello_api/rest_client_oauth.rb +19 -0
  51. data/lib/katello_api/version.rb +3 -0
  52. data/lib/katello_api.rb +23 -0
  53. metadata +160 -0
@@ -0,0 +1,151 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class Provider < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["providers"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [String] name filter providers by name
10
+ # @option params [String] organization_id organization identifier
11
+ #
12
+ # @param [Hash] headers additional http headers
13
+ def index(params = { }, headers = { })
14
+ check_params params, :allowed => true, :method => __method__
15
+ url, params = fill_params_in_url "/api/organizations/:organization_id/providers", params
16
+ call(:"get", url, params, headers)
17
+ end
18
+
19
+ # @param [Hash] params a hash of params to be passed to the service
20
+ # @option params [String] id provider numeric identifier
21
+ #
22
+ # @param [Hash] headers additional http headers
23
+ def show(params = { }, headers = { })
24
+ check_params params, :allowed => true, :method => __method__
25
+ url, params = fill_params_in_url "/api/providers/:id", params
26
+ call(:"get", url, params, headers)
27
+ end
28
+
29
+ # @param [Hash] params a hash of params to be passed to the service
30
+ # @option params [String] organization_id organization identifier
31
+ # @option params [Hash] provider
32
+ # allowed keys are:
33
+ # * description [String, nil] provider description ,
34
+ # * name [String] provider name ,
35
+ # * provider_type [String],
36
+ # * repository_url [String, nil] repository url ,
37
+ #
38
+ # @param [Hash] headers additional http headers
39
+ def create(params = { }, headers = { })
40
+ check_params params, :allowed => true, :method => __method__
41
+ url, params = fill_params_in_url "/api/providers", params
42
+ call(:"post", url, params, headers)
43
+ end
44
+
45
+ # @param [Hash] params a hash of params to be passed to the service
46
+ # @option params [String] id provider numeric identifier
47
+ # @option params [Hash] provider
48
+ # allowed keys are:
49
+ # * description [String, nil] provider description ,
50
+ # * name [String] provider name ,
51
+ # * repository_url [String, nil] repository url ,
52
+ #
53
+ # @param [Hash] headers additional http headers
54
+ def update(params = { }, headers = { })
55
+ check_params params, :allowed => true, :method => __method__
56
+ url, params = fill_params_in_url "/api/providers/:id", params
57
+ call(:"put", url, params, headers)
58
+ end
59
+
60
+ # @param [Hash] params a hash of params to be passed to the service
61
+ # @option params [String] id provider numeric identifier
62
+ #
63
+ # @param [Hash] headers additional http headers
64
+ def destroy(params = { }, headers = { })
65
+ check_params params, :allowed => true, :method => __method__
66
+ url, params = fill_params_in_url "/api/providers/:id", params
67
+ call(:"delete", url, params, headers)
68
+ end
69
+
70
+ # @param [Hash] params a hash of params to be passed to the service
71
+ # @option params [String] id provider numeric identifier
72
+ #
73
+ # @param [Hash] headers additional http headers
74
+ def products(params = { }, headers = { })
75
+ check_params params, :allowed => true, :method => __method__
76
+ url, params = fill_params_in_url "/api/providers/:id/products", params
77
+ call(:"get", url, params, headers)
78
+ end
79
+
80
+ # @param [Hash] params a hash of params to be passed to the service
81
+ # @option params [String] url remote url to perform discovery
82
+ #
83
+ # @param [Hash] headers additional http headers
84
+ def discovery(params = { }, headers = { })
85
+ check_params params, :allowed => true, :method => __method__
86
+ url, params = fill_params_in_url "/api/providers/:id/discovery", params
87
+ call(:"post", url, params, headers)
88
+ end
89
+
90
+ # @param [Hash] params a hash of params to be passed to the service
91
+ # @option params [String] id provider numeric identifier
92
+ # @option params [String] force force import
93
+ # @option params [String] import manifest file
94
+ #
95
+ # @param [Hash] headers additional http headers
96
+ def import_manifest(params = { }, headers = { })
97
+ check_params params, :allowed => true, :method => __method__
98
+ url, params = fill_params_in_url "/api/providers/:id/import_manifest", params
99
+ call(:"post", url, params, headers)
100
+ end
101
+
102
+ # @param [Hash] params a hash of params to be passed to the service
103
+ # @option params [String] id provider numeric identifier
104
+ #
105
+ # @param [Hash] headers additional http headers
106
+ def delete_manifest(params = { }, headers = { })
107
+ check_params params, :allowed => true, :method => __method__
108
+ url, params = fill_params_in_url "/api/providers/:id/delete_manifest", params
109
+ call(:"post", url, params, headers)
110
+ end
111
+
112
+ # @param [Hash] params a hash of params to be passed to the service
113
+ # @option params [String] id provider numeric identifier
114
+ #
115
+ # @param [Hash] headers additional http headers
116
+ def refresh_products(params = { }, headers = { })
117
+ check_params params, :allowed => true, :method => __method__
118
+ url, params = fill_params_in_url "/api/providers/:id/refresh_products", params
119
+ call(:"post", url, params, headers)
120
+ end
121
+
122
+ # @param [Hash] params a hash of params to be passed to the service
123
+ # @option params [String] id provider numeric identifier
124
+ # @option params [String] products array of products to import
125
+ #
126
+ # @param [Hash] headers additional http headers
127
+ def import_products(params = { }, headers = { })
128
+ check_params params, :allowed => true, :method => __method__
129
+ url, params = fill_params_in_url "/api/providers/:id/import_products", params
130
+ call(:"post", url, params, headers)
131
+ end
132
+
133
+ # @param [Hash] params a hash of params to be passed to the service
134
+ # @option params [String] id provider numeric identifier
135
+ # @option params [Hash] product
136
+ # allowed keys are:
137
+ # * description [String, nil] product description ,
138
+ # * gpg_key_name [String, nil] identifier of the gpg key ,
139
+ # * label [String],
140
+ # * name [String] product name ,
141
+ #
142
+ # @param [Hash] headers additional http headers
143
+ def product_create(params = { }, headers = { })
144
+ check_params params, :allowed => true, :method => __method__
145
+ url, params = fill_params_in_url "/api/providers/:id/product_create", params
146
+ call(:"post", url, params, headers)
147
+ end
148
+
149
+ end
150
+ end
151
+ end
@@ -0,0 +1,128 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class Repository < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["repositories"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [String] gpg_key_name name of a gpg key that will be assigned to the new repository
10
+ # @option params [String] name
11
+ # @option params [String] organization_id id of an organization the repository will be contained in
12
+ # @option params [String] product_id id of a product the repository will be contained in
13
+ # @option params [String] url repository source url
14
+ #
15
+ # @param [Hash] headers additional http headers
16
+ def create(params = { }, headers = { })
17
+ check_params params, :allowed => true, :method => __method__
18
+ url, params = fill_params_in_url "/api/repositories", params
19
+ call(:"post", url, params, headers)
20
+ end
21
+
22
+ # @param [Hash] params a hash of params to be passed to the service
23
+ # @option params [String] id repository id
24
+ #
25
+ # @param [Hash] headers additional http headers
26
+ def show(params = { }, headers = { })
27
+ check_params params, :allowed => true, :method => __method__
28
+ url, params = fill_params_in_url "/api/repositories/:id", params
29
+ call(:"get", url, params, headers)
30
+ end
31
+
32
+ # @param [Hash] params a hash of params to be passed to the service
33
+ # @option params [String] id repository id
34
+ # @option params [Hash] repository
35
+ # allowed keys are:
36
+ # * gpg_key_name [String] name of a gpg key that will be assigned to the repository ,
37
+ #
38
+ # @param [Hash] headers additional http headers
39
+ def update(params = { }, headers = { })
40
+ check_params params, :allowed => true, :method => __method__
41
+ url, params = fill_params_in_url "/api/repositories/:id", params
42
+ call(:"put", url, params, headers)
43
+ end
44
+
45
+ # @param [Hash] params a hash of params to be passed to the service
46
+ # @option params [String] id
47
+ #
48
+ # @param [Hash] headers additional http headers
49
+ def destroy(params = { }, headers = { })
50
+ check_params params, :allowed => true, :method => __method__
51
+ url, params = fill_params_in_url "/api/repositories/:id", params
52
+ call(:"delete", url, params, headers)
53
+ end
54
+
55
+ # @param [Hash] params a hash of params to be passed to the service
56
+ # @option params [String] id
57
+ # @option params [String] enable flag that enables/disables the repository
58
+ #
59
+ # @param [Hash] headers additional http headers
60
+ def enable(params = { }, headers = { })
61
+ check_params params, :allowed => true, :method => __method__
62
+ url, params = fill_params_in_url "/api/repositories/:id/enable", params
63
+ call(:"post", url, params, headers)
64
+ end
65
+
66
+ # @param [Hash] params a hash of params to be passed to the service
67
+ # @option params [String] id
68
+ #
69
+ # @param [Hash] headers additional http headers
70
+ def sync_complete(params = { }, headers = { })
71
+ check_params params, :allowed => true, :method => __method__
72
+ url, params = fill_params_in_url "/api/repositories/:id/sync_complete", params
73
+ call(:"post", url, params, headers)
74
+ end
75
+
76
+ # @param [Hash] params a hash of params to be passed to the service
77
+ # @option params [String] id
78
+ #
79
+ # @param [Hash] headers additional http headers
80
+ def package_groups(params = { }, headers = { })
81
+ check_params params, :allowed => true, :method => __method__
82
+ url, params = fill_params_in_url "/api/repositories/:id/package_groups", params
83
+ call(:"get", url, params, headers)
84
+ end
85
+
86
+ # @param [Hash] params a hash of params to be passed to the service
87
+ # @option params [String] id
88
+ #
89
+ # @param [Hash] headers additional http headers
90
+ def package_group_categories(params = { }, headers = { })
91
+ check_params params, :allowed => true, :method => __method__
92
+ url, params = fill_params_in_url "/api/repositories/:id/package_group_categories", params
93
+ call(:"get", url, params, headers)
94
+ end
95
+
96
+ # @param [Hash] params a hash of params to be passed to the service
97
+ # @option params [String] id
98
+ #
99
+ # @param [Hash] headers additional http headers
100
+ def gpg_key_content(params = { }, headers = { })
101
+ check_params params, :allowed => true, :method => __method__
102
+ url, params = fill_params_in_url "/api/repositories/:id/gpg_key_content", params
103
+ call(:"get", url, params, headers)
104
+ end
105
+
106
+ # @param [Hash] params a hash of params to be passed to the service
107
+ #
108
+ # @param [Hash] headers additional http headers
109
+ def list_content_view_definition_repositories(params = { }, headers = { })
110
+ check_params params, :allowed => false, :method => __method__
111
+ url, params = fill_params_in_url "/api/content_view_definitions/%s/repositories", params
112
+ call(:"get", url, params, headers)
113
+ end
114
+
115
+ # @param [Hash] params a hash of params to be passed to the service
116
+ # @option params [String] content_view_definition_id content view definition identifier
117
+ # @option params [String] repos updated list of repo ids
118
+ #
119
+ # @param [Hash] headers additional http headers
120
+ def update_content_view_definition_repositories(params = { }, headers = { })
121
+ check_params params, :allowed => true, :method => __method__
122
+ url, params = fill_params_in_url "/api/content_view_definitions/:content_view_definition_id/repositories", params
123
+ call(:"put", url, params, headers)
124
+ end
125
+
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,45 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class RepositorySet < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["repository_sets"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [String] id id or name of the repository set to enable
10
+ # @option params [String] organization_id id of an organization the repository will be contained in
11
+ # @option params [String] product_id id of a product the repository will be contained in
12
+ #
13
+ # @param [Hash] headers additional http headers
14
+ def enable(params = { }, headers = { })
15
+ check_params params, :allowed => true, :method => __method__
16
+ url, params = fill_params_in_url "/api/product/:product_id/repository_set/:id/enable", params
17
+ call(:"post", url, params, headers)
18
+ end
19
+
20
+ # @param [Hash] params a hash of params to be passed to the service
21
+ # @option params [String] id id of the repository set to disable
22
+ # @option params [String] organization_id id of an organization the repository will be contained in
23
+ # @option params [String] product_id id of a product the repository will be contained in
24
+ #
25
+ # @param [Hash] headers additional http headers
26
+ def disable(params = { }, headers = { })
27
+ check_params params, :allowed => true, :method => __method__
28
+ url, params = fill_params_in_url "/api/product/:product_id/repository_set/:id/disable", params
29
+ call(:"post", url, params, headers)
30
+ end
31
+
32
+ # @param [Hash] params a hash of params to be passed to the service
33
+ # @option params [String] organization_id id of an
34
+ # @option params [String] product_id id of a product to list repository sets in
35
+ #
36
+ # @param [Hash] headers additional http headers
37
+ def index(params = { }, headers = { })
38
+ check_params params, :allowed => true, :method => __method__
39
+ url, params = fill_params_in_url "/api/product/:product_id/repository_set", params
40
+ call(:"get", url, params, headers)
41
+ end
42
+
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,74 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class Role < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["roles"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [String] name
10
+ #
11
+ # @param [Hash] headers additional http headers
12
+ def index(params = { }, headers = { })
13
+ check_params params, :allowed => true, :method => __method__
14
+ url, params = fill_params_in_url "/api/roles", params
15
+ call(:"get", url, params, headers)
16
+ end
17
+
18
+ # @param [Hash] params a hash of params to be passed to the service
19
+ #
20
+ # @param [Hash] headers additional http headers
21
+ def show(params = { }, headers = { })
22
+ check_params params, :allowed => false, :method => __method__
23
+ url, params = fill_params_in_url "/api/roles/:id", params
24
+ call(:"get", url, params, headers)
25
+ end
26
+
27
+ # @param [Hash] params a hash of params to be passed to the service
28
+ # @option params [Hash] role
29
+ # allowed keys are:
30
+ # * description [String, nil],
31
+ # * name [String],
32
+ #
33
+ # @param [Hash] headers additional http headers
34
+ def create(params = { }, headers = { })
35
+ check_params params, :allowed => true, :method => __method__
36
+ url, params = fill_params_in_url "/api/roles", params
37
+ call(:"post", url, params, headers)
38
+ end
39
+
40
+ # @param [Hash] params a hash of params to be passed to the service
41
+ # @option params [Hash] role
42
+ # allowed keys are:
43
+ # * description [String, nil],
44
+ # * name [String],
45
+ #
46
+ # @param [Hash] headers additional http headers
47
+ def update(params = { }, headers = { })
48
+ check_params params, :allowed => true, :method => __method__
49
+ url, params = fill_params_in_url "/api/roles/:id", params
50
+ call(:"put", url, params, headers)
51
+ end
52
+
53
+ # @param [Hash] params a hash of params to be passed to the service
54
+ #
55
+ # @param [Hash] headers additional http headers
56
+ def destroy(params = { }, headers = { })
57
+ check_params params, :allowed => false, :method => __method__
58
+ url, params = fill_params_in_url "/api/roles/:id", params
59
+ call(:"delete", url, params, headers)
60
+ end
61
+
62
+ # @param [Hash] params a hash of params to be passed to the service
63
+ # @option params [String] organization_id with this option specified the listed tags are scoped to the organization.
64
+ #
65
+ # @param [Hash] headers additional http headers
66
+ def available_verbs(params = { }, headers = { })
67
+ check_params params, :allowed => true, :method => __method__
68
+ url, params = fill_params_in_url "/api/roles/available_verbs", params
69
+ call(:"get", url, params, headers)
70
+ end
71
+
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,41 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class RoleLdapGroup < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["role_ldap_groups"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [String] name name of the ldap group
10
+ #
11
+ # @param [Hash] headers additional http headers
12
+ def create(params = { }, headers = { })
13
+ check_params params, :allowed => true, :method => __method__
14
+ url, params = fill_params_in_url "/api/roles/:role_id/ldap_groups", params
15
+ call(:"post", url, params, headers)
16
+ end
17
+
18
+ # @param [Hash] params a hash of params to be passed to the service
19
+ # @option params [String] id ldap group (name)
20
+ # @option params [String] role_id role identifier
21
+ #
22
+ # @param [Hash] headers additional http headers
23
+ def destroy(params = { }, headers = { })
24
+ check_params params, :allowed => true, :method => __method__
25
+ url, params = fill_params_in_url "/api/roles/:role_id/ldap_groups/:id", params
26
+ call(:"delete", url, params, headers)
27
+ end
28
+
29
+ # @param [Hash] params a hash of params to be passed to the service
30
+ # @option params [String] role_id role identifier
31
+ #
32
+ # @param [Hash] headers additional http headers
33
+ def index(params = { }, headers = { })
34
+ check_params params, :allowed => true, :method => __method__
35
+ url, params = fill_params_in_url "/api/roles/:role_id/ldap_groups", params
36
+ call(:"get", url, params, headers)
37
+ end
38
+
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,67 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class SmartProxy < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["smart_proxies"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [String] order sort results
10
+ # @option params [String] search filter results
11
+ #
12
+ # @param [Hash] headers additional http headers
13
+ def index(params = { }, headers = { })
14
+ check_params params, :allowed => true, :method => __method__
15
+ url, params = fill_params_in_url "/api/smart_proxies", params
16
+ call(:"get", url, params, headers)
17
+ end
18
+
19
+ # @param [Hash] params a hash of params to be passed to the service
20
+ # @option params [String] id domain name (no slashes)
21
+ #
22
+ # @param [Hash] headers additional http headers
23
+ def show(params = { }, headers = { })
24
+ check_params params, :allowed => true, :method => __method__
25
+ url, params = fill_params_in_url "/api/smart_proxies/:id", params
26
+ call(:"get", url, params, headers)
27
+ end
28
+
29
+ # @param [Hash] params a hash of params to be passed to the service
30
+ # @option params [Hash] smart_proxy
31
+ # allowed keys are:
32
+ # * name [String] the smart proxy name ,
33
+ # * url [String] the smart proxy url starting with ‘http://’ or ‘https://’ ,
34
+ #
35
+ # @param [Hash] headers additional http headers
36
+ def create(params = { }, headers = { })
37
+ check_params params, :allowed => true, :method => __method__
38
+ url, params = fill_params_in_url "/api/smart_proxies", params
39
+ call(:"post", url, params, headers)
40
+ end
41
+
42
+ # @param [Hash] params a hash of params to be passed to the service
43
+ # @option params [Hash] smart_proxy
44
+ # allowed keys are:
45
+ # * name [String] the smart proxy name ,
46
+ # * url [String] the smart proxy url starting with ‘http://’ or ‘https://’ ,
47
+ #
48
+ # @param [Hash] headers additional http headers
49
+ def update(params = { }, headers = { })
50
+ check_params params, :allowed => true, :method => __method__
51
+ url, params = fill_params_in_url "/api/smart_proxies/:id", params
52
+ call(:"put", url, params, headers)
53
+ end
54
+
55
+ # @param [Hash] params a hash of params to be passed to the service
56
+ # @option params [String] id domain name (no slashes)
57
+ #
58
+ # @param [Hash] headers additional http headers
59
+ def destroy(params = { }, headers = { })
60
+ check_params params, :allowed => true, :method => __method__
61
+ url, params = fill_params_in_url "/api/smart_proxies/:id", params
62
+ call(:"delete", url, params, headers)
63
+ end
64
+
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,19 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class Statu < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["status"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ #
10
+ # @param [Hash] headers additional http headers
11
+ def memory(params = { }, headers = { })
12
+ check_params params, :allowed => false, :method => __method__
13
+ url, params = fill_params_in_url "/api/status/memory", params
14
+ call(:"get", url, params, headers)
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,64 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class Subnet < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["subnets"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ #
10
+ # @param [Hash] headers additional http headers
11
+ def index(params = { }, headers = { })
12
+ check_params params, :allowed => false, :method => __method__
13
+ url, params = fill_params_in_url "/api/subnets", params
14
+ call(:"get", url, params, headers)
15
+ end
16
+
17
+ # @param [Hash] params a hash of params to be passed to the service
18
+ # @option params [String] id subnet name
19
+ #
20
+ # @param [Hash] headers additional http headers
21
+ def show(params = { }, headers = { })
22
+ check_params params, :allowed => true, :method => __method__
23
+ url, params = fill_params_in_url "/api/subnets/:id", params
24
+ call(:"get", url, params, headers)
25
+ end
26
+
27
+ # @param [Hash] params a hash of params to be passed to the service
28
+ # @option params [Hash] subnet subnet info
29
+ # allowed keys are:
30
+ # * name [String] subnet name ,
31
+ #
32
+ # @param [Hash] headers additional http headers
33
+ def create(params = { }, headers = { })
34
+ check_params params, :allowed => true, :method => __method__
35
+ url, params = fill_params_in_url "/api/subnet", params
36
+ call(:"post", url, params, headers)
37
+ end
38
+
39
+ # @param [Hash] params a hash of params to be passed to the service
40
+ # @option params [String] id subnet name
41
+ # @option params [Hash] subnet subnet info
42
+ # allowed keys are:
43
+ # * name [String] subnet name ,
44
+ #
45
+ # @param [Hash] headers additional http headers
46
+ def update(params = { }, headers = { })
47
+ check_params params, :allowed => true, :method => __method__
48
+ url, params = fill_params_in_url "/api/subnets/:id", params
49
+ call(:"put", url, params, headers)
50
+ end
51
+
52
+ # @param [Hash] params a hash of params to be passed to the service
53
+ # @option params [String] id subnet name
54
+ #
55
+ # @param [Hash] headers additional http headers
56
+ def destroy(params = { }, headers = { })
57
+ check_params params, :allowed => true, :method => __method__
58
+ url, params = fill_params_in_url "/api/subnets/:id", params
59
+ call(:"delete", url, params, headers)
60
+ end
61
+
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,64 @@
1
+ module KatelloApi
2
+ module Resources
3
+ class Subscription < KatelloApi::Base
4
+ def self.doc
5
+ @doc ||= KatelloApi.doc['resources']["subscriptions"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [String] system_id system uuid
10
+ #
11
+ # @param [Hash] headers additional http headers
12
+ def index(params = { }, headers = { })
13
+ check_params params, :allowed => true, :method => __method__
14
+ url, params = fill_params_in_url "/api/systems/:system_id/subscriptions", params
15
+ call(:"get", url, params, headers)
16
+ end
17
+
18
+ # @param [Hash] params a hash of params to be passed to the service
19
+ # @option params [String] pool subscription pool uuid
20
+ # @option params [String] quantity number of subscription to use
21
+ # @option params [String] system_id system uuid
22
+ #
23
+ # @param [Hash] headers additional http headers
24
+ def create(params = { }, headers = { })
25
+ check_params params, :allowed => true, :method => __method__
26
+ url, params = fill_params_in_url "/api/systems/:system_id/subscriptions", params
27
+ call(:"post", url, params, headers)
28
+ end
29
+
30
+ # @param [Hash] params a hash of params to be passed to the service
31
+ # @option params [String] id entitlement id
32
+ # @option params [String] system_id system uuid
33
+ #
34
+ # @param [Hash] headers additional http headers
35
+ def destroy(params = { }, headers = { })
36
+ check_params params, :allowed => true, :method => __method__
37
+ url, params = fill_params_in_url "/api/systems/:system_id/subscriptions/:id", params
38
+ call(:"delete", url, params, headers)
39
+ end
40
+
41
+ # @param [Hash] params a hash of params to be passed to the service
42
+ # @option params [String] system_id system uuid
43
+ #
44
+ # @param [Hash] headers additional http headers
45
+ def destroy_all(params = { }, headers = { })
46
+ check_params params, :allowed => true, :method => __method__
47
+ url, params = fill_params_in_url "/api/systems/:system_id/subscriptions", params
48
+ call(:"delete", url, params, headers)
49
+ end
50
+
51
+ # @param [Hash] params a hash of params to be passed to the service
52
+ # @option params [String] serial_id subscription serial id
53
+ # @option params [String] system_id system uuid
54
+ #
55
+ # @param [Hash] headers additional http headers
56
+ def destroy_by_serial(params = { }, headers = { })
57
+ check_params params, :allowed => true, :method => __method__
58
+ url, params = fill_params_in_url "/api/systems/:system_id/subscriptions/serials/:serial_id", params
59
+ call(:"delete", url, params, headers)
60
+ end
61
+
62
+ end
63
+ end
64
+ end