katello_api 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +3 -0
- data/Gemfile +1 -1
- data/README.rdoc +22 -13
- data/Rakefile +0 -1
- data/doc/KatelloApi/Base.html +102 -116
- data/doc/KatelloApi/Generator/Base.html +65 -80
- data/doc/KatelloApi/Generator.html +5 -5
- data/doc/KatelloApi/Resources/About.html +360 -0
- data/doc/KatelloApi/Resources/ActivationKey.html +190 -304
- data/doc/KatelloApi/Resources/Architecture.html +89 -129
- data/doc/KatelloApi/Resources/Changeset.html +156 -399
- data/doc/KatelloApi/Resources/ChangesetsContent.html +97 -2215
- data/doc/KatelloApi/Resources/ComputeResource.html +131 -189
- data/doc/KatelloApi/Resources/ConfigTemplate.html +143 -208
- data/doc/KatelloApi/Resources/ContentUpload.html +1046 -0
- data/doc/KatelloApi/Resources/ContentView.html +229 -117
- data/doc/KatelloApi/Resources/ContentViewDefinition.html +1190 -323
- data/doc/KatelloApi/Resources/Crl.html +21 -28
- data/doc/KatelloApi/Resources/CustomInfo.html +1110 -0
- data/doc/KatelloApi/Resources/Distribution.html +40 -56
- data/doc/KatelloApi/Resources/Distributor.html +406 -469
- data/doc/KatelloApi/Resources/Domain.html +107 -155
- data/doc/KatelloApi/Resources/Environment.html +211 -539
- data/doc/KatelloApi/Resources/Erratum.html +56 -90
- data/doc/KatelloApi/Resources/Filter.html +1533 -0
- data/doc/KatelloApi/Resources/FilterRule.html +591 -0
- data/doc/KatelloApi/Resources/GpgKey.html +230 -196
- data/doc/KatelloApi/Resources/HardwareModel.html +101 -147
- data/doc/KatelloApi/Resources/Organization.html +647 -158
- data/doc/KatelloApi/Resources/OrganizationDefaultInfo.html +803 -0
- data/doc/KatelloApi/Resources/Package.html +57 -81
- data/doc/KatelloApi/Resources/Permission.html +109 -197
- data/doc/KatelloApi/Resources/Ping.html +37 -179
- data/doc/KatelloApi/Resources/Product.html +289 -462
- data/doc/KatelloApi/Resources/Provider.html +397 -424
- data/doc/KatelloApi/Resources/PuppetModule.html +704 -0
- data/doc/KatelloApi/Resources/Repository.html +302 -958
- data/doc/KatelloApi/Resources/RepositorySet.html +64 -104
- data/doc/KatelloApi/Resources/Role.html +131 -250
- data/doc/KatelloApi/Resources/RoleLdapGroup.html +74 -95
- data/doc/KatelloApi/Resources/SmartProxy.html +97 -143
- data/doc/KatelloApi/Resources/Statu.html +21 -28
- data/doc/KatelloApi/Resources/Status.html +360 -0
- data/doc/KatelloApi/Resources/Subnet.html +89 -129
- data/doc/KatelloApi/Resources/Subscription.html +486 -162
- data/doc/KatelloApi/Resources/Sync.html +85 -155
- data/doc/KatelloApi/Resources/SyncPlan.html +127 -220
- data/doc/KatelloApi/Resources/System.html +913 -925
- data/doc/KatelloApi/Resources/SystemErratum.html +557 -0
- data/doc/KatelloApi/Resources/SystemGroup.html +634 -408
- data/doc/KatelloApi/Resources/SystemGroupErratum.html +47 -66
- data/doc/KatelloApi/Resources/SystemGroupPackage.html +77 -108
- data/doc/KatelloApi/Resources/SystemPackage.html +734 -108
- data/doc/KatelloApi/Resources/SystemsBulkAction.html +1706 -0
- data/doc/KatelloApi/Resources/Task.html +38 -53
- data/doc/KatelloApi/Resources/Template.html +159 -233
- data/doc/KatelloApi/Resources/TemplatesContent.html +214 -312
- data/doc/KatelloApi/Resources/Uebercert.html +25 -34
- data/doc/KatelloApi/Resources/User.html +204 -433
- data/doc/KatelloApi/Resources.html +7 -7
- data/doc/KatelloApi.html +21 -26
- data/doc/_index.html +87 -9
- data/doc/class_list.html +3 -2
- data/doc/css/style.css +1 -1
- data/doc/file.README.html +60 -54
- data/doc/file_list.html +2 -1
- data/doc/frames.html +5 -7
- data/doc/index.html +60 -54
- data/doc/js/app.js +7 -2
- data/doc/js/full_list.js +7 -2
- data/doc/method_list.html +854 -1225
- data/doc/top-level-namespace.html +5 -5
- data/katello_api.gemspec +7 -5
- data/lib/katello_api/base.rb +9 -8
- data/lib/katello_api/documentation.json +1 -1
- data/lib/katello_api/resources/about.rb +18 -0
- data/lib/katello_api/resources/activation_key.rb +11 -13
- data/lib/katello_api/resources/changeset.rb +4 -15
- data/lib/katello_api/resources/changesets_content.rb +6 -130
- data/lib/katello_api/resources/content_upload.rb +61 -0
- data/lib/katello_api/resources/content_view.rb +10 -1
- data/lib/katello_api/resources/content_view_definition.rb +65 -3
- data/lib/katello_api/resources/custom_info.rb +70 -0
- data/lib/katello_api/resources/distributor.rb +33 -18
- data/lib/katello_api/resources/environment.rb +20 -41
- data/lib/katello_api/resources/erratum.rb +3 -4
- data/lib/katello_api/resources/filter.rb +93 -0
- data/lib/katello_api/resources/filter_rule.rb +36 -0
- data/lib/katello_api/resources/gpg_key.rb +18 -14
- data/lib/katello_api/resources/organization.rb +43 -8
- data/lib/katello_api/resources/organization_default_info.rb +48 -0
- data/lib/katello_api/resources/permission.rb +10 -7
- data/lib/katello_api/resources/ping.rb +1 -9
- data/lib/katello_api/resources/product.rb +26 -30
- data/lib/katello_api/resources/provider.rb +21 -20
- data/lib/katello_api/resources/puppet_module.rb +39 -0
- data/lib/katello_api/resources/repository.rb +28 -62
- data/lib/katello_api/resources/repository_set.rb +1 -2
- data/lib/katello_api/resources/role.rb +0 -5
- data/lib/katello_api/resources/role_ldap_group.rb +3 -1
- data/lib/katello_api/resources/status.rb +18 -0
- data/lib/katello_api/resources/subscription.rb +33 -7
- data/lib/katello_api/resources/sync.rb +9 -12
- data/lib/katello_api/resources/sync_plan.rb +2 -5
- data/lib/katello_api/resources/system.rb +95 -73
- data/lib/katello_api/resources/system_erratum.rb +30 -0
- data/lib/katello_api/resources/system_group.rb +40 -27
- data/lib/katello_api/resources/system_group_erratum.rb +1 -1
- data/lib/katello_api/resources/system_group_package.rb +6 -6
- data/lib/katello_api/resources/system_package.rb +46 -5
- data/lib/katello_api/resources/systems_bulk_action.rb +140 -0
- data/lib/katello_api/resources/user.rb +14 -18
- data/lib/katello_api/version.rb +1 -1
- metadata +26 -14
data/doc/file.README.html
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.7.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
@@ -61,66 +61,72 @@
|
|
61
61
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
|
-
<div id="content"><div id='filecontents'
|
64
|
+
<div id="content"><div id='filecontents'>
|
65
|
+
<h1>Katello API bindings for Ruby</h1>
|
66
|
+
|
65
67
|
<h2>Summary</h2>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
68
|
+
|
69
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>katello_api</span><span class='tstring_end'>'</span></span>
|
70
|
+
<span class='id identifier rubyid_envs'>envs</span> <span class='op'>=</span> <span class='const'>KatelloApi</span><span class='op'>::</span><span class='const'>Resources</span><span class='op'>::</span><span class='const'>Environment</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:base_url</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https://localhost/katello</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
71
|
+
<span class='symbol'>:username</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>admin</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
72
|
+
<span class='symbol'>:password</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>admin</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
73
|
+
|
74
|
+
<span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_raw_response'>raw_response</span> <span class='op'>=</span> <span class='id identifier rubyid_envs'>envs</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='symbol'>:organization_id</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ACME_Corporation</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
75
|
+
<span class='id identifier rubyid_pp'>pp</span> <span class='id identifier rubyid_data'>data</span> <span class='comment'># parsed data of the response
|
76
|
+
</span><span class='id identifier rubyid_pp'>pp</span> <span class='id identifier rubyid_raw_response'>raw_response</span> <span class='comment'># raw string of the response body</span></code></pre>
|
77
|
+
|
76
78
|
<h2>Description</h2>
|
77
|
-
|
78
|
-
This gem contains Katello API bindings for the Ruby language. The bindings
|
79
|
-
are generated from API documentation using
|
80
|
-
|
81
|
-
|
82
|
-
<p>
|
83
|
-
The bindings brings support for new versioned API which is not complete
|
79
|
+
|
80
|
+
<p>This gem contains Katello API bindings for the Ruby language. The bindings
|
81
|
+
are generated from API documentation using <a
|
82
|
+
href="https://github.com/Pajk/apipie-rails">Apidoc</a> tool.</p>
|
83
|
+
|
84
|
+
<p>The bindings brings support for new versioned API which is not complete
|
84
85
|
yet. The number of supported controllers is limited but more are coming
|
85
|
-
soon
|
86
|
-
|
86
|
+
soon.</p>
|
87
|
+
|
87
88
|
<h3>Regenerating bindings</h3>
|
88
|
-
|
89
|
-
The code for generating the bindings is a part of this repo. The generator
|
90
|
-
needs a running
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<
|
102
|
-
|
103
|
-
|
89
|
+
|
90
|
+
<p>The code for generating the bindings is a part of this repo. The generator
|
91
|
+
needs a running Foreman instance with Katello as and engine to load the
|
92
|
+
`apidoc.json`.</p>
|
93
|
+
|
94
|
+
<p>In case the `/apidoc` reports some issues with loading modules, you can
|
95
|
+
temporarily commenting out the following line in Foreman's
|
96
|
+
`config/initializers/wrap_parameters.rb` file:</p>
|
97
|
+
|
98
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_wrap_parameters'>wrap_parameters</span> <span class='symbol'>:format</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='symbol'>:json</span><span class='rbracket'>]</span></code></pre>
|
99
|
+
|
100
|
+
<p>Usage:</p>
|
101
|
+
|
102
|
+
<pre class="code ruby"><code class="ruby">$ bin/generate.rb --help
|
103
|
+
Generate Ruby API bindings for Katello's API from Apipie docs.
|
104
|
+
|
105
|
+
USAGE: bin/generate.rb [FLAGS]
|
106
|
+
-u, --url APIDOC_URL By default http://localhost:3000/apidoc
|
107
|
+
--api-version VERSION version of the API to hit (default: v2)</code></pre>
|
108
|
+
|
109
|
+
<p>Only files under <tt>lib/katello_api/resources</tt> are touched by the
|
110
|
+
generator.</p>
|
111
|
+
|
104
112
|
<h3>Authentication</h3>
|
105
|
-
|
106
|
-
Katello API supports authentication with username/password
|
107
|
-
use of OAuth with the bindings you only have to change the params
|
108
|
-
|
109
|
-
<pre class="code ruby"><code class="ruby">
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
</code></pre>
|
113
|
+
|
114
|
+
<p>Katello API supports authentication with username/password or OAuth. For
|
115
|
+
use of OAuth with the bindings you only have to change the params</p>
|
116
|
+
|
117
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_envs'>envs</span> <span class='op'>=</span> <span class='const'>KatelloApi</span><span class='op'>::</span><span class='const'>Resources</span><span class='op'>::</span><span class='const'>Environment</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:base_url</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https://localhost:3000/katello</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
118
|
+
<span class='symbol'>:oauth</span> <span class='op'>=></span> <span class='lbrace'>{</span> <span class='symbol'>:consumer_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mykey</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
119
|
+
<span class='symbol'>:consumer_secret</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>shhhh</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span></code></pre>
|
120
|
+
|
114
121
|
<h2>License</h2>
|
115
|
-
|
116
|
-
The bindings are released under MIT license
|
117
|
-
</p>
|
122
|
+
|
123
|
+
<p>The bindings are released under MIT license</p>
|
118
124
|
</div></div>
|
119
125
|
|
120
126
|
<div id="footer">
|
121
|
-
Generated on
|
127
|
+
Generated on Wed Jan 15 20:45:13 2014 by
|
122
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
|
-
0.8.
|
129
|
+
0.8.7.3 (ruby-1.9.3).
|
124
130
|
</div>
|
125
131
|
|
126
132
|
</body>
|
data/doc/file_list.html
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
16
|
|
17
17
|
|
18
|
+
<title>File List</title>
|
18
19
|
<base id="base_target" target="_parent" />
|
19
20
|
</head>
|
20
21
|
<body>
|
@@ -46,7 +47,7 @@
|
|
46
47
|
<ul id="full_list" class="file">
|
47
48
|
|
48
49
|
|
49
|
-
<li class="r1"><a href="index.html" title="README">README</a></li>
|
50
|
+
<li class="r1"><span class="object_link"><a href="index.html" title="README">README</a></a></li>
|
50
51
|
|
51
52
|
|
52
53
|
</ul>
|
data/doc/frames.html
CHANGED
@@ -4,18 +4,16 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
5
|
<head>
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
7
|
-
<title>Documentation by YARD 0.8.
|
7
|
+
<title>Documentation by YARD 0.8.7.3</title>
|
8
8
|
</head>
|
9
9
|
<script type="text/javascript" charset="utf-8">
|
10
10
|
window.onload = function() {
|
11
|
-
var match = window.location.hash.match(/^#!(.+)/);
|
12
|
-
var name = 'index.html';
|
13
|
-
|
14
|
-
name = unescape(match[1]);
|
15
|
-
}
|
11
|
+
var match = unescape(window.location.hash).match(/^#!(.+)/);
|
12
|
+
var name = match ? match[1] : 'index.html';
|
13
|
+
name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
|
16
14
|
document.writeln('<frameset cols="20%,*">' +
|
17
15
|
'<frame name="list" src="class_list.html" />' +
|
18
|
-
'<frame name="main" src="' + name + '" />' +
|
16
|
+
'<frame name="main" src="' + escape(name) + '" />' +
|
19
17
|
'</frameset>');
|
20
18
|
}
|
21
19
|
</script>
|
data/doc/index.html
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.7.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
@@ -61,66 +61,72 @@
|
|
61
61
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
|
-
<div id="content"><div id='filecontents'
|
64
|
+
<div id="content"><div id='filecontents'>
|
65
|
+
<h1>Katello API bindings for Ruby</h1>
|
66
|
+
|
65
67
|
<h2>Summary</h2>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
68
|
+
|
69
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>katello_api</span><span class='tstring_end'>'</span></span>
|
70
|
+
<span class='id identifier rubyid_envs'>envs</span> <span class='op'>=</span> <span class='const'>KatelloApi</span><span class='op'>::</span><span class='const'>Resources</span><span class='op'>::</span><span class='const'>Environment</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:base_url</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https://localhost/katello</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
71
|
+
<span class='symbol'>:username</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>admin</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
72
|
+
<span class='symbol'>:password</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>admin</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
73
|
+
|
74
|
+
<span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_raw_response'>raw_response</span> <span class='op'>=</span> <span class='id identifier rubyid_envs'>envs</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span><span class='symbol'>:organization_id</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ACME_Corporation</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
75
|
+
<span class='id identifier rubyid_pp'>pp</span> <span class='id identifier rubyid_data'>data</span> <span class='comment'># parsed data of the response
|
76
|
+
</span><span class='id identifier rubyid_pp'>pp</span> <span class='id identifier rubyid_raw_response'>raw_response</span> <span class='comment'># raw string of the response body</span></code></pre>
|
77
|
+
|
76
78
|
<h2>Description</h2>
|
77
|
-
|
78
|
-
This gem contains Katello API bindings for the Ruby language. The bindings
|
79
|
-
are generated from API documentation using
|
80
|
-
|
81
|
-
|
82
|
-
<p>
|
83
|
-
The bindings brings support for new versioned API which is not complete
|
79
|
+
|
80
|
+
<p>This gem contains Katello API bindings for the Ruby language. The bindings
|
81
|
+
are generated from API documentation using <a
|
82
|
+
href="https://github.com/Pajk/apipie-rails">Apidoc</a> tool.</p>
|
83
|
+
|
84
|
+
<p>The bindings brings support for new versioned API which is not complete
|
84
85
|
yet. The number of supported controllers is limited but more are coming
|
85
|
-
soon
|
86
|
-
|
86
|
+
soon.</p>
|
87
|
+
|
87
88
|
<h3>Regenerating bindings</h3>
|
88
|
-
|
89
|
-
The code for generating the bindings is a part of this repo. The generator
|
90
|
-
needs a running
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<
|
102
|
-
|
103
|
-
|
89
|
+
|
90
|
+
<p>The code for generating the bindings is a part of this repo. The generator
|
91
|
+
needs a running Foreman instance with Katello as and engine to load the
|
92
|
+
`apidoc.json`.</p>
|
93
|
+
|
94
|
+
<p>In case the `/apidoc` reports some issues with loading modules, you can
|
95
|
+
temporarily commenting out the following line in Foreman's
|
96
|
+
`config/initializers/wrap_parameters.rb` file:</p>
|
97
|
+
|
98
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_wrap_parameters'>wrap_parameters</span> <span class='symbol'>:format</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='symbol'>:json</span><span class='rbracket'>]</span></code></pre>
|
99
|
+
|
100
|
+
<p>Usage:</p>
|
101
|
+
|
102
|
+
<pre class="code ruby"><code class="ruby">$ bin/generate.rb --help
|
103
|
+
Generate Ruby API bindings for Katello's API from Apipie docs.
|
104
|
+
|
105
|
+
USAGE: bin/generate.rb [FLAGS]
|
106
|
+
-u, --url APIDOC_URL By default http://localhost:3000/apidoc
|
107
|
+
--api-version VERSION version of the API to hit (default: v2)</code></pre>
|
108
|
+
|
109
|
+
<p>Only files under <tt>lib/katello_api/resources</tt> are touched by the
|
110
|
+
generator.</p>
|
111
|
+
|
104
112
|
<h3>Authentication</h3>
|
105
|
-
|
106
|
-
Katello API supports authentication with username/password
|
107
|
-
use of OAuth with the bindings you only have to change the params
|
108
|
-
|
109
|
-
<pre class="code ruby"><code class="ruby">
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
</code></pre>
|
113
|
+
|
114
|
+
<p>Katello API supports authentication with username/password or OAuth. For
|
115
|
+
use of OAuth with the bindings you only have to change the params</p>
|
116
|
+
|
117
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_envs'>envs</span> <span class='op'>=</span> <span class='const'>KatelloApi</span><span class='op'>::</span><span class='const'>Resources</span><span class='op'>::</span><span class='const'>Environment</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:base_url</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https://localhost:3000/katello</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
118
|
+
<span class='symbol'>:oauth</span> <span class='op'>=></span> <span class='lbrace'>{</span> <span class='symbol'>:consumer_key</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mykey</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
119
|
+
<span class='symbol'>:consumer_secret</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>shhhh</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span></code></pre>
|
120
|
+
|
114
121
|
<h2>License</h2>
|
115
|
-
|
116
|
-
The bindings are released under MIT license
|
117
|
-
</p>
|
122
|
+
|
123
|
+
<p>The bindings are released under MIT license</p>
|
118
124
|
</div></div>
|
119
125
|
|
120
126
|
<div id="footer">
|
121
|
-
Generated on
|
127
|
+
Generated on Wed Jan 15 20:45:13 2014 by
|
122
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
|
-
0.8.
|
129
|
+
0.8.7.3 (ruby-1.9.3).
|
124
130
|
</div>
|
125
131
|
|
126
132
|
</body>
|
data/doc/js/app.js
CHANGED
@@ -78,7 +78,12 @@ function framesInit() {
|
|
78
78
|
if (hasFrames) {
|
79
79
|
document.body.className = 'frames';
|
80
80
|
$('#menu .noframes a').attr('href', document.location);
|
81
|
-
|
81
|
+
try {
|
82
|
+
window.top.document.title = $('html head title').text();
|
83
|
+
} catch(error) {
|
84
|
+
// some browsers will not allow this when serving from file://
|
85
|
+
// but we don't want to stop the world.
|
86
|
+
}
|
82
87
|
}
|
83
88
|
else {
|
84
89
|
$('#menu .noframes a').text('frames').attr('href', framesUrl);
|
@@ -211,4 +216,4 @@ $(linkSummaries);
|
|
211
216
|
$(keyboardShortcuts);
|
212
217
|
$(summaryToggle);
|
213
218
|
$(fixOutsideWorldLinks);
|
214
|
-
$(generateTOC);
|
219
|
+
$(generateTOC);
|
data/doc/js/full_list.js
CHANGED
@@ -17,6 +17,7 @@ function fullListSearch() {
|
|
17
17
|
searchCache = [];
|
18
18
|
$('#full_list li').each(function() {
|
19
19
|
var link = $(this).find('.object_link a');
|
20
|
+
if (link.length === 0) return;
|
20
21
|
var fullName = link.attr('title').split(' ')[0];
|
21
22
|
searchCache.push({name:link.text(), fullName:fullName, node:$(this), link:link});
|
22
23
|
});
|
@@ -41,7 +42,7 @@ function fullListSearch() {
|
|
41
42
|
$('#full_list li').removeClass('found').each(function() {
|
42
43
|
|
43
44
|
var link = $(this).find('.object_link a');
|
44
|
-
link.text(link.text());
|
45
|
+
if (link.length > 0) link.text(link.text());
|
45
46
|
});
|
46
47
|
if (clicked) {
|
47
48
|
clicked.parents('ul').each(function() {
|
@@ -111,6 +112,10 @@ function linkList() {
|
|
111
112
|
$('#full_list li, #full_list li a:last').click(function(evt) {
|
112
113
|
if ($(this).hasClass('toggle')) return true;
|
113
114
|
if (this.tagName.toLowerCase() == "li") {
|
115
|
+
if ($(this).find('.object_link a').length === 0) {
|
116
|
+
$(this).children('a.toggle').click();
|
117
|
+
return false;
|
118
|
+
}
|
114
119
|
var toggle = $(this).children('a.toggle');
|
115
120
|
if (toggle.size() > 0 && evt.pageX < toggle.offset().left) {
|
116
121
|
toggle.click();
|
@@ -120,7 +125,7 @@ function linkList() {
|
|
120
125
|
if (clicked) clicked.removeClass('clicked');
|
121
126
|
var win = window.top.frames.main ? window.top.frames.main : window.parent;
|
122
127
|
if (this.tagName.toLowerCase() == "a") {
|
123
|
-
clicked = $(this).
|
128
|
+
clicked = $(this).parents('li').addClass('clicked');
|
124
129
|
win.location = this.href;
|
125
130
|
}
|
126
131
|
else {
|