This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
v1stacks_client.go
900 lines (777 loc) · 32.5 KB
/
v1stacks_client.go
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
// Code generated by go-swagger; DO NOT EDIT.
package v1stacks
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
)
// New creates a new v1stacks API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
return &Client{transport: transport, formats: formats}
}
/*
Client for v1stacks API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
/*
DeleteCluster deletes cluster on a specific stack
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) DeleteCluster(params *DeleteClusterParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteClusterParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deleteCluster",
Method: "DELETE",
PathPattern: "/v1/stacks/{id}/cluster",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &DeleteClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
DeleteInstanceStack deletes instance resource from stack
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) DeleteInstanceStack(params *DeleteInstanceStackParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteInstanceStackParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deleteInstanceStack",
Method: "DELETE",
PathPattern: "/v1/stacks/{stackId}/{instanceId}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &DeleteInstanceStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
DeleteInstancesStack deletes instance resource from stack
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) DeleteInstancesStack(params *DeleteInstancesStackParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteInstancesStackParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deleteInstancesStack",
Method: "DELETE",
PathPattern: "/v1/stacks/{stackId}/deleteInstances",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &DeleteInstancesStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
DeletePrivateStack deletes private stack by name
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) DeletePrivateStack(params *DeletePrivateStackParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewDeletePrivateStackParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deletePrivateStack",
Method: "DELETE",
PathPattern: "/v1/stacks/user/{name}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &DeletePrivateStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
DeletePublicStack deletes public owned or private stack by name
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) DeletePublicStack(params *DeletePublicStackParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewDeletePublicStackParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deletePublicStack",
Method: "DELETE",
PathPattern: "/v1/stacks/account/{name}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &DeletePublicStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
DeleteStack deletes stack by id
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) DeleteStack(params *DeleteStackParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteStackParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "deleteStack",
Method: "DELETE",
PathPattern: "/v1/stacks/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &DeleteStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
FailureReportCluster failures report
Endpoint to report the failed nodes in the given cluster. If recovery mode for the node's hostgroup is AUTO then autorecovery would be started. If recovery mode for the node's hostgroup is MANUAL, the nodes will be marked as unhealthy.
*/
func (a *Client) FailureReportCluster(params *FailureReportClusterParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewFailureReportClusterParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "failureReportCluster",
Method: "POST",
PathPattern: "/v1/stacks/{id}/cluster/failurereport",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &FailureReportClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
GetAllStack retrieves all stacks
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetAllStack(params *GetAllStackParams) (*GetAllStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetAllStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getAllStack",
Method: "GET",
PathPattern: "/v1/stacks/all",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetAllStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetAllStackOK), nil
}
/*
GetCertificateStack retrieves the TLS certificate used by the gateway
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetCertificateStack(params *GetCertificateStackParams) (*GetCertificateStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCertificateStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getCertificateStack",
Method: "GET",
PathPattern: "/v1/stacks/{id}/certificate",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetCertificateStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetCertificateStackOK), nil
}
/*
GetCluster retrieves cluster by stack id
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) GetCluster(params *GetClusterParams) (*GetClusterOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetClusterParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getCluster",
Method: "GET",
PathPattern: "/v1/stacks/{id}/cluster",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetClusterOK), nil
}
/*
GetConfigsCluster gets cluster properties with blueprint outputs
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) GetConfigsCluster(params *GetConfigsClusterParams) (*GetConfigsClusterOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetConfigsClusterParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getConfigsCluster",
Method: "POST",
PathPattern: "/v1/stacks/{id}/cluster/config",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetConfigsClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetConfigsClusterOK), nil
}
/*
GetFullCluster retrieves cluster by stack id
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) GetFullCluster(params *GetFullClusterParams) (*GetFullClusterOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetFullClusterParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getFullCluster",
Method: "GET",
PathPattern: "/v1/stacks/{id}/cluster/full",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetFullClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetFullClusterOK), nil
}
/*
GetPrivateCluster retrieves cluster by stack name private
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) GetPrivateCluster(params *GetPrivateClusterParams) (*GetPrivateClusterOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPrivateClusterParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getPrivateCluster",
Method: "GET",
PathPattern: "/v1/stacks/user/{name}/cluster",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetPrivateClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetPrivateClusterOK), nil
}
/*
GetPrivateStack retrieves a private stack by name
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetPrivateStack(params *GetPrivateStackParams) (*GetPrivateStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPrivateStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getPrivateStack",
Method: "GET",
PathPattern: "/v1/stacks/user/{name}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetPrivateStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetPrivateStackOK), nil
}
/*
GetPrivatesStack retrieves private stack
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetPrivatesStack(params *GetPrivatesStackParams) (*GetPrivatesStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPrivatesStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getPrivatesStack",
Method: "GET",
PathPattern: "/v1/stacks/user",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetPrivatesStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetPrivatesStackOK), nil
}
/*
GetPublicCluster retrieves cluster by stack name public
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) GetPublicCluster(params *GetPublicClusterParams) (*GetPublicClusterOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPublicClusterParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getPublicCluster",
Method: "GET",
PathPattern: "/v1/stacks/account/{name}/cluster",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetPublicClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetPublicClusterOK), nil
}
/*
GetPublicStack retrieves a public or private owned stack by name
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetPublicStack(params *GetPublicStackParams) (*GetPublicStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPublicStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getPublicStack",
Method: "GET",
PathPattern: "/v1/stacks/account/{name}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetPublicStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetPublicStackOK), nil
}
/*
GetPublicsStack retrieves public and private owned stacks
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetPublicsStack(params *GetPublicsStackParams) (*GetPublicsStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetPublicsStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getPublicsStack",
Method: "GET",
PathPattern: "/v1/stacks/account",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetPublicsStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetPublicsStackOK), nil
}
/*
GetStack retrieves stack by id
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetStack(params *GetStackParams) (*GetStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getStack",
Method: "GET",
PathPattern: "/v1/stacks/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetStackOK), nil
}
/*
GetStackForAmbari retrieves stack by ambari address
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) GetStackForAmbari(params *GetStackForAmbariParams) (*GetStackForAmbariOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetStackForAmbariParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getStackForAmbari",
Method: "POST",
PathPattern: "/v1/stacks/ambari",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &GetStackForAmbariReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*GetStackForAmbariOK), nil
}
/*
PostCluster creates cluster for stack
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) PostCluster(params *PostClusterParams) (*PostClusterOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostClusterParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "postCluster",
Method: "POST",
PathPattern: "/v1/stacks/{id}/cluster",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &PostClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*PostClusterOK), nil
}
/*
PutCluster updates cluster by stack id
Clusters are materialised Hadoop services on a given infrastructure. They are built based on a Blueprint (running the components and services specified) and on a configured infrastructure Stack. Once a cluster is created and launched, it can be used the usual way as any Hadoop cluster. We suggest to start with the Cluster's Ambari UI for an overview of your cluster.
*/
func (a *Client) PutCluster(params *PutClusterParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewPutClusterParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "putCluster",
Method: "PUT",
PathPattern: "/v1/stacks/{id}/cluster",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &PutClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
PutStack updates stack by id
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) PutStack(params *PutStackParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewPutStackParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "putStack",
Method: "PUT",
PathPattern: "/v1/stacks/{id}",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &PutStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
RepairCluster repairs the cluster
Removing the failed nodes and starting new nodes to substitute them.
*/
func (a *Client) RepairCluster(params *RepairClusterParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewRepairClusterParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "repairCluster",
Method: "POST",
PathPattern: "/v1/stacks/{id}/cluster/manualrepair",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &RepairClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
StatusStack retrieves stack status by stack id
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) StatusStack(params *StatusStackParams) (*StatusStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewStatusStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "statusStack",
Method: "GET",
PathPattern: "/v1/stacks/{id}/status",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &StatusStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*StatusStackOK), nil
}
/*
UpdateGatewayTopologies updates topologies of a gateway
Gateway is an Apache Knox Gateway, which is an Application Gateway for interacting with REST APIs andUIs of Apache Hadoop deployments. Provides Authentication and other services.
*/
func (a *Client) UpdateGatewayTopologies(params *UpdateGatewayTopologiesParams) (*UpdateGatewayTopologiesOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewUpdateGatewayTopologiesParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "updateGatewayTopologies",
Method: "PUT",
PathPattern: "/v1/stacks/{id}/cluster/gateway",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &UpdateGatewayTopologiesReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*UpdateGatewayTopologiesOK), nil
}
/*
UpgradeCluster upgrades the ambari version
Ambari is used to provision the Hadoop clusters.
*/
func (a *Client) UpgradeCluster(params *UpgradeClusterParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewUpgradeClusterParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "upgradeCluster",
Method: "POST",
PathPattern: "/v1/stacks/{id}/cluster/upgrade",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &UpgradeClusterReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
ValidateStack validates stack
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) ValidateStack(params *ValidateStackParams) error {
// TODO: Validate the params before sending
if params == nil {
params = NewValidateStackParams()
}
_, err := a.transport.Submit(&runtime.ClientOperation{
ID: "validateStack",
Method: "POST",
PathPattern: "/v1/stacks/validate",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &ValidateStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return err
}
return nil
}
/*
VariantsStack retrieves available platform variants
Stacks are template instances - a running cloud infrastructure created based on a template. Stacks are always launched on behalf of a cloud user account. Stacks support a wide range of resources, allowing you to build a highly available, reliable, and scalable infrastructure for your application needs.
*/
func (a *Client) VariantsStack(params *VariantsStackParams) (*VariantsStackOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewVariantsStackParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "variantsStack",
Method: "GET",
PathPattern: "/v1/stacks/platformVariants",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http", "https"},
Params: params,
Reader: &VariantsStackReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
return result.(*VariantsStackOK), nil
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}