forked from softlayer/softlayer.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.xml
More file actions
1370 lines (1123 loc) · 174 KB
/
index.xml
File metadata and controls
1370 lines (1123 loc) · 174 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>SoftLayer API on SoftLayer API </title>
<link>https://sldn.softlayer.com/</link>
<language>en-US</language>
<author>Enthusiastic Hugo User</author>
<rights>Copyright (c) 2014, Enthusiastic Hugo User; all rights reserved.</rights>
<updated>Fri, 01 Nov 2019 00:00:00 UTC</updated>
<item>
<title>Release notes: November 1, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20191101/</link>
<pubDate>Fri, 01 Nov 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20191101/</guid>
<description>
<h4 id="catalog">Catalog</h4>
<ul>
<li>New Cascade Lake Hourly FSP&rsquo;s
<ul>
<li>Silver 4210 64GB 2X1.7TB SSD NoRAID - Preset 1214</li>
<li>Gold 5218 64GB 2x1.7TB SSD NoRAID - Preset 1216</li>
<li>Gold 6248 384GB 4x1.7TB SSD RAID10 - Preset 1218</li>
</ul></li>
<li>Remove 7.68TB SSDs from the ReadyNode package 1053</li>
<li>Managed services premium application for package 993</li>
<li>Enable UEFI boot for several operating systems
<ul>
<li>Windows / RHEL 7 / CentOS 7 / Ubuntu 18.04</li>
<li>NO OS / XenServer 7.1.2 / XenServer 7.x / SUSE SLES 12sp4 / SUSE SLES 15</li>
<li>Product_Item_Category = UEFI Boot Mode</li>
<li>Product_CategoryCode = UEFI_boot</li>
</ul></li>
<li>Enabled Presets 1158 and 1160 in package 1075</li>
<li>12TB HDDs added to Coffee Lake package #2634</li>
<li>Activate Coffee Lake E2174G servers for order entry at the following datacenters
<ul>
<li>DAl10, FRA02, FRA05, LON04, PAR01, SYD01, TOK02, WDC04</li>
</ul></li>
</ul>
</description>
</item>
<item>
<title>Image Template Costs</title>
<link>https://sldn.softlayer.com/python/image_template_costs/</link>
<pubDate>Fri, 25 Oct 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/python/image_template_costs/</guid>
<description><p>The way this script works is that first it gets your last invoice, and finds all the <code>Image Template</code> items on it and builds a list of those, with their cost.</p>
<p>Then it goes through all your current image templates, correlates the templates Storage_Repository, and child templates with what was on your last invoice, and does some very basic math to come up with a next month cost.</p>
<p>Be aware that the next month cost assumes the template has existed in the repository for the entire month. So the result this script returns may not match exactly with what is on your next bill. This script also is not able to estimate cost of images that have been delete in the current month.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;
</span><span style="color:#e6db74">Image template cost calculator.
</span><span style="color:#e6db74">
</span><span style="color:#e6db74">SoftLayer stores image templates in a SoftLayer_Virtual_Storage_Repository, which has a collection of other templates.
</span><span style="color:#e6db74">You are billed per Storage_Repository, based on the images size on disk (not actual disk size).
</span><span style="color:#e6db74">An image template created mid-month will result in a smaller bill than calcualted.
</span><span style="color:#e6db74">It is not possible for this script to pull usage data for images that have been deleted, so those are not included in these estimates.
</span><span style="color:#e6db74">Any entry in the CSV output that has a number for the first column means that Storage_Repo was delete since the last bill.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span>
<span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">from</span> pprint <span style="color:#f92672">import</span> pprint <span style="color:#66d9ef">as</span> pp
<span style="color:#f92672">import</span> logging
<span style="color:#f92672">import</span> click
<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">example</span>():
<span style="color:#66d9ef">def</span> __init__(self):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;
</span><span style="color:#e6db74"> :param int start: epoch time to start at. Should align to 00:00 UTC
</span><span style="color:#e6db74"> :param int end: epoch time to end at. Should align to 00:00 UTC
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
self<span style="color:#f92672">.</span>client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>Client()
debugger <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>DebugTransport(self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport)
self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport <span style="color:#f92672">=</span> debugger
<span style="color:#75715e"># logger = logging.getLogger()</span>
<span style="color:#75715e"># logger.addHandler(logging.StreamHandler())</span>
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">debug</span>(self):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;
</span><span style="color:#e6db74"> Useful for printing out the exact API calls that were used. If using the rest transport, will print cure-able commands.
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
<span style="color:#66d9ef">for</span> call <span style="color:#f92672">in</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport<span style="color:#f92672">.</span>get_last_calls():
<span style="color:#66d9ef">print</span>(self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport<span style="color:#f92672">.</span>print_reproduceable(call))
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">main</span>(self):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;
</span><span style="color:#e6db74"> Goes through all image templates on your account and tries to figure out how much they will cost next month.
</span><span style="color:#e6db74"> These costs are ESTIMATES and assumes the image template exists on your account for the entire month.
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
storage_repos <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>lastInvoiceRepos()
mask <span style="color:#f92672">=</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;mask[children[blockDevicesDiskSpaceTotal,storageRepository[id,datacenter,name,metricTrackingObject,billingItem[item[activeUsagePrices]]]]]&#34;&#34;&#34;</span>
objects <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;Account&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;getPrivateBlockDeviceTemplateGroups&#39;</span>, mask<span style="color:#f92672">=</span>mask, iter<span style="color:#f92672">=</span>True, limit<span style="color:#f92672">=</span><span style="color:#ae81ff">20</span>)
<span style="color:#66d9ef">for</span> _object <span style="color:#f92672">in</span> objects:
<span style="color:#66d9ef">for</span> child <span style="color:#f92672">in</span> _object[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;children&#39;</span>]:
<span style="color:#66d9ef">try</span>:
repo_id <span style="color:#f92672">=</span> child[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;storageRepository&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;id&#39;</span>]
repo_name <span style="color:#f92672">=</span> child[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;storageRepository&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>]
metric_id <span style="color:#f92672">=</span> child[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;storageRepository&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;metricTrackingObject&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;id&#39;</span>]
rate <span style="color:#f92672">=</span> float(child[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;storageRepository&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;billingItem&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;item&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;activeUsagePrices&#39;</span>][<span style="color:#ae81ff">0</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;usageRate&#39;</span>])
size <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>convert(child[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;blockDevicesDiskSpaceTotal&#39;</span>])
<span style="color:#66d9ef">if</span> <span style="color:#f92672">not</span> storage_repos<span style="color:#f92672">.</span>get(repo_id):
storage_repos[repo_id] <span style="color:#f92672">=</span> {<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;images&#39;</span>:[], <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>: repo_name}
storage_repos[repo_id][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>] <span style="color:#f92672">=</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;{} - {}&#34;</span><span style="color:#f92672">.</span>format(repo_id, repo_name)
storage_repos[repo_id][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;images&#39;</span>]<span style="color:#f92672">.</span>append({
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;metricTrackingObject&#39;</span>: metric_id,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;billingItemId&#39;</span>: child[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;storageRepository&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;billingItem&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;id&#39;</span>],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;rate&#39;</span>: rate,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;size&#39;</span>: size,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>: child[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;cost&#39;</span>: round(size <span style="color:#f92672">*</span> rate, <span style="color:#ae81ff">2</span>)
})
<span style="color:#66d9ef">except</span> <span style="color:#a6e22e">KeyError</span> <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">pass</span>
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Valut, Last Cost, Next Cost, Size, Images&#34;</span>)
<span style="color:#66d9ef">for</span> repo <span style="color:#f92672">in</span> storage_repos:
next_cost <span style="color:#f92672">=</span> []
size <span style="color:#f92672">=</span> []
images <span style="color:#f92672">=</span> []
<span style="color:#66d9ef">for</span> image <span style="color:#f92672">in</span> storage_repos[repo][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;images&#39;</span>]:
next_cost<span style="color:#f92672">.</span>append(image[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;cost&#39;</span>])
size<span style="color:#f92672">.</span>append(image[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;size&#39;</span>])
images<span style="color:#f92672">.</span>append(image[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>])
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;{}, {}, {}, {}, {}&#34;</span><span style="color:#f92672">.</span>format(
storage_repos[repo][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>], storage_repos[repo][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;recurringFee&#39;</span>],
round(sum(next_cost),<span style="color:#ae81ff">2</span>), round(sum(size),<span style="color:#ae81ff">2</span>), <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;,&#34;</span><span style="color:#f92672">.</span>join(images)
))
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">lastInvoiceRepos</span>(self):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;Gets the last invoice and fines all the SoftLayer_Virtual_Storage_Repository items&#34;&#34;&#34;</span>
repos <span style="color:#f92672">=</span> {}
invoice_mask <span style="color:#f92672">=</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;mask[id]&#34;&#34;&#34;</span>
top_mask <span style="color:#f92672">=</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;mask[category,billingItem,product]&#34;&#34;&#34;</span>
<span style="color:#75715e"># Image Template Storage or Public Image Storage</span>
<span style="color:#75715e"># Archive Storage Repository or Public Storage Repository</span>
_filter <span style="color:#f92672">=</span> {
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;invoiceTopLevelItems&#39;</span> : {
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;categoryCode&#39;</span>: {
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;operation&#39;</span>: <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;or&#39;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;options&#39;</span>: [{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>: <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;data&#39;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;value&#39;</span>: [<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;public_storage&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;guest_storage&#39;</span>]
}]
}
}
}
invoice <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Account&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;getLatestRecurringInvoice&#39;</span>, mask<span style="color:#f92672">=</span>invoice_mask)
items <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Billing_Invoice&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;getInvoiceTopLevelItems&#39;</span>, mask<span style="color:#f92672">=</span>top_mask,
filter<span style="color:#f92672">=</span>_filter, iter<span style="color:#f92672">=</span>True, id<span style="color:#f92672">=</span>invoice[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;id&#39;</span>])
<span style="color:#66d9ef">for</span> item <span style="color:#f92672">in</span> items:
repos[item[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;resourceTableId&#39;</span>]] <span style="color:#f92672">=</span> {
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;product&#39;</span>: item[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;product&#39;</span>][<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;description&#39;</span>],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;recurringFee&#39;</span> :item[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;recurringFee&#39;</span>],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;oneTimeFee&#39;</span>: item[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;oneTimeFee&#39;</span>],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;images&#39;</span>: [],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>: item[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;resourceTableId&#39;</span>]
}
<span style="color:#66d9ef">return</span> repos
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">convert</span>(self, bytes):
<span style="color:#66d9ef">return</span> round(int(bytes) <span style="color:#f92672">/</span> (<span style="color:#ae81ff">1024</span> <span style="color:#f92672">**</span><span style="color:#ae81ff">3</span> ),<span style="color:#ae81ff">2</span>)
<span style="color:#a6e22e">@click.command</span>()
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">main</span>():
main <span style="color:#f92672">=</span> example()
main<span style="color:#f92672">.</span>main()
<span style="color:#75715e"># Uncomment this to print out the API calls made.</span>
<span style="color:#75715e"># main.debug()</span>
<span style="color:#66d9ef">if</span> __name__ <span style="color:#f92672">==</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;__main__&#34;</span>:
main()</code></pre></div></description>
</item>
<item>
<title>Release notes: October 25, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20191025/</link>
<pubDate>Fri, 25 Oct 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20191025/</guid>
<description>
<h4 id="portal">Portal</h4>
<ul>
<li>Update legacy order form UI for NVME</li>
<li>Fix issue preventing some server descriptions from being displayed correctly when ordering.</li>
</ul>
<h4 id="api">API</h4>
<ul>
<li>Adds IP version validation when ordering subnets.</li>
</ul>
<h4 id="backend">Backend</h4>
<ul>
<li>Properly handle IPMI errors during the assign server step of server provisions.</li>
</ul>
</description>
</item>
<item>
<title>Release notes: October 4, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20191004/</link>
<pubDate>Fri, 04 Oct 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20191004/</guid>
<description>
<h4 id="api">API</h4>
<ul>
<li>Block NextGen images from being ordered on classic VSIs. Image templates have &ldquo;features&rdquo; that track which platform the image is capable of provisioning, Classic, Generation Classic (GC), and NextGen. Classic VSI&rsquo;s can only be provisioned with image templates identified by the Classic feature.</li>
<li>SoftLayer_User_Customer::selfPasswordChange will return a new session token after success.</li>
</ul>
<h4 id="backend">Backend</h4>
<ul>
<li>WebCc components of evault provisions alongside servers will now function as intended. Customers will no longer need to re-order evaults and ask backup ops for assistance.</li>
<li>Assures that an order cannot contain more NVMe SSDs than what is supported by the associated hardware chassis.</li>
<li>Assures that NVMe SSDs are indexed last among the disk prices.</li>
</ul>
<h4 id="catalog">Catalog</h4>
<ul>
<li>Add 2x2TB SATA HDD to package 1075 presets 1158 and 1160</li>
<li>Price Drop for RHEL 1- 4 Core only for Hourly VSIs
<ul>
<li>Item ID 3835 Price ID 13794 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 6.x - LAMP Install (64 bit) (1 - 4 CORE)</li>
<li>Item ID 3839 Price ID 13799 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 6.x - Minimal Install (64 bit) (1 - 4 CORE)</li>
<li>Item ID 6123 Price ID 48993 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 7.x - Minimal Install (64 bit) (1 - 4 CORE)</li>
<li>Item ID 6131 Price ID 49021 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 7.x - LAMP Install (64 bit) (1 - 4 CORE)</li>
</ul></li>
<li>2U / 4-Socket Cascade Lake Servers
<ul>
<li>Supermicro 2U 2049U-TR4 chassis</li>
<li>Intel 6248 Gold Cascade Lake processor</li>
<li>UEFI booting mode will be used</li>
<li>Up to 24 2.5&rdquo; disk drive bays</li>
<li>LSI MegaRAID 9460-16i RAID controller card</li>
</ul></li>
<li>Add VMWARE 6.7 to package 1075</li>
</ul>
</description>
</item>
<item>
<title>Autoscale</title>
<link>https://sldn.softlayer.com/python/autoscale/</link>
<pubDate>Thu, 03 Oct 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/python/autoscale/</guid>
<description><p><a href="https://cloud.ibm.com/classic/autoscale/">Autoscale UI</a>
<a href="https://softlayer-python.readthedocs.io/en/latest/cli/autoscale.html">Autoscale CLU</a>
<a href="https://cloud.ibm.com/docs/vsi?topic=virtual-servers-about-auto-scale">Autoscale Docs</a></p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">from</span> pprint <span style="color:#f92672">import</span> pprint <span style="color:#66d9ef">as</span> pp
<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">autoscale</span>():
<span style="color:#66d9ef">def</span> __init__(self):
self<span style="color:#f92672">.</span>client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>Client()
debugger <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>DebugTransport(self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport)
self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport <span style="color:#f92672">=</span> debugger
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">list</span>(self):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;List out autoscale groups&#34;&#34;&#34;</span>
mask <span style="color:#f92672">=</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;mask[status,virtualGuestMemberCount]&#34;</span>
groups <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Account&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;getScaleGroups&#39;</span>, mask<span style="color:#f92672">=</span>mask, iter<span style="color:#f92672">=</span>True)
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Id, Name, Guests&#34;</span>)
<span style="color:#66d9ef">for</span> group <span style="color:#f92672">in</span> groups:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;{}, {}, {}&#34;</span><span style="color:#f92672">.</span>format(group[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;id&#39;</span>], group[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>], group[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;virtualGuestMemberCount&#39;</span>]))
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">get_group_template</span>(self, group_id):
mask <span style="color:#f92672">=</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;mask[virtualGuestMemberTemplate]&#34;</span>
group <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Scale_Group&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;getObject&#39;</span>, mask<span style="color:#f92672">=</span>mask, id<span style="color:#f92672">=</span>group_id)
pp(group[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;virtualGuestMemberTemplate&#39;</span>])
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">set_group_name</span>(self, group_id, new_name<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;Sets the name of an autoscale group
</span><span style="color:#e6db74">
</span><span style="color:#e6db74"> Editing some of the other properties in https://sldn.softlayer.com/reference/datatypes/SoftLayer_Scale_Group/
</span><span style="color:#e6db74"> can be done the same way.
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
template <span style="color:#f92672">=</span> {}
template[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;name&#39;</span>] <span style="color:#f92672">=</span> new_name
group <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Scale_Group&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;editObject&#39;</span>, template, id<span style="color:#f92672">=</span>group_id)
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">toggle_scale_group</span>(self, group_id, suspended<span style="color:#f92672">=</span>False):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;Suspend or un-suspend a group
</span><span style="color:#e6db74">
</span><span style="color:#e6db74"> suspend=False to turn the group ON
</span><span style="color:#e6db74"> suspend=True to turn the group OFF
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
template <span style="color:#f92672">=</span> {
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;id&#34;</span>: scaleGroupId,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;suspendedFlag&#34;</span>: suspended
}
group <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Scale_Group&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;editObject&#39;</span>, template, id<span style="color:#f92672">=</span>group_id)
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">create_scale_group</span>(self):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;Create a scale group
</span><span style="color:#e6db74">
</span><span style="color:#e6db74"> https://sldn.softlayer.com/reference/datatypes/SoftLayer_Scale_Group/ for the template options.
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
template <span style="color:#f92672">=</span> {
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;cooldown&#34;</span> : <span style="color:#ae81ff">1800</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;maximumMemberCount&#34;</span> : <span style="color:#ae81ff">5</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;minimumMemberCount&#34;</span> : <span style="color:#ae81ff">1</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;name&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;testRaul2cb03&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;regionalGroupId&#34;</span> : <span style="color:#ae81ff">102</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;terminationPolicyId&#34;</span> : <span style="color:#ae81ff">2</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;virtualGuestMemberTemplate&#34;</span> : {
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;domain&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;test.com&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;hostname&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;hostnametest&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;maxMemory&#34;</span> : <span style="color:#ae81ff">1024</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;postInstallScriptUri&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;https://www.softlayer.com&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;startCpus&#34;</span> : <span style="color:#ae81ff">1</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;userData&#34;</span> : [{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;value&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;the userData&#34;</span>
}],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;blockDevices&#34;</span> : [
{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;device&#34;</span> : <span style="color:#ae81ff">0</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;diskImage&#34;</span> : {<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;capacity&#34;</span> : <span style="color:#ae81ff">25</span>}
}, <span style="color:#75715e"># Device 1 is usually swap, which is why we skip to device 2</span>
{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;device&#34;</span> : <span style="color:#ae81ff">2</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;diskImage&#34;</span> : { <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;capacity&#34;</span> : <span style="color:#ae81ff">10</span>}
}
],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;datacenter&#34;</span> : {<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;name&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;dal13&#34;</span>},
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;hourlyBillingFlag&#34;</span> : True,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;localDiskFlag&#34;</span> : False,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;networkComponents&#34;</span> : [{ <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;maxSpeed&#34;</span> : <span style="color:#ae81ff">100</span>}],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;operatingSystemReferenceCode&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;CENTOS_LATEST&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;privateNetworkOnlyFlag&#34;</span> : False<span style="color:#75715e">#,</span>
<span style="color:#75715e"># &#34;sshKeys&#34; : [{&#34;id&#34; : 246}] </span>
},
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;virtualGuestMemberCount&#34;</span> : <span style="color:#ae81ff">0</span>,
<span style="color:#75715e"># &#34;networkVlans&#34; : [</span>
<span style="color:#75715e"># {&#34;networkVlanId&#34; : 542438},</span>
<span style="color:#75715e"># {&#34;networkVlanId&#34; : 542436}</span>
<span style="color:#75715e"># ]</span>
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;policies&#34;</span> : [
{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;name&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;myPolicy&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;cooldown&#34;</span> : <span style="color:#ae81ff">120</span>,
<span style="color:#75715e"># creating the triggers you can define the following triggers:</span>
<span style="color:#75715e"># oneTimeTriggers http://sldn.softlayer.com/reference/services/SoftLayer_Scale_Policy_Trigger_OneTime</span>
<span style="color:#75715e"># repeatingTrigger http://sldn.softlayer.com/reference/datatypes/SoftLayer_Scale_Policy_Trigger_Repeating</span>
<span style="color:#75715e"># resourceUseTrigger http://sldn.softlayer.com/reference/datatypes/SoftLayer_Scale_Policy_Trigger_ResourceUse</span>
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;resourceUseTriggers&#34;</span> : [
{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;complexType&#34;</span>: <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;SoftLayer_Scale_Policy_Trigger_ResourceUse&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;deleteFlag&#34;</span>: False,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;watches&#34;</span> : [
{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;algorithm&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;EWMA&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;deleteFlag&#34;</span>: False,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;metric&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;host.cpu.percent&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;operator&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&gt;&#34;</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;period&#34;</span> : <span style="color:#ae81ff">1800</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;value&#34;</span> : <span style="color:#ae81ff">80</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;complexType&#34;</span>: <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch&#34;</span>
}
]
}
],
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;scaleActions&#34;</span> : [
{
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;amount&#34;</span> : <span style="color:#ae81ff">1</span>,
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;scaleType&#34;</span> : <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;ABSOLUTE&#34;</span>
}
]
}
]
}
group <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Scale_Group&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;createObject&#39;</span>, template)
pp(group)
<span style="color:#66d9ef">return</span> group
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">delete_group</span>(self, group_id):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;Remove a scale group
</span><span style="color:#e6db74">
</span><span style="color:#e6db74"> use https://sldn.softlayer.com/reference/services/SoftLayer_Scale_Group/forceDeleteObject to also remove any existing guests.
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Scale_Group&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;deleteObject&#39;</span>, id<span style="color:#f92672">=</span>group_id)
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">scale_group</span>(self, group_id, amount<span style="color:#f92672">=</span><span style="color:#ae81ff">0</span>):
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;Scale a group by amount
</span><span style="color:#e6db74">
</span><span style="color:#e6db74"> if amount if negative, group will scale down by that amount.
</span><span style="color:#e6db74"> &#34;&#34;&#34;</span>
result <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Scale_Group&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;scale&#39;</span>, amount, id<span style="color:#f92672">=</span>group_id)
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">get_logs</span>(self, group_id):
result <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>call(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Scale_Group&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;getLogs&#39;</span>, id<span style="color:#f92672">=</span>group_id)
pp(result)
<span style="color:#66d9ef">def</span> <span style="color:#a6e22e">debug</span>(self):
<span style="color:#66d9ef">for</span> call <span style="color:#f92672">in</span> self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport<span style="color:#f92672">.</span>get_last_calls():
<span style="color:#66d9ef">print</span>(self<span style="color:#f92672">.</span>client<span style="color:#f92672">.</span>transport<span style="color:#f92672">.</span>print_reproduceable(call))
<span style="color:#66d9ef">if</span> __name__ <span style="color:#f92672">==</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;__main__&#34;</span>:
main <span style="color:#f92672">=</span> autoscale()
main<span style="color:#f92672">.</span>list()
<span style="color:#75715e"># main.set_group_name(2255094, new_name=&#34;ajcb-autoscale12&#34;)</span>
<span style="color:#75715e"># main.get_group_template(2255094)</span>
<span style="color:#75715e"># main.debug()</span></code></pre></div></description>
</item>
<item>
<title>Release notes: September 27, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20190927/</link>
<pubDate>Fri, 27 Sep 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20190927/</guid>
<description>
<h4 id="backend">Backend</h4>
<h4 id="api">API</h4>
<ul>
<li>Fixed <code>&quot;error&quot;: &quot;Property 'gpuCount' not valid for 'SoftLayer_Virtual_Guest'.&quot;</code></li>
<li>Fixed an issue with SoftLayer_User_Customer::InitiatePortalPasswordChangeByBrandAgent() not working as documented.</li>
<li>Creating Premium Support For Preferred Partners brand attribute to support a new offering allowing BAP to escalate tickets at a high priority.</li>
<li>Create new &ldquo;SUSPENDED&rdquo; user status, statusId=1005</li>
<li>Display complexity related errors when user attempt to update vpn password.</li>
</ul>
</description>
</item>
<item>
<title>Release notes: September 20, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20190920/</link>
<pubDate>Fri, 20 Sep 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20190920/</guid>
<description>
<h4 id="backend">Backend</h4>
<ul>
<li>Fix issue where ordering from a quote did not total the monthly cost at checkout correctly.</li>
<li>Customers will no longer have to wait for volume moves as part of resize.</li>
<li>Adding Bare Metal Gateway License category code.</li>
</ul>
</description>
</item>
<item>
<title>Release notes: September 13, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20190913/</link>
<pubDate>Fri, 13 Sep 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20190913/</guid>
<description>
<h4 id="portal">Portal</h4>
<ul>
<li>Remove &ldquo;CANCEL_PENDING&rdquo; in UI in favor of &ldquo;Deleted&rdquo;</li>
</ul>
<h4 id="api">API</h4>
<ul>
<li>The following are removed from SLDN
<ul>
<li>SoftLayer_Network_Storage_Allowed_Host::createFromHardware</li>
<li>SoftLayer_Network_Storage_Allowed_Host::createFromVirtualGuest</li>
<li>SoftLayer_Network_Storage_Allowed_Host::createFromIpAddress</li>
<li>SoftLayer_Network_Storage_Allowed_Host::createFromSubnet
These methods have never worked as stand-alone API calls. They were designed to be used in other host authorization methods.</li>
</ul></li>
</ul>
<p>Please, continue to use the following API methods to authorize hosts:
- SoftLayer_Network_Storage::allowAccessFromHardware
- SoftLayer_Network_Storage::allowAccessFromHardwareList
- SoftLayer_Network_Storage::allowAccessFromVirtualGuest
- SoftLayer_Network_Storage::allowAccessFromVirtualGuestList
- SoftLayer_Network_Storage::allowAccessFromIpAddress
- SoftLayer_Network_Storage::allowAccessFromIpAddressList
- SoftLayer_Network_Storage::allowAccessFromSubnet
- SoftLayer_Network_Storage::allowAccessFromSubnetList
- Notify Backup Storage Customers with tickets about their un-billed Backup storage
- Don&rsquo;t allow NVMe disks to be part of storage group
- Password requirements are returned in SoftLayer_User_Customer::getRequirementsForPasswordSet. Increased maximum portal password length to 128. Vpn password maximum length remains at 20.</p>
<h2 id="updated-the-reactivateaccount-and-disableaccount-api-methods-on-the-softlayer-brand-object-to-return-feedback-when-the-account-provided-is-already-in-the-desired-state">- Updated the reactivateAccount and disableAccount API methods on the SoftLayer_Brand object to return feedback when the account provided is already in the desired state.</h2>
<h4 id="backend">Backend</h4>
<ul>
<li>Code completed for sending out email when public image is updated by a public image account.</li>
<li>Removes ordering support for customer defined networks.</li>
</ul>
<h4 id="catalog">Catalog</h4>
<ul>
<li>2U / 4-Socket Cascade Lake Servers</li>
<li>Price Change on
<ul>
<li>Item ID 3835 Price ID 13794 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 6.x - LAMP Install (64 bit) (1 - 4 CORE)</li>
<li>Item ID 3839 Price ID 13799 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 6.x - Minimal Install (64 bit) (1 - 4 CORE)</li>
<li>Item ID 6123 Price ID 48993 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 7.x - Minimal Install (64 bit) (1 - 4 CORE)</li>
<li>Item ID 6131 Price ID 49021 - SoftLayer Retail Catalog - Red Hat Enterprise Linux 7.x - LAMP Install (64 bit) (1 - 4 CORE)</li>
</ul></li>
<li>Add 2x2TB SATA HDD to package 1075 presets 1158 and 1160</li>
<li>Bare Metal Reserve (BMR) SAP Configs</li>
<li>VMW General Availability</li>
<li>VMW - Create new Presets for Single Node and Digital play with 6.7u2 and Disk Less server
<ul>
<li>vCS Digital Play 6.7u2 - NEW ID 1158</li>
<li>vCS Single Node 6.7u2 - NEW ID 1160</li>
</ul></li>
<li>Make Package 551 available in Sao Paulo</li>
<li>Customers should be able to provision a Cascade Lake server with 1-2 K80, M60, P100, 16GB V100 or 32GB V100 GPUs.</li>
</ul>
</description>
</item>
<item>
<title>Release notes: August 30, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20190830/</link>
<pubDate>Fri, 30 Aug 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20190830/</guid>
<description>
<h4 id="portal">Portal</h4>
<ul>
<li>Adds a new product group to the order forms for NVMe SSD disks</li>
<li>Fix owner IBMid change broken by 2FA/SecAnswers</li>
</ul>
<h4 id="api">API</h4>
<ul>
<li>allowedPptpVpnQuantity set to zero for all accounts.</li>
</ul>
</description>
</item>
<item>
<title>Release notes: August 23, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20190823/</link>
<pubDate>Fri, 23 Aug 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20190823/</guid>
<description>
<h4 id="portal">Portal</h4>
<ul>
<li>Add redirect for Manage portal /login and /index to appropriate login page</li>
</ul>
<h4 id="api">API</h4>
<ul>
<li>Add logging of iSCSI and NFS Host Authorization to the SoftLayer_Event_Log for authorization and deauthorization events</li>
<li>Fixed an issue with SoftLayer_Virtual_Guest::getPendingMaintenanceActions()</li>
<li>Fix issue with verifyOrder checking public pool capacity on VPC guests</li>
<li>Adding a new trait (DEFAULT_NEW_ACCOUNTS_PREMIUM) that if set to 1 will initialize all new brand sub-accounts with Premium support.</li>
</ul>
<h4 id="backend">Backend</h4>
<ul>
<li>Fix issue where retention disk billing would sometimes be inaccurate after reloading a virtual server.</li>
<li>Custom Encrypted Windows VHD Import from ICOS.</li>
</ul>
</description>
</item>
<item>
<title>Billing and Invoices</title>
<link>https://sldn.softlayer.com/article/billing/</link>
<pubDate>Thu, 22 Aug 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/article/billing/</guid>
<description>
<h2 id="getting-invoices">Getting Invoices</h2>
<p>Everything that will be charged to your total balance will appear on an invoice, of which there are three main type.</p>
<p>To get the total balance on your account, simply use <a href="https://sldn.softlayer.com/reference/services/SoftLayer_Account/getBalance/">SoftLayer_Account::getBalance</a>.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4">curl -u $SL_USER:$SL_APIKEY &#39;https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getBalance.json&#39;</pre></div>
<h4 id="new">NEW</h4>
<p>Anything that is newly ordered will appear as a <code>NEW</code> type invoice. After the billing cycle ends, these will roll into the <code>RECURRING</code> type of invoice.</p>
<h4 id="recurring">RECURRING</h4>
<p>Usually each month you will have one recurring invoice, containing everything that was billed to the account, excepting <code>NEW</code> and <code>ONE-TIME-CHARGE</code></p>
<h4 id="one-time-charge">ONE-TIME-CHARGE</h4>
<p>These will usually be related to upgrade charges or similar. They are incurred once and don&rsquo;t roll into a <code>RECURRING</code> invoice.</p>
<p>There are several ways to get invoice data from the API.</p>
<h4 id="softlayer-account-getinvoices-reference-services-softlayer-account-getinvoices"><a href="https://sldn.softlayer.com/reference/services/SoftLayer_Account/getInvoices/">SoftLayer_Account::getInvoices</a></h4>
<p>This method will return all invoices your account has ever had, which can be quite a lot if your account has been around for a while. By default, these will be returned Oldest first, which is usually not ideal, so to fix that we use an objectFilter to sort them. This API call will also set a resultLimit of 50.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#75715e"># Calling: SoftLayer_Account::getInvoices(id=None, mask=&#39;mask[invoiceTotalAmount, itemCount]&#39;, filter=&#39;{&#39;invoices&#39;: {&#39;createDate&#39;: {&#39;operation&#39;: &#39;orderBy&#39;, &#39;options&#39;: [{&#39;name&#39;: &#39;sort&#39;, &#39;value&#39;: [&#39;DESC&#39;]}]}}}&#39;, args=(), limit=50, offset=0))
</span><span style="color:#75715e"></span>
curl -u $SL_USER:$SL_APIKEY <span style="color:#e6db74">&#39;https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getInvoices.json?objectMask=mask[invoiceTotalAmount,itemCount]&amp;resultLimit=0,50&amp;objectFilter={&#34;invoices&#34;:{&#34;createDate&#34;:{&#34;operation&#34;:&#34;orderBy&#34;,&#34;options&#34;:[{&#34;name&#34;:&#34;sort&#34;,&#34;value&#34;:[&#34;DESC&#34;]}]}}}&#39;</span></code></pre></div>
<h4 id="softlayer-account-getlatestrecurringinvoice-reference-services-softlayer-account-getlatestrecurringinvoice"><a href="https://sldn.softlayer.com/reference/services/SoftLayer_Account/getLatestRecurringInvoice/">SoftLayer_Account::getLatestRecurringInvoice</a></h4>
<p><code>getLatestRecurringInvoice</code> will only return the latest recurring invoice, as the name suggests. This invoice will generally be for the current billing period which needs to be paid.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4">curl -u $SL_USER:$SL_APIKEY &#39;https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getLatestRecurringInvoice.json&#39;</pre></div>
<p>There also exists the <a href="https://sldn.softlayer.com/reference/services/SoftLayer_Account/getLatestRecurringPendingInvoice/">SoftLayer_Account::getLatestRecurringPendingInvoice</a> method, which will only return the latest recurring invoice if it&rsquo;s status is <code>OPEN</code>, meaning it has yet to be paid off fully yet. If the latest invoice is open, these will return the same invoice.</p>
<h2 id="the-billing-invoice-reference-datatypes-softlayer-billing-invoice-itself">The <a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Invoice/">Billing_Invoice</a> Itself</h2>
<p>Some key fields in the Billing_Invoice datatype.</p>
<h4 id="invoicetotalamount">invoiceTotalAmount</h4>
<p>This is the amount that will be added to the SoftLayer_Account::balance from this invoice. It is broken down into a few other amounts like <code>invoiceTotalOneTimeAmount</code>, <code>invoiceTotalOneTimeTaxAmount</code>, <code>invoiceTotalPreTaxAmount</code>, <code>invoiceTotalRecurringAmount</code>, <code>invoiceTotalRecurringTaxAmount</code>.</p>
<h4 id="payments">payments</h4>
<p>Payments that made it into the invoice will show up here.</p>
<h4 id="invoicetoplevelitems">invoiceTopLevelItems</h4>
<p>Top Level items that are included on this invoice. This will be things like your servers, virtual guests, any bandwidth charges and things like that.</p>
<h4 id="items">items</h4>
<p>Everything billed to this invoice, including top level items and their children.</p>
<h4 id="pdf-excel">Pdf / Excel</h4>
<p>The invoice can also be retrieved in Excel or PDF format directly from the API.
Of note though, is the data returned from the API is going to be base64 Encoded, so you will need to decode it first before that data is usable.</p>
<ul>
<li><a href="https://sldn.softlayer.com/reference/services/SoftLayer_Billing_Invoice/getPdf/">SoftLayer_Billing_Invoice::getPdf</a></li>
<li><a href="https://sldn.softlayer.com/reference/services/SoftLayer_Billing_Invoice/getPdfDetailed/">SoftLayer_Billing_Invoice::getPdfDetailed</a></li>
<li><a href="https://sldn.softlayer.com/reference/services/SoftLayer_Billing_Invoice/getExcel/">SoftLayer_Billing_Invoice::getExcel</a></li>
</ul>
<blockquote>
<p>The API result is encapsulated in &ldquo;&rdquo;, and escapes the /es, both of which are invalid and need to removed, which is why the <code>tr</code> command is used below. Otherwise <code>base64</code> will return the error <code>Invalid character in input stream.</code></p>
</blockquote>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4">curl -s -u $SL_USER:$SL_APIKEY &#39;https://api.softlayer.com/rest/v3.1/SoftLayer_Billing_Invoice/&lt;INVOICE_ID&gt;/getPdf.json&#39; | tr -d &#39;&#34;\&#39; &gt; invoice.base64
base64 -D -i invoice.base64 -o invoice.pdf</pre></div>
<h2 id="billing-invoice-item-reference-datatypes-softlayer-billing-invoice-item"><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Invoice_Item/">Billing_Invoice_Item</a></h2>
<p>Each<a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Item/">SoftLayer_Billing_Item</a> on an account will generate a Billing_INVOICE_Item. The Billing_INVOICE_Item itself will have a link to its generating Billing_Item in the <code>billingItem</code> relation. There is also a variety of information about the Item being billed here, unfortunately there isn&rsquo;t going to be a direct link back to the actual resource (such as the Hardware_Server or Virtual_Guest).</p>
<p>The <code>resourceTableId</code> property will contain the Id of the actual resource being billed, but there is no programmatic way to translating that id to the appropriate service directly. You would need to use the <code>category-&gt;categoryCode</code> to determine which type of resource this Item represents.</p>
<h2 id="billing-item-reference-datatypes-softlayer-billing-item"><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Item/">Billing_Item</a></h2>
<p>Every resource will have a Billing_Item that lets you know how much the resource will cost as either an hourly cost (<code>hourlyRecurringFee</code>) or monthly cost (<code>recurringFee</code>). There are a few other fee types on the Billing_Item datatype as well that may need to be taken into account, depending on the resource.</p>
<h4 id="children">children</h4>
<p>Some Billing_Items will have children that may account for some of the total cost of the resource, but might not be reflected directly on this item. For example Hardware_Server resources will usually have several child items that represent the cost of RAM/Disks/Port speed and such. The <code>recurringFee</code> of the parent item will not be the full cost of the server, but only the cost of the chassis itself. To find the full cost of a server, you would need to add up the child <code>recurringFee</code> with the parent&rsquo;s <code>recurringFee</code>.</p>
<h4 id="filterednextinvoicechildren">filteredNextInvoiceChildren</h4>
<p>Handy for finding the true cost of an item with all its children. Excludes any item that has no cost.</p>
<h4 id="nextinvoicetotalrecurringamount">nextInvoiceTotalRecurringAmount</h4>
<p>This property will reflect the true recurring cost of the resource that will show up on the invoice, includes child items. The other related <code>nextInvoiceTotal*</code> properties are useful as well.</p>
<h4 id="orderitem">orderItem</h4>
<p>A link to the <a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Order_Item/">SoftLayer_Billing_Order_Item</a>, which can link to the actual <a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Billing_Order/">SoftLayer_Billing_Order</a>, which will contain information about who ordered the resource, and when.</p>
<h2 id="resource-billing">Resource Billing</h2>
<p>While the invoice is a great way to get a high level view of what you are being billed for, it can be cumbersome to use that to find out how much a specific resource is costing you. To do that, we will start at the resource&rsquo;s service, and go to its billingItem.</p>
<ul>
<li><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Hardware_Firewall/#billingItem">Hardware_Firewall</a></li>
<li><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_Application_Delivery_Controller/#billingItem">Network_Application_Delivery_Controller</a></li>
<li><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_CdnMarketplace_Account/#billingItem">Network_CdnMarketplace_Account</a></li>
<li><p><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Hardware_Server/#billingItem">Hardware_Server</a></p></li>
<li><p><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_Storage/#billingItem">Network_Storage</a></p></li>
<li><p><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_Subnet/#billingItem">Network_Subnet</a></p></li>
<li><p><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_Vlan/#billingItem">Network_Vlan</a></p></li>
<li><p><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Network_Vlan_Firewall/#billingItem">Network_Vlan_Firewall</a></p></li>
<li><p><a href="https://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest/#billingItem">Virtual_Guest</a></p></li>
</ul>
</description>
</item>
<item>
<title>Release notes: August 16, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20190816/</link>
<pubDate>Fri, 16 Aug 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20190816/</guid>
<description>
<h4 id="portal">Portal</h4>
<ul>
<li>Fix issue preventing orders from completing for new EU customers.</li>
<li>Fix the payment method disappearing when selecting PayPal, leaving the user unable select another payment method.</li>
</ul>
<h4 id="api">API</h4>
<ul>
<li>Adds SoftLayer_Virtual_Guest::getPendingMaintanceActions()</li>
<li>Added ability to skip platform account creation and linking when using the SoftLayer_Brand::createCustomerAccount API</li>
<li>Exposed gpuType and gpuCount on the SoftLayer_Virtual_Guest class</li>
<li>Add iamidVerificationFlag to SoftLayer_User_Customer_Link</li>
<li>Allow gateway orders to define the router id on the hardware template object.
<code>
&quot;hardware&quot;: [
{
&quot;hostname&quot;: &quot;softlayer&quot;,
&quot;domain&quot;: &quot;local.com&quot;,
&quot;primaryBackendNetworkComponent&quot;: {
&quot;router&quot;: {
&quot;id&quot;: 1076595
}
}
}
],
</code></li>
</ul>
<h4 id="backend">Backend</h4>
<ul>
<li>Fix evault creations on new server provisions</li>
<li>IBM Cloud CDN - Deny the http traffic if customer only chooses the https port.</li>
<li>Fixed an issue where a user upgrades or downgrades a Variable Compute VSIs from API or UI the VSI changes its type from &ldquo;Variable Compute&rdquo; to public Type.</li>
<li>Fixes VSI/BM provisions with evault to complete.</li>
<li>Http Cookie Persistence support for Cloud Load Balancer</li>
<li>EMS maintenance email improvements</li>
<li>Fix failing health check for https l7 pool</li>
</ul>
</description>
</item>
<item>
<title>Release notes: August 2, 2019</title>
<link>https://sldn.softlayer.com/release_notes/2019/20190802/</link>
<pubDate>Fri, 02 Aug 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/release_notes/2019/20190802/</guid>
<description>
<h4 id="api">API</h4>
<ul>
<li>Create new Software_Description HSM_OS attribute type</li>
</ul>
<h4 id="backend">Backend</h4>
<ul>
<li>Do not require postal code for ARIN addresses outside US &amp; Canada</li>
<li>Fix accepting Master User invitation on account linked at create time</li>
<li>Fixed an issue upgrade GPU enabled VSIs</li>
<li>Prevents ordering GPU&rsquo;s when provisioning from an image template set to boot in PV.</li>
</ul>
<h4 id="catalog">Catalog</h4>
<ul>
<li>Adding a category code for dynamic CDN bandwidth.
<ul>
<li>cdn_service_dynamic_bandwidth</li>
<li>cdn_service_dynamic_bandwidth_usage</li>
</ul></li>
<li>Add 500GB Bandwidth option to package 1111</li>
<li>Update Single Node Preset 1051 in package 1075 with updated pricing</li>
<li>Create rule to conflict Windows 2019 and vCenter 6.7</li>
<li>Add the CXL 4210 server to package 1111</li>
<li>Add ESXi 6.5u2 to package 1065</li>
<li>Expand Global Availability of vGPU (FRA, TOK, SYD)</li>
<li>Update catalog package 1113 for Cascade Lake 2U 4 socket server</li>
</ul>
</description>
</item>
<item>
<title>Virtual_host.py</title>
<link>https://sldn.softlayer.com/python/virtual_host.py/</link>
<pubDate>Sat, 27 Jul 2019 00:00:00 UTC</pubDate>
<author>Enthusiastic Hugo User</author>
<guid>https://sldn.softlayer.com/python/virtual_host.py/</guid>
<description>
<h3 id="getaccount">getAccount</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getAccount(id<span style="color:#f92672">=</span>id_host)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))
</code></pre></div>
<h3 id="getbilledpermemoryusageflag">getBilledPerMemoryUsageFlag</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getBilledPerMemoryUsageFlag(id<span style="color:#f92672">=</span>id_host)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))</code></pre></div>
<h3 id="getguests">getGuests</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getGuests(id<span style="color:#f92672">=</span>id_host)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))</code></pre></div>
<h3 id="gethardware">getHardware</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getHardware(id<span style="color:#f92672">=</span>id_host)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))</code></pre></div>
<h3 id="getliveguestbyuuid">getLiveGuestByUuid</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id and uuid variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;1001547&#34;</span>
uuid<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456789-bb9a-fe82-7239-4a33077cf32f&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getLiveGuestByUuid(uuid,id<span style="color:#f92672">=</span>id_host)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))</code></pre></div>
<h3 id="getliveguestlist">getLiveGuestList</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host <span style="color:#f92672">=</span> <span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getLiveGuestList(id<span style="color:#f92672">=</span>id)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))</code></pre></div>
<h3 id="getliveguestrecentmetricdata">getLiveGuestRecentMetricData</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id and uuid variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;1001547&#34;</span>
uuid<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456789-bb9a-fe82-7239-4a33077cf32f&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getLiveGuestRecentMetricData(uuid,id<span style="color:#f92672">=</span>id_host)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))</code></pre></div>
<h3 id="getliveguestrecentmetricdata-1">getLiveGuestRecentMetricData</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id variable.
</span><span style="color:#e6db74">&#34;&#34;&#34;</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;</span>
id_host<span style="color:#f92672">=</span><span style="color:#e6db74"></span><span style="color:#e6db74">&#34;123456&#34;</span>
<span style="color:#66d9ef">try</span>:
response <span style="color:#f92672">=</span> virtual_service<span style="color:#f92672">.</span>getMetricTrackingObject(id<span style="color:#f92672">=</span>id_host)
<span style="color:#66d9ef">print</span>(json<span style="color:#f92672">.</span>dumps(response, sort_keys<span style="color:#f92672">=</span>True, indent<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>, separators<span style="color:#f92672">=</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;,&#39;</span>, <span style="color:#e6db74"></span><span style="color:#e6db74">&#39;: &#39;</span>)))
<span style="color:#66d9ef">except</span> SoftLayer<span style="color:#f92672">.</span>SoftLayerAPIError <span style="color:#66d9ef">as</span> e:
<span style="color:#66d9ef">print</span>(<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;Unable to list the response for the package: </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultCode= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">, </span><span style="color:#ae81ff">\n</span><span style="color:#e6db74">faultString= </span><span style="color:#e6db74">%s</span><span style="color:#e6db74">&#34;</span>
<span style="color:#f92672">%</span> (e<span style="color:#f92672">.</span>faultCode, e<span style="color:#f92672">.</span>faultString))</code></pre></div>
<h3 id="getobject">getObject</h3>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-python" data-lang="python"><span style="color:#f92672">import</span> SoftLayer
<span style="color:#f92672">import</span> json
client <span style="color:#f92672">=</span> SoftLayer<span style="color:#f92672">.</span>create_client_from_env()
virtual_service <span style="color:#f92672">=</span> client[<span style="color:#e6db74"></span><span style="color:#e6db74">&#39;SoftLayer_Virtual_Host&#39;</span>]
<span style="color:#e6db74"></span><span style="color:#e6db74">&#34;&#34;&#34;&#34;
</span><span style="color:#e6db74">Virtual host id variable.