Skip to content

Commit 384010c

Browse files
slcli updates, ordering examples and ticket examples
1 parent 80cea80 commit 384010c

47 files changed

Lines changed: 5812 additions & 1490 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

classes/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@
196196

197197

198198

199+
200+
199201

200202

201203

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta name="description" content="SoftLayer API Examples, implementations, and release notes.">
9+
<meta name="author" content="SoftLayer">
10+
11+
<title>Softlayer_product_item - https://softlayer.github.io/</title>
12+
<link rel="canonical" href="https://softlayer.github.io/classes/softlayer_product_item/">
13+
14+
<link href="https://softlayer.github.io/css/bootstrap.css" rel="stylesheet">
15+
<link href="https://softlayer.github.io/css/font-awesome.css" rel="stylesheet">
16+
<link href="https://softlayer.github.io/css/custom.css" rel="stylesheet">
17+
<link href="https://softlayer.github.io/css/highlight/solarized_dark.css" rel="stylesheet">
18+
<script src="https://softlayer.github.io/js/highlight.pack.js"></script>
19+
<script src="https://softlayer.github.io/js/jquery.js"></script>
20+
<script>hljs.initHighlightingOnLoad();</script>
21+
<link rel="shortcut icon" href="https://softlayer.github.io/img/favicon.ico" type="image/x-icon" />
22+
<link rel="stylesheet" type="text/css"
23+
href="//fonts.googleapis.com/css?family=Lato" />
24+
25+
<link href="https://softlayer.github.io/classes/softlayer_product_item/index.xml" rel="alternate" type="application/rss+xml" title="SoftLayer API Examples" />
26+
<script>
27+
$(document).ready(function() {
28+
$('table').addClass("table table-hover table-striped")
29+
})
30+
</script>
31+
32+
<script>
33+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
34+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
35+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
36+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
37+
38+
ga('create', 'UA-88235803-1', 'auto');
39+
ga('send', 'pageview');
40+
</script>
41+
42+
</head>
43+
44+
<body>
45+
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
46+
<div class="container">
47+
<div class="navbar-header">
48+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
49+
<span class="sr-only">Toggle Navigation</span>
50+
<span class="icon-bar"></span>
51+
<span class="icon-bar"></span>
52+
<span class="icon-bar"></span>
53+
</button>
54+
<a class="navbar-brand" href="https://softlayer.github.io/">SoftLayer API Examples</a>
55+
</div>
56+
<div class="collapse navbar-collapse navbar-ex1-collapse">
57+
<ul class="nav navbar-nav">
58+
59+
<li><a href="https://softlayer.github.io/go/">go</a></li>
60+
61+
<li><a href="https://softlayer.github.io/perl/">perl</a></li>
62+
63+
<li><a href="https://softlayer.github.io/php/">php</a></li>
64+
65+
<li><a href="https://softlayer.github.io/python/">python</a></li>
66+
67+
<li><a href="https://softlayer.github.io/rest/">rest</a></li>
68+
69+
<li><a href="https://softlayer.github.io/ruby/">ruby</a></li>
70+
71+
<li><a href="https://softlayer.github.io/tools/">tools</a></li>
72+
73+
74+
75+
</ul>
76+
<div id="custom-search-input" class="pull-right">
77+
<form class="navbar-form" role="search" method="get" action="https://www.bing.com/">
78+
<div class="input-group col-md-12">
79+
<input type="text" class="form-control input-md" placeholder="Search" name="q" id="srch-term">
80+
<input type="hidden" name="q1" value="site:softlayer.github.io" />
81+
<div class="input-group-btn">
82+
<button class="btn btn-info" type="submit">
83+
<i class="glyphicon glyphicon-search"></i>
84+
</button>
85+
</div>
86+
</div>
87+
</form>
88+
</div>
89+
</div>
90+
</div>
91+
</nav>
92+
93+
<div class="container">
94+
<div class="row">
95+
<div class="col-md-9">
96+
<div class="well well-sm">
97+
<strong>Items with tag <code>softlayer_product_item</code></strong>
98+
<ul class="list-unstyled">
99+
100+
<h3>python</h3>
101+
<ul>
102+
103+
<li>
104+
<a href="https://softlayer.github.io/python/ordering_slcli/">Ordering with KeyNames</a>
105+
<div class="meta">Examples on how to order anything in the catalog with the proper package and item names.</div>
106+
</li>
107+
108+
</ul>
109+
110+
</ul>
111+
</div>
112+
</div>
113+
114+
115+
<div class="col-md-3">
116+
117+
<div class="panel panel-default">
118+
<div class="panel-heading" style="padding: 2px 15px;">
119+
<h4>More Documentation</h4>
120+
</div>
121+
<div class="panel-body">
122+
<a href="http://sldn.softlayer.com/reference/softlayerapi"><i class="fa fa-link"></i> SoftLayer API Reference<br></a>
123+
<a href="https://github.com/softlayer/softlayer-java"><i class="fa fa-github"></i> softlayer-java<br></a>
124+
<a href="https://github.com/softlayer/softlayer-api-perl-client"><i class="fa fa-github"></i> softlayer-perl<br></a>
125+
<a href="https://github.com/softlayer/softlayer-api-php-client"><i class="fa fa-github"></i> softlayer-php<br></a>
126+
<a href="https://github.com/softlayer/softlayer-python"><i class="fa fa-github"></i> softlayer-python<br></a>
127+
<a href="https://github.com/softlayer/softlayer-ruby"><i class="fa fa-github"></i> softlayer-ruby<br></a>
128+
</div>
129+
</div>
130+
131+
<div class="panel panel-default">
132+
<div class="panel-heading text-center" style="padding: 2px 15px;">
133+
<a href="https://www.facebook.com/IBMBluemixIaaS/"><i class="fa fa-facebook-square" alt="facebook"></i> </a>
134+
<a href="https://twitter.com/IBMBluemixIaaS"><i class="fa fa-twitter" alt="twitter"></i> </a>
135+
<a href="http://www.linkedin.com/company/softlayer-technologies-inc-" alt="linked-in"><i class="fa fa-linkedin-square"></i> </a>
136+
<a href="https://github.com/softlayer"><i class="fa fa-github" alt="github"></i> </a>
137+
<a href="irc://irc.freenode.net/softlayer"><i class="fa fa-comment" alt="irc"></i> </a>
138+
</div>
139+
</div>
140+
141+
</div>
142+
</div>
143+
<footer>
144+
<div class="row">
145+
<hr>
146+
<div class="col-sm-12">
147+
<p>&copy; SoftLayer 2015<br>
148+
Built with <a href="https://github.com/spf13/hugo">Hugo</a></p>
149+
</div>
150+
</div>
151+
</footer>
152+
</div>
153+
154+
<script src="https://softlayer.github.io/js/jquery.js"></script>
155+
<script src="https://softlayer.github.io/js/bootstrap.js"></script>
156+
</body>
157+
</html>
Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3+
<channel>
4+
<title>Softlayer_product_item on SoftLayer API Examples </title>
5+
<link>https://softlayer.github.io/classes/softlayer_product_item/</link>
6+
<language>en-US</language>
7+
<author>Enthusiastic Hugo User</author>
8+
<rights>Copyright (c) 2014, Enthusiastic Hugo User; all rights reserved.</rights>
9+
<updated>Mon, 15 Jan 2018 00:00:00 UTC</updated>
10+
11+
<item>
12+
<title>Ordering with KeyNames</title>
13+
<link>https://softlayer.github.io/python/ordering_slcli/</link>
14+
<pubDate>Mon, 15 Jan 2018 00:00:00 UTC</pubDate>
15+
<author>Enthusiastic Hugo User</author>
16+
<guid>https://softlayer.github.io/python/ordering_slcli/</guid>
17+
<description>
18+
19+
&lt;p&gt;Version &lt;a href=&#34;https://github.com/softlayer/softlayer-python/releases/tag/v5.4.0&#34;&gt;5.4.0&lt;/a&gt; of the Softlayer-python project introducted some managers and CLI functions that greatly simplify the ordering processes via the api.&lt;/p&gt;
20+
21+
&lt;p&gt;Building a package still requires a few steps however.&lt;/p&gt;
22+
23+
&lt;h3 id=&#34;1-find-the-package-name&#34;&gt;1. Find the package name&lt;/h3&gt;
24+
25+
&lt;pre&gt;&lt;code&gt;slcli order package-list
26+
&lt;/code&gt;&lt;/pre&gt;
27+
28+
&lt;p&gt;The most common packages are the following:&lt;/p&gt;
29+
30+
&lt;table&gt;
31+
&lt;thead&gt;
32+
&lt;tr&gt;
33+
&lt;th&gt;Description&lt;/th&gt;
34+
&lt;th&gt;Package KeyName&lt;/th&gt;
35+
&lt;th&gt;Package Type&lt;/th&gt;
36+
&lt;/tr&gt;
37+
&lt;/thead&gt;
38+
39+
&lt;tbody&gt;
40+
&lt;tr&gt;
41+
&lt;td&gt;Additional Products&lt;/td&gt;
42+
&lt;td&gt;ADDITIONAL_PRODUCTS&lt;/td&gt;
43+
&lt;td&gt;ADDITIONAL_SERVICES&lt;/td&gt;
44+
&lt;/tr&gt;
45+
46+
&lt;tr&gt;
47+
&lt;td&gt;Cloud Server&lt;/td&gt;
48+
&lt;td&gt;CLOUD_SERVER&lt;/td&gt;
49+
&lt;td&gt;VIRTUAL_SERVER_INSTANCE&lt;/td&gt;
50+
&lt;/tr&gt;
51+
52+
&lt;tr&gt;
53+
&lt;td&gt;Network Gateway Appliance&lt;/td&gt;
54+
&lt;td&gt;NETWORK_GATEWAY_APPLIANCE&lt;/td&gt;
55+
&lt;td&gt;BARE_METAL_GATEWAY&lt;/td&gt;
56+
&lt;/tr&gt;
57+
58+
&lt;tr&gt;
59+
&lt;td&gt;Load Balancers&lt;/td&gt;
60+
&lt;td&gt;LOAD_BALANCERS&lt;/td&gt;
61+
&lt;td&gt;ADDITIONAL_SERVICES_LOAD_BALANCER&lt;/td&gt;
62+
&lt;/tr&gt;
63+
64+
&lt;tr&gt;
65+
&lt;td&gt;Bare Metal Server&lt;/td&gt;
66+
&lt;td&gt;BARE_METAL_SERVER&lt;/td&gt;
67+
&lt;td&gt;BARE_METAL_CPU_FAST_PROVISION&lt;/td&gt;
68+
&lt;/tr&gt;
69+
70+
&lt;tr&gt;
71+
&lt;td&gt;POWER8 TULETA&lt;/td&gt;
72+
&lt;td&gt;IBM_POWER_8&lt;/td&gt;
73+
&lt;td&gt;BARE_METAL_POWER_CPU&lt;/td&gt;
74+
&lt;/tr&gt;
75+
76+
&lt;tr&gt;
77+
&lt;td&gt;Object Storage&lt;/td&gt;
78+
&lt;td&gt;OBJECT_STORAGE&lt;/td&gt;
79+
&lt;td&gt;ADDITIONAL_SERVICES_OBJECT_STORAGE&lt;/td&gt;
80+
&lt;/tr&gt;
81+
82+
&lt;tr&gt;
83+
&lt;td&gt;Firewall&lt;/td&gt;
84+
&lt;td&gt;FIREWALL&lt;/td&gt;
85+
&lt;td&gt;ADDITIONAL_SERVICES_FIREWALL&lt;/td&gt;
86+
&lt;/tr&gt;
87+
88+
&lt;tr&gt;
89+
&lt;td&gt;Storage As A Service (StaaS)&lt;/td&gt;
90+
&lt;td&gt;STORAGE_AS_A_SERVICE_STAAS&lt;/td&gt;
91+
&lt;td&gt;STORAGE_AS_A_SERVICE&lt;/td&gt;
92+
&lt;/tr&gt;
93+
94+
&lt;tr&gt;
95+
&lt;td&gt;Load Balancer As A Service (LBaaS)&lt;/td&gt;
96+
&lt;td&gt;LBAAS&lt;/td&gt;
97+
&lt;td&gt;LOAD_BALANCER_AS_A_SERVICE&lt;/td&gt;
98+
&lt;/tr&gt;
99+
100+
&lt;tr&gt;
101+
&lt;td&gt;Dedicated Host&lt;/td&gt;
102+
&lt;td&gt;DEDICATED_HOST&lt;/td&gt;
103+
&lt;td&gt;DEDICATED_HOST&lt;/td&gt;
104+
&lt;/tr&gt;
105+
106+
&lt;tr&gt;
107+
&lt;td&gt;Public Virtual Server&lt;/td&gt;
108+
&lt;td&gt;PUBLIC_CLOUD_SERVER&lt;/td&gt;
109+
&lt;td&gt;VIRTUAL_SERVER_INSTANCE&lt;/td&gt;
110+
&lt;/tr&gt;
111+
&lt;/tbody&gt;
112+
&lt;/table&gt;
113+
114+
&lt;p&gt;Once we have selected a package we need to find out where we can order this package.&lt;/p&gt;
115+
116+
&lt;h3 id=&#34;2-package-locations&#34;&gt;2. Package locations&lt;/h3&gt;
117+
118+
&lt;pre&gt;&lt;code&gt;slcli order package-locations BARE_METAL_SERVER
119+
&lt;/code&gt;&lt;/pre&gt;
120+
121+
&lt;table&gt;
122+
&lt;thead&gt;
123+
&lt;tr&gt;
124+
&lt;th&gt;id&lt;/th&gt;
125+
&lt;th&gt;short name&lt;/th&gt;
126+
&lt;th&gt;description&lt;/th&gt;
127+
&lt;th&gt;keyName&lt;/th&gt;
128+
&lt;/tr&gt;
129+
&lt;/thead&gt;
130+
131+
&lt;tbody&gt;
132+
&lt;tr&gt;
133+
&lt;td&gt;265592&lt;/td&gt;
134+
&lt;td&gt;ams01&lt;/td&gt;
135+
&lt;td&gt;AMS01 - Amsterdam&lt;/td&gt;
136+
&lt;td&gt;AMSTERDAM&lt;/td&gt;
137+
&lt;/tr&gt;
138+
139+
&lt;tr&gt;
140+
&lt;td&gt;814994&lt;/td&gt;
141+
&lt;td&gt;ams03&lt;/td&gt;
142+
&lt;td&gt;AMS03 - Amsterdam&lt;/td&gt;
143+
&lt;td&gt;AMSTERDAM03&lt;/td&gt;
144+
&lt;/tr&gt;
145+
146+
&lt;tr&gt;
147+
&lt;td&gt;1004997&lt;/td&gt;
148+
&lt;td&gt;che01&lt;/td&gt;
149+
&lt;td&gt;CHE01 - Chennai&lt;/td&gt;
150+
&lt;td&gt;CHENNAI&lt;/td&gt;
151+
&lt;/tr&gt;
152+
&lt;/tbody&gt;
153+
&lt;/table&gt;
154+
155+
&lt;p&gt;Find the keyName for the location you want to order in. Packages may still be sold out in a location, so be on the lookout for that.&lt;/p&gt;
156+
157+
&lt;h3 id=&#34;3-items-and-categories&#34;&gt;3. Items and Categories&lt;/h3&gt;
158+
159+
&lt;p&gt;Every package has certain item categories that need to be included in an order. You can find these with&lt;/p&gt;
160+
161+
&lt;pre&gt;&lt;code&gt;slcli order category-list BARE_METAL_SERVER
162+
&lt;/code&gt;&lt;/pre&gt;
163+
164+
&lt;p&gt;Then find the actual items in the category.&lt;/p&gt;
165+
166+
&lt;pre&gt;&lt;code&gt;slcli order item-list BARE_METAL_SERVER
167+
&lt;/code&gt;&lt;/pre&gt;
168+
169+
&lt;p&gt;Create a list of items you want to order. If you want multiple disks (or GPU), you should have 1 item in your list per disk you want to add. Disks are attached in order that they appear on the order form.&lt;/p&gt;
170+
171+
&lt;h4 id=&#34;presets&#34;&gt;Presets&lt;/h4&gt;
172+
173+
&lt;p&gt;BARE_METAL_SERVER orders require a preset. These can be ordered hourly.&lt;/p&gt;
174+
175+
&lt;pre&gt;&lt;code&gt;slcli order preset-list BARE_METAL_SERVER
176+
&lt;/code&gt;&lt;/pre&gt;
177+
178+
&lt;h3 id=&#34;4-getting-ready-to-order&#34;&gt;4. Getting ready to order.&lt;/h3&gt;
179+
180+
&lt;p&gt;The last thing to note is the &amp;ndash;extras and &amp;ndash;complex-type options.&lt;/p&gt;
181+
182+
&lt;p&gt;&amp;ndash;Extras are going to match up to things like Vlans, subnets, ssh keys etc. Basically anything in the order container that ISN&amp;rsquo;T prices. Supported fields correstpond to the SoftLayer_Container_Product_Order data type. Needs to be valid JSON&lt;/p&gt;
183+
184+
&lt;pre&gt;&lt;code&gt;--extras &#39;{&amp;quot;hardware&amp;quot;: [{&amp;quot;hostname&amp;quot; : &amp;quot;testOrder1&amp;quot;, &amp;quot;domain&amp;quot;: &amp;quot;cgallo.com&amp;quot;}], &amp;quot;sshKeys&amp;quot; : [87634], &amp;quot;tags&amp;quot;: &amp;quot;cgallo, test&amp;quot;}&#39;
185+
&lt;/code&gt;&lt;/pre&gt;
186+
187+
&lt;p&gt;&amp;ndash;complex-type should match up with something that starts with SoftLayer_Container_Product&lt;em&gt;Order&lt;/em&gt;&lt;/p&gt;
188+
189+
&lt;p&gt;&lt;a href=&#34;http://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Product_Order_Hardware_Server&#34;&gt;SoftLayer_Container_Product_Order_Hardware_Server&lt;/a&gt; for bare metal servers, but there are others that may need to be selected. SLDN has a complete list of all supported containers.&lt;/p&gt;
190+
191+
&lt;h3 id=&#34;5-testing-an-order&#34;&gt;5. Testing an order.&lt;/h3&gt;
192+
193+
&lt;p&gt;the &amp;ndash;verify option will not actually place an order, just insure the order is mostly correct. You may still run into when actually placing the order however. Such as being unable to find IDs for ssh keys, vlans, etc, or being out of stock of an offering.&lt;/p&gt;
194+
195+
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;slcli --really order place --verify --preset D2620V4_64GB_2X1TB_SATA_RAID_1 BARE_METAL_SERVER TORONTO \
196+
OS_UBUNTU_16_04_LTS_XENIAL_XERUS_64_BIT \
197+
BANDWIDTH_0_GB_2 \
198+
1_GBPS_PUBLIC_PRIVATE_NETWORK_UPLINKS \
199+
REBOOT_KVM_OVER_IP 1_IP_ADDRESS \
200+
UNLIMITED_SSL_VPN_USERS_1_PPTP_VPN_USER_PER_ACCOUNT \
201+
--extras &#39;{&amp;quot;hardware&amp;quot;: [{&amp;quot;hostname&amp;quot; : &amp;quot;testOrder1&amp;quot;, &amp;quot;domain&amp;quot;: &amp;quot;cgallo.com&amp;quot;}], &amp;quot;sshKeys&amp;quot; : [87634], &amp;quot;tags&amp;quot;: &amp;quot;cgallo, test&amp;quot;}&#39; \
202+
--complex-type SoftLayer_Container_Product_Order_Hardware_Server
203+
&lt;/code&gt;&lt;/pre&gt;
204+
</description>
205+
</item>
206+
207+
</channel>
208+
</rss>

classes/softlayer_product_order/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ <h3>php</h3>
130130
<h3>python</h3>
131131
<ul>
132132

133+
<li>
134+
<a href="https://softlayer.github.io/python/ordering_slcli/">Ordering with KeyNames</a>
135+
<div class="meta">Examples on how to order anything in the catalog with the proper package and item names.</div>
136+
</li>
137+
133138
<li>
134139
<a href="https://softlayer.github.io/python/orderbaremetal/">Advanced Bare Metal Server Ordering</a>
135140
<div class="meta">Explains how to build a bare metal order, includes how to get packages, prices, raid setup and vlans</div>

0 commit comments

Comments
 (0)