-
Notifications
You must be signed in to change notification settings - Fork 5
/
zz_api_ops.go
909 lines (764 loc) · 22.5 KB
/
zz_api_ops.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
901
902
903
904
905
906
907
908
909
// Copyright 2022-2023 The sacloud/iaas-api-go Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// generated by 'github.com/sacloud/iaas-api-go/internal/tools/gen-api-fake-op'; DO NOT EDIT
package fake
import (
"sync"
"github.com/sacloud/iaas-api-go"
)
var switchOnce sync.Once
// SwitchFactoryFuncToFake switches iaas.xxxAPI's factory methods to use fake client
func SwitchFactoryFuncToFake() {
switchOnce.Do(func() {
switchFactoryFuncToFake()
})
}
func switchFactoryFuncToFake() {
iaas.SetClientFactoryFunc(ResourceArchive, func(caller iaas.APICaller) interface{} {
return NewArchiveOp()
})
iaas.SetClientFactoryFunc(ResourceAuthStatus, func(caller iaas.APICaller) interface{} {
return NewAuthStatusOp()
})
iaas.SetClientFactoryFunc(ResourceAutoBackup, func(caller iaas.APICaller) interface{} {
return NewAutoBackupOp()
})
iaas.SetClientFactoryFunc(ResourceAutoScale, func(caller iaas.APICaller) interface{} {
return NewAutoScaleOp()
})
iaas.SetClientFactoryFunc(ResourceBill, func(caller iaas.APICaller) interface{} {
return NewBillOp()
})
iaas.SetClientFactoryFunc(ResourceBridge, func(caller iaas.APICaller) interface{} {
return NewBridgeOp()
})
iaas.SetClientFactoryFunc(ResourceCDROM, func(caller iaas.APICaller) interface{} {
return NewCDROMOp()
})
iaas.SetClientFactoryFunc(ResourceCertificateAuthority, func(caller iaas.APICaller) interface{} {
return NewCertificateAuthorityOp()
})
iaas.SetClientFactoryFunc(ResourceContainerRegistry, func(caller iaas.APICaller) interface{} {
return NewContainerRegistryOp()
})
iaas.SetClientFactoryFunc(ResourceCoupon, func(caller iaas.APICaller) interface{} {
return NewCouponOp()
})
iaas.SetClientFactoryFunc(ResourceDatabase, func(caller iaas.APICaller) interface{} {
return NewDatabaseOp()
})
iaas.SetClientFactoryFunc(ResourceDisk, func(caller iaas.APICaller) interface{} {
return NewDiskOp()
})
iaas.SetClientFactoryFunc(ResourceDiskPlan, func(caller iaas.APICaller) interface{} {
return NewDiskPlanOp()
})
iaas.SetClientFactoryFunc(ResourceDNS, func(caller iaas.APICaller) interface{} {
return NewDNSOp()
})
iaas.SetClientFactoryFunc(ResourceEnhancedDB, func(caller iaas.APICaller) interface{} {
return NewEnhancedDBOp()
})
iaas.SetClientFactoryFunc(ResourceESME, func(caller iaas.APICaller) interface{} {
return NewESMEOp()
})
iaas.SetClientFactoryFunc(ResourceGSLB, func(caller iaas.APICaller) interface{} {
return NewGSLBOp()
})
iaas.SetClientFactoryFunc(ResourceIcon, func(caller iaas.APICaller) interface{} {
return NewIconOp()
})
iaas.SetClientFactoryFunc(ResourceInterface, func(caller iaas.APICaller) interface{} {
return NewInterfaceOp()
})
iaas.SetClientFactoryFunc(ResourceInternet, func(caller iaas.APICaller) interface{} {
return NewInternetOp()
})
iaas.SetClientFactoryFunc(ResourceInternetPlan, func(caller iaas.APICaller) interface{} {
return NewInternetPlanOp()
})
iaas.SetClientFactoryFunc(ResourceIPAddress, func(caller iaas.APICaller) interface{} {
return NewIPAddressOp()
})
iaas.SetClientFactoryFunc(ResourceIPv6Net, func(caller iaas.APICaller) interface{} {
return NewIPv6NetOp()
})
iaas.SetClientFactoryFunc(ResourceIPv6Addr, func(caller iaas.APICaller) interface{} {
return NewIPv6AddrOp()
})
iaas.SetClientFactoryFunc(ResourceLicense, func(caller iaas.APICaller) interface{} {
return NewLicenseOp()
})
iaas.SetClientFactoryFunc(ResourceLicenseInfo, func(caller iaas.APICaller) interface{} {
return NewLicenseInfoOp()
})
iaas.SetClientFactoryFunc(ResourceLoadBalancer, func(caller iaas.APICaller) interface{} {
return NewLoadBalancerOp()
})
iaas.SetClientFactoryFunc(ResourceLocalRouter, func(caller iaas.APICaller) interface{} {
return NewLocalRouterOp()
})
iaas.SetClientFactoryFunc(ResourceMobileGateway, func(caller iaas.APICaller) interface{} {
return NewMobileGatewayOp()
})
iaas.SetClientFactoryFunc(ResourceNFS, func(caller iaas.APICaller) interface{} {
return NewNFSOp()
})
iaas.SetClientFactoryFunc(ResourceNote, func(caller iaas.APICaller) interface{} {
return NewNoteOp()
})
iaas.SetClientFactoryFunc(ResourcePacketFilter, func(caller iaas.APICaller) interface{} {
return NewPacketFilterOp()
})
iaas.SetClientFactoryFunc(ResourcePrivateHost, func(caller iaas.APICaller) interface{} {
return NewPrivateHostOp()
})
iaas.SetClientFactoryFunc(ResourcePrivateHostPlan, func(caller iaas.APICaller) interface{} {
return NewPrivateHostPlanOp()
})
iaas.SetClientFactoryFunc(ResourceProxyLB, func(caller iaas.APICaller) interface{} {
return NewProxyLBOp()
})
iaas.SetClientFactoryFunc(ResourceRegion, func(caller iaas.APICaller) interface{} {
return NewRegionOp()
})
iaas.SetClientFactoryFunc(ResourceServer, func(caller iaas.APICaller) interface{} {
return NewServerOp()
})
iaas.SetClientFactoryFunc(ResourceServerPlan, func(caller iaas.APICaller) interface{} {
return NewServerPlanOp()
})
iaas.SetClientFactoryFunc(ResourceServiceClass, func(caller iaas.APICaller) interface{} {
return NewServiceClassOp()
})
iaas.SetClientFactoryFunc(ResourceSIM, func(caller iaas.APICaller) interface{} {
return NewSIMOp()
})
iaas.SetClientFactoryFunc(ResourceSimpleMonitor, func(caller iaas.APICaller) interface{} {
return NewSimpleMonitorOp()
})
iaas.SetClientFactoryFunc(ResourceSSHKey, func(caller iaas.APICaller) interface{} {
return NewSSHKeyOp()
})
iaas.SetClientFactoryFunc(ResourceSubnet, func(caller iaas.APICaller) interface{} {
return NewSubnetOp()
})
iaas.SetClientFactoryFunc(ResourceSwitch, func(caller iaas.APICaller) interface{} {
return NewSwitchOp()
})
iaas.SetClientFactoryFunc(ResourceVPCRouter, func(caller iaas.APICaller) interface{} {
return NewVPCRouterOp()
})
iaas.SetClientFactoryFunc(ResourceZone, func(caller iaas.APICaller) interface{} {
return NewZoneOp()
})
}
/*************************************************
* ArchiveOp
*************************************************/
// ArchiveOp is fake implementation of ArchiveAPI interface
type ArchiveOp struct {
key string
}
// NewArchiveOp creates new ArchiveOp instance
func NewArchiveOp() iaas.ArchiveAPI {
return &ArchiveOp{
key: ResourceArchive,
}
}
/*************************************************
* AuthStatusOp
*************************************************/
// AuthStatusOp is fake implementation of AuthStatusAPI interface
type AuthStatusOp struct {
key string
}
// NewAuthStatusOp creates new AuthStatusOp instance
func NewAuthStatusOp() iaas.AuthStatusAPI {
return &AuthStatusOp{
key: ResourceAuthStatus,
}
}
/*************************************************
* AutoBackupOp
*************************************************/
// AutoBackupOp is fake implementation of AutoBackupAPI interface
type AutoBackupOp struct {
key string
}
// NewAutoBackupOp creates new AutoBackupOp instance
func NewAutoBackupOp() iaas.AutoBackupAPI {
return &AutoBackupOp{
key: ResourceAutoBackup,
}
}
/*************************************************
* AutoScaleOp
*************************************************/
// AutoScaleOp is fake implementation of AutoScaleAPI interface
type AutoScaleOp struct {
key string
}
// NewAutoScaleOp creates new AutoScaleOp instance
func NewAutoScaleOp() iaas.AutoScaleAPI {
return &AutoScaleOp{
key: ResourceAutoScale,
}
}
/*************************************************
* BillOp
*************************************************/
// BillOp is fake implementation of BillAPI interface
type BillOp struct {
key string
}
// NewBillOp creates new BillOp instance
func NewBillOp() iaas.BillAPI {
return &BillOp{
key: ResourceBill,
}
}
/*************************************************
* BridgeOp
*************************************************/
// BridgeOp is fake implementation of BridgeAPI interface
type BridgeOp struct {
key string
}
// NewBridgeOp creates new BridgeOp instance
func NewBridgeOp() iaas.BridgeAPI {
return &BridgeOp{
key: ResourceBridge,
}
}
/*************************************************
* CDROMOp
*************************************************/
// CDROMOp is fake implementation of CDROMAPI interface
type CDROMOp struct {
key string
}
// NewCDROMOp creates new CDROMOp instance
func NewCDROMOp() iaas.CDROMAPI {
return &CDROMOp{
key: ResourceCDROM,
}
}
/*************************************************
* CertificateAuthorityOp
*************************************************/
// CertificateAuthorityOp is fake implementation of CertificateAuthorityAPI interface
type CertificateAuthorityOp struct {
key string
}
// NewCertificateAuthorityOp creates new CertificateAuthorityOp instance
func NewCertificateAuthorityOp() iaas.CertificateAuthorityAPI {
return &CertificateAuthorityOp{
key: ResourceCertificateAuthority,
}
}
/*************************************************
* ContainerRegistryOp
*************************************************/
// ContainerRegistryOp is fake implementation of ContainerRegistryAPI interface
type ContainerRegistryOp struct {
key string
}
// NewContainerRegistryOp creates new ContainerRegistryOp instance
func NewContainerRegistryOp() iaas.ContainerRegistryAPI {
return &ContainerRegistryOp{
key: ResourceContainerRegistry,
}
}
/*************************************************
* CouponOp
*************************************************/
// CouponOp is fake implementation of CouponAPI interface
type CouponOp struct {
key string
}
// NewCouponOp creates new CouponOp instance
func NewCouponOp() iaas.CouponAPI {
return &CouponOp{
key: ResourceCoupon,
}
}
/*************************************************
* DatabaseOp
*************************************************/
// DatabaseOp is fake implementation of DatabaseAPI interface
type DatabaseOp struct {
key string
}
// NewDatabaseOp creates new DatabaseOp instance
func NewDatabaseOp() iaas.DatabaseAPI {
return &DatabaseOp{
key: ResourceDatabase,
}
}
/*************************************************
* DiskOp
*************************************************/
// DiskOp is fake implementation of DiskAPI interface
type DiskOp struct {
key string
}
// NewDiskOp creates new DiskOp instance
func NewDiskOp() iaas.DiskAPI {
return &DiskOp{
key: ResourceDisk,
}
}
/*************************************************
* DiskPlanOp
*************************************************/
// DiskPlanOp is fake implementation of DiskPlanAPI interface
type DiskPlanOp struct {
key string
}
// NewDiskPlanOp creates new DiskPlanOp instance
func NewDiskPlanOp() iaas.DiskPlanAPI {
return &DiskPlanOp{
key: ResourceDiskPlan,
}
}
/*************************************************
* DNSOp
*************************************************/
// DNSOp is fake implementation of DNSAPI interface
type DNSOp struct {
key string
}
// NewDNSOp creates new DNSOp instance
func NewDNSOp() iaas.DNSAPI {
return &DNSOp{
key: ResourceDNS,
}
}
/*************************************************
* EnhancedDBOp
*************************************************/
// EnhancedDBOp is fake implementation of EnhancedDBAPI interface
type EnhancedDBOp struct {
key string
}
// NewEnhancedDBOp creates new EnhancedDBOp instance
func NewEnhancedDBOp() iaas.EnhancedDBAPI {
return &EnhancedDBOp{
key: ResourceEnhancedDB,
}
}
/*************************************************
* ESMEOp
*************************************************/
// ESMEOp is fake implementation of ESMEAPI interface
type ESMEOp struct {
key string
}
// NewESMEOp creates new ESMEOp instance
func NewESMEOp() iaas.ESMEAPI {
return &ESMEOp{
key: ResourceESME,
}
}
/*************************************************
* GSLBOp
*************************************************/
// GSLBOp is fake implementation of GSLBAPI interface
type GSLBOp struct {
key string
}
// NewGSLBOp creates new GSLBOp instance
func NewGSLBOp() iaas.GSLBAPI {
return &GSLBOp{
key: ResourceGSLB,
}
}
/*************************************************
* IconOp
*************************************************/
// IconOp is fake implementation of IconAPI interface
type IconOp struct {
key string
}
// NewIconOp creates new IconOp instance
func NewIconOp() iaas.IconAPI {
return &IconOp{
key: ResourceIcon,
}
}
/*************************************************
* InterfaceOp
*************************************************/
// InterfaceOp is fake implementation of InterfaceAPI interface
type InterfaceOp struct {
key string
}
// NewInterfaceOp creates new InterfaceOp instance
func NewInterfaceOp() iaas.InterfaceAPI {
return &InterfaceOp{
key: ResourceInterface,
}
}
/*************************************************
* InternetOp
*************************************************/
// InternetOp is fake implementation of InternetAPI interface
type InternetOp struct {
key string
}
// NewInternetOp creates new InternetOp instance
func NewInternetOp() iaas.InternetAPI {
return &InternetOp{
key: ResourceInternet,
}
}
/*************************************************
* InternetPlanOp
*************************************************/
// InternetPlanOp is fake implementation of InternetPlanAPI interface
type InternetPlanOp struct {
key string
}
// NewInternetPlanOp creates new InternetPlanOp instance
func NewInternetPlanOp() iaas.InternetPlanAPI {
return &InternetPlanOp{
key: ResourceInternetPlan,
}
}
/*************************************************
* IPAddressOp
*************************************************/
// IPAddressOp is fake implementation of IPAddressAPI interface
type IPAddressOp struct {
key string
}
// NewIPAddressOp creates new IPAddressOp instance
func NewIPAddressOp() iaas.IPAddressAPI {
return &IPAddressOp{
key: ResourceIPAddress,
}
}
/*************************************************
* IPv6NetOp
*************************************************/
// IPv6NetOp is fake implementation of IPv6NetAPI interface
type IPv6NetOp struct {
key string
}
// NewIPv6NetOp creates new IPv6NetOp instance
func NewIPv6NetOp() iaas.IPv6NetAPI {
return &IPv6NetOp{
key: ResourceIPv6Net,
}
}
/*************************************************
* IPv6AddrOp
*************************************************/
// IPv6AddrOp is fake implementation of IPv6AddrAPI interface
type IPv6AddrOp struct {
key string
}
// NewIPv6AddrOp creates new IPv6AddrOp instance
func NewIPv6AddrOp() iaas.IPv6AddrAPI {
return &IPv6AddrOp{
key: ResourceIPv6Addr,
}
}
/*************************************************
* LicenseOp
*************************************************/
// LicenseOp is fake implementation of LicenseAPI interface
type LicenseOp struct {
key string
}
// NewLicenseOp creates new LicenseOp instance
func NewLicenseOp() iaas.LicenseAPI {
return &LicenseOp{
key: ResourceLicense,
}
}
/*************************************************
* LicenseInfoOp
*************************************************/
// LicenseInfoOp is fake implementation of LicenseInfoAPI interface
type LicenseInfoOp struct {
key string
}
// NewLicenseInfoOp creates new LicenseInfoOp instance
func NewLicenseInfoOp() iaas.LicenseInfoAPI {
return &LicenseInfoOp{
key: ResourceLicenseInfo,
}
}
/*************************************************
* LoadBalancerOp
*************************************************/
// LoadBalancerOp is fake implementation of LoadBalancerAPI interface
type LoadBalancerOp struct {
key string
}
// NewLoadBalancerOp creates new LoadBalancerOp instance
func NewLoadBalancerOp() iaas.LoadBalancerAPI {
return &LoadBalancerOp{
key: ResourceLoadBalancer,
}
}
/*************************************************
* LocalRouterOp
*************************************************/
// LocalRouterOp is fake implementation of LocalRouterAPI interface
type LocalRouterOp struct {
key string
}
// NewLocalRouterOp creates new LocalRouterOp instance
func NewLocalRouterOp() iaas.LocalRouterAPI {
return &LocalRouterOp{
key: ResourceLocalRouter,
}
}
/*************************************************
* MobileGatewayOp
*************************************************/
// MobileGatewayOp is fake implementation of MobileGatewayAPI interface
type MobileGatewayOp struct {
key string
}
// NewMobileGatewayOp creates new MobileGatewayOp instance
func NewMobileGatewayOp() iaas.MobileGatewayAPI {
return &MobileGatewayOp{
key: ResourceMobileGateway,
}
}
/*************************************************
* NFSOp
*************************************************/
// NFSOp is fake implementation of NFSAPI interface
type NFSOp struct {
key string
}
// NewNFSOp creates new NFSOp instance
func NewNFSOp() iaas.NFSAPI {
return &NFSOp{
key: ResourceNFS,
}
}
/*************************************************
* NoteOp
*************************************************/
// NoteOp is fake implementation of NoteAPI interface
type NoteOp struct {
key string
}
// NewNoteOp creates new NoteOp instance
func NewNoteOp() iaas.NoteAPI {
return &NoteOp{
key: ResourceNote,
}
}
/*************************************************
* PacketFilterOp
*************************************************/
// PacketFilterOp is fake implementation of PacketFilterAPI interface
type PacketFilterOp struct {
key string
}
// NewPacketFilterOp creates new PacketFilterOp instance
func NewPacketFilterOp() iaas.PacketFilterAPI {
return &PacketFilterOp{
key: ResourcePacketFilter,
}
}
/*************************************************
* PrivateHostOp
*************************************************/
// PrivateHostOp is fake implementation of PrivateHostAPI interface
type PrivateHostOp struct {
key string
}
// NewPrivateHostOp creates new PrivateHostOp instance
func NewPrivateHostOp() iaas.PrivateHostAPI {
return &PrivateHostOp{
key: ResourcePrivateHost,
}
}
/*************************************************
* PrivateHostPlanOp
*************************************************/
// PrivateHostPlanOp is fake implementation of PrivateHostPlanAPI interface
type PrivateHostPlanOp struct {
key string
}
// NewPrivateHostPlanOp creates new PrivateHostPlanOp instance
func NewPrivateHostPlanOp() iaas.PrivateHostPlanAPI {
return &PrivateHostPlanOp{
key: ResourcePrivateHostPlan,
}
}
/*************************************************
* ProxyLBOp
*************************************************/
// ProxyLBOp is fake implementation of ProxyLBAPI interface
type ProxyLBOp struct {
key string
}
// NewProxyLBOp creates new ProxyLBOp instance
func NewProxyLBOp() iaas.ProxyLBAPI {
return &ProxyLBOp{
key: ResourceProxyLB,
}
}
/*************************************************
* RegionOp
*************************************************/
// RegionOp is fake implementation of RegionAPI interface
type RegionOp struct {
key string
}
// NewRegionOp creates new RegionOp instance
func NewRegionOp() iaas.RegionAPI {
return &RegionOp{
key: ResourceRegion,
}
}
/*************************************************
* ServerOp
*************************************************/
// ServerOp is fake implementation of ServerAPI interface
type ServerOp struct {
key string
}
// NewServerOp creates new ServerOp instance
func NewServerOp() iaas.ServerAPI {
return &ServerOp{
key: ResourceServer,
}
}
/*************************************************
* ServerPlanOp
*************************************************/
// ServerPlanOp is fake implementation of ServerPlanAPI interface
type ServerPlanOp struct {
key string
}
// NewServerPlanOp creates new ServerPlanOp instance
func NewServerPlanOp() iaas.ServerPlanAPI {
return &ServerPlanOp{
key: ResourceServerPlan,
}
}
/*************************************************
* ServiceClassOp
*************************************************/
// ServiceClassOp is fake implementation of ServiceClassAPI interface
type ServiceClassOp struct {
key string
}
// NewServiceClassOp creates new ServiceClassOp instance
func NewServiceClassOp() iaas.ServiceClassAPI {
return &ServiceClassOp{
key: ResourceServiceClass,
}
}
/*************************************************
* SIMOp
*************************************************/
// SIMOp is fake implementation of SIMAPI interface
type SIMOp struct {
key string
}
// NewSIMOp creates new SIMOp instance
func NewSIMOp() iaas.SIMAPI {
return &SIMOp{
key: ResourceSIM,
}
}
/*************************************************
* SimpleMonitorOp
*************************************************/
// SimpleMonitorOp is fake implementation of SimpleMonitorAPI interface
type SimpleMonitorOp struct {
key string
}
// NewSimpleMonitorOp creates new SimpleMonitorOp instance
func NewSimpleMonitorOp() iaas.SimpleMonitorAPI {
return &SimpleMonitorOp{
key: ResourceSimpleMonitor,
}
}
/*************************************************
* SSHKeyOp
*************************************************/
// SSHKeyOp is fake implementation of SSHKeyAPI interface
type SSHKeyOp struct {
key string
}
// NewSSHKeyOp creates new SSHKeyOp instance
func NewSSHKeyOp() iaas.SSHKeyAPI {
return &SSHKeyOp{
key: ResourceSSHKey,
}
}
/*************************************************
* SubnetOp
*************************************************/
// SubnetOp is fake implementation of SubnetAPI interface
type SubnetOp struct {
key string
}
// NewSubnetOp creates new SubnetOp instance
func NewSubnetOp() iaas.SubnetAPI {
return &SubnetOp{
key: ResourceSubnet,
}
}
/*************************************************
* SwitchOp
*************************************************/
// SwitchOp is fake implementation of SwitchAPI interface
type SwitchOp struct {
key string
}
// NewSwitchOp creates new SwitchOp instance
func NewSwitchOp() iaas.SwitchAPI {
return &SwitchOp{
key: ResourceSwitch,
}
}
/*************************************************
* VPCRouterOp
*************************************************/
// VPCRouterOp is fake implementation of VPCRouterAPI interface
type VPCRouterOp struct {
key string
}
// NewVPCRouterOp creates new VPCRouterOp instance
func NewVPCRouterOp() iaas.VPCRouterAPI {
return &VPCRouterOp{
key: ResourceVPCRouter,
}
}
/*************************************************
* ZoneOp
*************************************************/
// ZoneOp is fake implementation of ZoneAPI interface
type ZoneOp struct {
key string
}
// NewZoneOp creates new ZoneOp instance
func NewZoneOp() iaas.ZoneAPI {
return &ZoneOp{
key: ResourceZone,
}
}