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.
Files changed (115) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +3 -0
  3. data/Gemfile +1 -1
  4. data/README.rdoc +22 -13
  5. data/Rakefile +0 -1
  6. data/doc/KatelloApi/Base.html +102 -116
  7. data/doc/KatelloApi/Generator/Base.html +65 -80
  8. data/doc/KatelloApi/Generator.html +5 -5
  9. data/doc/KatelloApi/Resources/About.html +360 -0
  10. data/doc/KatelloApi/Resources/ActivationKey.html +190 -304
  11. data/doc/KatelloApi/Resources/Architecture.html +89 -129
  12. data/doc/KatelloApi/Resources/Changeset.html +156 -399
  13. data/doc/KatelloApi/Resources/ChangesetsContent.html +97 -2215
  14. data/doc/KatelloApi/Resources/ComputeResource.html +131 -189
  15. data/doc/KatelloApi/Resources/ConfigTemplate.html +143 -208
  16. data/doc/KatelloApi/Resources/ContentUpload.html +1046 -0
  17. data/doc/KatelloApi/Resources/ContentView.html +229 -117
  18. data/doc/KatelloApi/Resources/ContentViewDefinition.html +1190 -323
  19. data/doc/KatelloApi/Resources/Crl.html +21 -28
  20. data/doc/KatelloApi/Resources/CustomInfo.html +1110 -0
  21. data/doc/KatelloApi/Resources/Distribution.html +40 -56
  22. data/doc/KatelloApi/Resources/Distributor.html +406 -469
  23. data/doc/KatelloApi/Resources/Domain.html +107 -155
  24. data/doc/KatelloApi/Resources/Environment.html +211 -539
  25. data/doc/KatelloApi/Resources/Erratum.html +56 -90
  26. data/doc/KatelloApi/Resources/Filter.html +1533 -0
  27. data/doc/KatelloApi/Resources/FilterRule.html +591 -0
  28. data/doc/KatelloApi/Resources/GpgKey.html +230 -196
  29. data/doc/KatelloApi/Resources/HardwareModel.html +101 -147
  30. data/doc/KatelloApi/Resources/Organization.html +647 -158
  31. data/doc/KatelloApi/Resources/OrganizationDefaultInfo.html +803 -0
  32. data/doc/KatelloApi/Resources/Package.html +57 -81
  33. data/doc/KatelloApi/Resources/Permission.html +109 -197
  34. data/doc/KatelloApi/Resources/Ping.html +37 -179
  35. data/doc/KatelloApi/Resources/Product.html +289 -462
  36. data/doc/KatelloApi/Resources/Provider.html +397 -424
  37. data/doc/KatelloApi/Resources/PuppetModule.html +704 -0
  38. data/doc/KatelloApi/Resources/Repository.html +302 -958
  39. data/doc/KatelloApi/Resources/RepositorySet.html +64 -104
  40. data/doc/KatelloApi/Resources/Role.html +131 -250
  41. data/doc/KatelloApi/Resources/RoleLdapGroup.html +74 -95
  42. data/doc/KatelloApi/Resources/SmartProxy.html +97 -143
  43. data/doc/KatelloApi/Resources/Statu.html +21 -28
  44. data/doc/KatelloApi/Resources/Status.html +360 -0
  45. data/doc/KatelloApi/Resources/Subnet.html +89 -129
  46. data/doc/KatelloApi/Resources/Subscription.html +486 -162
  47. data/doc/KatelloApi/Resources/Sync.html +85 -155
  48. data/doc/KatelloApi/Resources/SyncPlan.html +127 -220
  49. data/doc/KatelloApi/Resources/System.html +913 -925
  50. data/doc/KatelloApi/Resources/SystemErratum.html +557 -0
  51. data/doc/KatelloApi/Resources/SystemGroup.html +634 -408
  52. data/doc/KatelloApi/Resources/SystemGroupErratum.html +47 -66
  53. data/doc/KatelloApi/Resources/SystemGroupPackage.html +77 -108
  54. data/doc/KatelloApi/Resources/SystemPackage.html +734 -108
  55. data/doc/KatelloApi/Resources/SystemsBulkAction.html +1706 -0
  56. data/doc/KatelloApi/Resources/Task.html +38 -53
  57. data/doc/KatelloApi/Resources/Template.html +159 -233
  58. data/doc/KatelloApi/Resources/TemplatesContent.html +214 -312
  59. data/doc/KatelloApi/Resources/Uebercert.html +25 -34
  60. data/doc/KatelloApi/Resources/User.html +204 -433
  61. data/doc/KatelloApi/Resources.html +7 -7
  62. data/doc/KatelloApi.html +21 -26
  63. data/doc/_index.html +87 -9
  64. data/doc/class_list.html +3 -2
  65. data/doc/css/style.css +1 -1
  66. data/doc/file.README.html +60 -54
  67. data/doc/file_list.html +2 -1
  68. data/doc/frames.html +5 -7
  69. data/doc/index.html +60 -54
  70. data/doc/js/app.js +7 -2
  71. data/doc/js/full_list.js +7 -2
  72. data/doc/method_list.html +854 -1225
  73. data/doc/top-level-namespace.html +5 -5
  74. data/katello_api.gemspec +7 -5
  75. data/lib/katello_api/base.rb +9 -8
  76. data/lib/katello_api/documentation.json +1 -1
  77. data/lib/katello_api/resources/about.rb +18 -0
  78. data/lib/katello_api/resources/activation_key.rb +11 -13
  79. data/lib/katello_api/resources/changeset.rb +4 -15
  80. data/lib/katello_api/resources/changesets_content.rb +6 -130
  81. data/lib/katello_api/resources/content_upload.rb +61 -0
  82. data/lib/katello_api/resources/content_view.rb +10 -1
  83. data/lib/katello_api/resources/content_view_definition.rb +65 -3
  84. data/lib/katello_api/resources/custom_info.rb +70 -0
  85. data/lib/katello_api/resources/distributor.rb +33 -18
  86. data/lib/katello_api/resources/environment.rb +20 -41
  87. data/lib/katello_api/resources/erratum.rb +3 -4
  88. data/lib/katello_api/resources/filter.rb +93 -0
  89. data/lib/katello_api/resources/filter_rule.rb +36 -0
  90. data/lib/katello_api/resources/gpg_key.rb +18 -14
  91. data/lib/katello_api/resources/organization.rb +43 -8
  92. data/lib/katello_api/resources/organization_default_info.rb +48 -0
  93. data/lib/katello_api/resources/permission.rb +10 -7
  94. data/lib/katello_api/resources/ping.rb +1 -9
  95. data/lib/katello_api/resources/product.rb +26 -30
  96. data/lib/katello_api/resources/provider.rb +21 -20
  97. data/lib/katello_api/resources/puppet_module.rb +39 -0
  98. data/lib/katello_api/resources/repository.rb +28 -62
  99. data/lib/katello_api/resources/repository_set.rb +1 -2
  100. data/lib/katello_api/resources/role.rb +0 -5
  101. data/lib/katello_api/resources/role_ldap_group.rb +3 -1
  102. data/lib/katello_api/resources/status.rb +18 -0
  103. data/lib/katello_api/resources/subscription.rb +33 -7
  104. data/lib/katello_api/resources/sync.rb +9 -12
  105. data/lib/katello_api/resources/sync_plan.rb +2 -5
  106. data/lib/katello_api/resources/system.rb +95 -73
  107. data/lib/katello_api/resources/system_erratum.rb +30 -0
  108. data/lib/katello_api/resources/system_group.rb +40 -27
  109. data/lib/katello_api/resources/system_group_erratum.rb +1 -1
  110. data/lib/katello_api/resources/system_group_package.rb +6 -6
  111. data/lib/katello_api/resources/system_package.rb +46 -5
  112. data/lib/katello_api/resources/systems_bulk_action.rb +140 -0
  113. data/lib/katello_api/resources/user.rb +14 -18
  114. data/lib/katello_api/version.rb +1 -1
  115. 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=utf-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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'><h1>Katello API bindings for Ruby</h1>
64
+ <div id="content"><div id='filecontents'>
65
+ <h1>Katello API bindings for Ruby</h1>
66
+
65
67
  <h2>Summary</h2>
66
- <pre class="code ruby"><code class="ruby">
67
- <span class='rubyid_require identifier id'>require</span> <span class='string val'>'katello_api'</span>
68
- <span class='rubyid_environments identifier id'>environments</span> <span class='assign token'>=</span> <span class='rubyid_KatelloApi constant id'>KatelloApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Environment constant id'>Environment</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
69
- <span class='symbol val'>:username</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'admin'</span><span class='comma token'>,</span>
70
- <span class='symbol val'>:password</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'changeme'</span><span class='rparen token'>)</span>
71
-
72
- <span class='rubyid_data identifier id'>data</span><span class='comma token'>,</span> <span class='rubyid_raw_response identifier id'>raw_response</span> <span class='rubyid_architectures identifier id'>architectures</span><span class='dot token'>.</span><span class='rubyid_index identifier id'>index</span><span class='lparen token'>(</span><span class='symbol val'>:organization_id</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;ACME_Corporation&quot;</span><span class='rparen token'>)</span>
73
- <span class='rubyid_pp identifier id'>pp</span> <span class='rubyid_data identifier id'>data</span> <span class='comment val'># parsed data of the response</span>
74
- <span class='rubyid_pp identifier id'>pp</span> <span class='rubyid_raw_response identifier id'>raw_response</span> <span class='comment val'># raw string of the response body</span>
75
- </code></pre>
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'>=&gt;</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'>=&gt;</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'>=&gt;</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'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ACME_Corporation</span><span class='tstring_end'>&quot;</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
- <p>
78
- This gem contains Katello API bindings for the Ruby language. The bindings
79
- are generated from API documentation using
80
- Apidoc[https://github.com/Pajk/apipie-rails] tool.
81
- </p>
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
- </p>
86
+ soon.</p>
87
+
87
88
  <h3>Regenerating bindings</h3>
88
- <p>
89
- The code for generating the bindings is a part of this repo. The generator
90
- needs a running Katello instance to load the apidoc.json.
91
- </p>
92
- <p>
93
- Usage:
94
- </p>
95
- <pre class="code ruby"><code class="ruby">
96
- <span class='rubyid_bin identifier id'>bin</span><span class='div op'>/</span><span class='rubyid_generate identifier id'>generate</span><span class='dot token'>.</span><span class='rubyid_rb identifier id'>rb</span> <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span>
97
- <span class='rubyid_Script constant id'>Script</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_generating identifier id'>generating</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_bindings identifier id'>bindings</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_Katello constant id'>Katello</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_from identifier id'>from</span> <span class='rubyid_Apipie constant id'>Apipie</span> <span class='rubyid_docs identifier id'>docs</span><span class='dot token'>.</span>
98
- <span class='minus op'>-</span><span class='rubyid_u identifier id'>u</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_url identifier id'>url</span> <span class='rubyid_KATELLO_APIDOC_URL constant id'>KATELLO_APIDOC_URL</span> <span class='rubyid_By constant id'>By</span> <span class='rubyid_default identifier id'>default</span> <span class='rubyid_http identifier id'>http</span><span class='symbol val'>:/</span><span class='regexp val'>/localhost:3000/</span><span class='rubyid_apidoc identifier id'>apidoc</span>
99
- <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_help identifier id'>help</span>
100
- </code></pre>
101
- <p>
102
- Only files under <tt>lib/katello_api/resources</tt> are touched by the generator.
103
- </p>
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'>=&gt;</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
- <p>
106
- Katello API supports authentication with username/password and OAuth. For
107
- use of OAuth with the bindings you only have to change the params
108
- </p>
109
- <pre class="code ruby"><code class="ruby">
110
- <span class='rubyid_environments identifier id'>environments</span> <span class='assign token'>=</span> <span class='rubyid_KatelloApi constant id'>KatelloApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Environment constant id'>Environment</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
111
- <span class='symbol val'>:oauth</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrace token'>{</span> <span class='symbol val'>:consumer_key</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'mykey'</span><span class='comma token'>,</span>
112
- <span class='symbol val'>:consumer_secret</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'shhhh'</span> <span class='rbrace token'>}</span><span class='rparen token'>)</span>
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'>=&gt;</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'>=&gt;</span> <span class='lbrace'>{</span> <span class='symbol'>:consumer_key</span> <span class='op'>=&gt;</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'>=&gt;</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
- <p>
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 Mon Mar 18 14:17:40 2013 by
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.5.2 (ruby-1.8.7).
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.5.2</title>
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
- if (match) {
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=utf-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; 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" media="screen" charset="utf-8" />
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" media="screen" charset="utf-8" />
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'><h1>Katello API bindings for Ruby</h1>
64
+ <div id="content"><div id='filecontents'>
65
+ <h1>Katello API bindings for Ruby</h1>
66
+
65
67
  <h2>Summary</h2>
66
- <pre class="code ruby"><code class="ruby">
67
- <span class='rubyid_require identifier id'>require</span> <span class='string val'>'katello_api'</span>
68
- <span class='rubyid_environments identifier id'>environments</span> <span class='assign token'>=</span> <span class='rubyid_KatelloApi constant id'>KatelloApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Environment constant id'>Environment</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
69
- <span class='symbol val'>:username</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'admin'</span><span class='comma token'>,</span>
70
- <span class='symbol val'>:password</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'changeme'</span><span class='rparen token'>)</span>
71
-
72
- <span class='rubyid_data identifier id'>data</span><span class='comma token'>,</span> <span class='rubyid_raw_response identifier id'>raw_response</span> <span class='rubyid_architectures identifier id'>architectures</span><span class='dot token'>.</span><span class='rubyid_index identifier id'>index</span><span class='lparen token'>(</span><span class='symbol val'>:organization_id</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;ACME_Corporation&quot;</span><span class='rparen token'>)</span>
73
- <span class='rubyid_pp identifier id'>pp</span> <span class='rubyid_data identifier id'>data</span> <span class='comment val'># parsed data of the response</span>
74
- <span class='rubyid_pp identifier id'>pp</span> <span class='rubyid_raw_response identifier id'>raw_response</span> <span class='comment val'># raw string of the response body</span>
75
- </code></pre>
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'>=&gt;</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'>=&gt;</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'>=&gt;</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'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ACME_Corporation</span><span class='tstring_end'>&quot;</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
- <p>
78
- This gem contains Katello API bindings for the Ruby language. The bindings
79
- are generated from API documentation using
80
- Apidoc[https://github.com/Pajk/apipie-rails] tool.
81
- </p>
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
- </p>
86
+ soon.</p>
87
+
87
88
  <h3>Regenerating bindings</h3>
88
- <p>
89
- The code for generating the bindings is a part of this repo. The generator
90
- needs a running Katello instance to load the apidoc.json.
91
- </p>
92
- <p>
93
- Usage:
94
- </p>
95
- <pre class="code ruby"><code class="ruby">
96
- <span class='rubyid_bin identifier id'>bin</span><span class='div op'>/</span><span class='rubyid_generate identifier id'>generate</span><span class='dot token'>.</span><span class='rubyid_rb identifier id'>rb</span> <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span>
97
- <span class='rubyid_Script constant id'>Script</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_generating identifier id'>generating</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_bindings identifier id'>bindings</span> <span class='rubyid_for for kw'>for</span> <span class='rubyid_Katello constant id'>Katello</span> <span class='rubyid_API constant id'>API</span> <span class='rubyid_from identifier id'>from</span> <span class='rubyid_Apipie constant id'>Apipie</span> <span class='rubyid_docs identifier id'>docs</span><span class='dot token'>.</span>
98
- <span class='minus op'>-</span><span class='rubyid_u identifier id'>u</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_url identifier id'>url</span> <span class='rubyid_KATELLO_APIDOC_URL constant id'>KATELLO_APIDOC_URL</span> <span class='rubyid_By constant id'>By</span> <span class='rubyid_default identifier id'>default</span> <span class='rubyid_http identifier id'>http</span><span class='symbol val'>:/</span><span class='regexp val'>/localhost:3000/</span><span class='rubyid_apidoc identifier id'>apidoc</span>
99
- <span class='minus op'>-</span><span class='rubyid_h identifier id'>h</span><span class='comma token'>,</span> <span class='minus op'>-</span><span class='minus op'>-</span><span class='rubyid_help identifier id'>help</span>
100
- </code></pre>
101
- <p>
102
- Only files under <tt>lib/katello_api/resources</tt> are touched by the generator.
103
- </p>
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'>=&gt;</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
- <p>
106
- Katello API supports authentication with username/password and OAuth. For
107
- use of OAuth with the bindings you only have to change the params
108
- </p>
109
- <pre class="code ruby"><code class="ruby">
110
- <span class='rubyid_environments identifier id'>environments</span> <span class='assign token'>=</span> <span class='rubyid_KatelloApi constant id'>KatelloApi</span><span class='colon2 op'>::</span><span class='rubyid_Resources constant id'>Resources</span><span class='colon2 op'>::</span><span class='rubyid_Environment constant id'>Environment</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:base_url</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'http://localhost:3000'</span><span class='comma token'>,</span>
111
- <span class='symbol val'>:oauth</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrace token'>{</span> <span class='symbol val'>:consumer_key</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'mykey'</span><span class='comma token'>,</span>
112
- <span class='symbol val'>:consumer_secret</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'shhhh'</span> <span class='rbrace token'>}</span><span class='rparen token'>)</span>
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'>=&gt;</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'>=&gt;</span> <span class='lbrace'>{</span> <span class='symbol'>:consumer_key</span> <span class='op'>=&gt;</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'>=&gt;</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
- <p>
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 Mon Mar 18 14:17:40 2013 by
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.5.2 (ruby-1.8.7).
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
- window.top.document.title = $('html head title').text();
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).parent('li').addClass('clicked');
128
+ clicked = $(this).parents('li').addClass('clicked');
124
129
  win.location = this.href;
125
130
  }
126
131
  else {