yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/region_base.go (about)

     1  // Copyright 2019 Yunion
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package multicloud
    16  
    17  import (
    18  	"time"
    19  
    20  	"yunion.io/x/pkg/errors"
    21  
    22  	"yunion.io/x/cloudmux/pkg/cloudprovider"
    23  )
    24  
    25  type SRegion struct {
    26  	SResourceBase
    27  	STagBase
    28  }
    29  
    30  func (r *SRegion) GetIDiskById(id string) (cloudprovider.ICloudDisk, error) {
    31  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIDiskById")
    32  }
    33  
    34  func (r *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error) {
    35  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIHostById")
    36  }
    37  
    38  func (r *SRegion) GetIHosts() ([]cloudprovider.ICloudHost, error) {
    39  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIHosts")
    40  }
    41  
    42  func (r *SRegion) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error) {
    43  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetISnapshotById")
    44  }
    45  
    46  func (r *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error) {
    47  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetISnapshots")
    48  }
    49  
    50  func (r *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error) {
    51  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIStorageById")
    52  }
    53  
    54  func (r *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error) {
    55  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIStoragecacheById")
    56  }
    57  
    58  func (r *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error) {
    59  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIStoragecaches")
    60  }
    61  
    62  func (r *SRegion) GetIStorages() ([]cloudprovider.ICloudStorage, error) {
    63  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIStorages")
    64  }
    65  
    66  func (r *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, error) {
    67  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIVMById")
    68  }
    69  
    70  func (r *SRegion) CreateSnapshotPolicy(input *cloudprovider.SnapshotPolicyInput) (string, error) {
    71  	return "", errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateSnapshotPolicy")
    72  }
    73  
    74  func (r *SRegion) UpdateSnapshotPolicy(input *cloudprovider.SnapshotPolicyInput, snapshotPolicyId string) error {
    75  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "UpdateSnapshotPolicy")
    76  }
    77  
    78  func (r *SRegion) GetISnapshotPolicyById(snapshotPolicyId string) (cloudprovider.ICloudSnapshotPolicy, error) {
    79  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetISnapshotPolicyById")
    80  }
    81  
    82  func (self *SRegion) GetISnapshotPolicies() ([]cloudprovider.ICloudSnapshotPolicy, error) {
    83  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetISnapshotPolicies")
    84  }
    85  
    86  func (self *SRegion) DeleteSnapshotPolicy(string) error {
    87  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "DeleteSnapshotPolicy")
    88  }
    89  
    90  func (self *SRegion) ApplySnapshotPolicyToDisks(snapshotPolicyId string, diskId string) error {
    91  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "ApplySnapshotPolicyToDisks")
    92  }
    93  
    94  func (self *SRegion) CancelSnapshotPolicyToDisks(snapshotPolicyId string, diskId string) error {
    95  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "CancelSnapshotPolicyToDisks")
    96  }
    97  
    98  func (self *SRegion) GetISkus() ([]cloudprovider.ICloudSku, error) {
    99  	return nil, errors.Wrapf(cloudprovider.ErrNotSupported, "GetISkus")
   100  }
   101  
   102  func (self *SRegion) CreateISku(opts *cloudprovider.SServerSkuCreateOption) (cloudprovider.ICloudSku, error) {
   103  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateISku")
   104  }
   105  
   106  func (self *SRegion) GetINetworkInterfaces() ([]cloudprovider.ICloudNetworkInterface, error) {
   107  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetINetworkInterfaces")
   108  }
   109  
   110  func (self *SRegion) GetIDBInstances() ([]cloudprovider.ICloudDBInstance, error) {
   111  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIDBInstances")
   112  }
   113  
   114  func (self *SRegion) GetIDBInstanceById(instanceId string) (cloudprovider.ICloudDBInstance, error) {
   115  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIDBInstanceById")
   116  }
   117  
   118  func (self *SRegion) GetIDBInstanceBackups() ([]cloudprovider.ICloudDBInstanceBackup, error) {
   119  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIDBInstanceBackups")
   120  }
   121  
   122  func (self *SRegion) GetIDBInstanceBackupById(backupId string) (cloudprovider.ICloudDBInstanceBackup, error) {
   123  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIDBInstanceBackupById")
   124  }
   125  
   126  func (self *SRegion) GetIElasticcaches() ([]cloudprovider.ICloudElasticcache, error) {
   127  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIElasticcaches")
   128  }
   129  
   130  func (self *SRegion) GetIElasticcacheSkus() ([]cloudprovider.ICloudElasticcacheSku, error) {
   131  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIElasticcacheSkus")
   132  }
   133  
   134  func (self *SRegion) CreateIDBInstance(desc *cloudprovider.SManagedDBInstanceCreateConfig) (cloudprovider.ICloudDBInstance, error) {
   135  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateIDBInstance")
   136  }
   137  
   138  func (self *SRegion) CreateIElasticcaches(ec *cloudprovider.SCloudElasticCacheInput) (cloudprovider.ICloudElasticcache, error) {
   139  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateIElasticcaches")
   140  }
   141  
   142  func (self *SRegion) GetIElasticcacheById(id string) (cloudprovider.ICloudElasticcache, error) {
   143  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIElasticcacheById")
   144  }
   145  
   146  func (self *SRegion) GetICloudEvents(start time.Time, end time.Time, withReadEvent bool) ([]cloudprovider.ICloudEvent, error) {
   147  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudEvents")
   148  }
   149  
   150  func (self *SRegion) GetICloudQuotas() ([]cloudprovider.ICloudQuota, error) {
   151  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudQuotas")
   152  }
   153  
   154  func (self *SRegion) CreateInternetGateway() (cloudprovider.ICloudInternetGateway, error) {
   155  	return nil, errors.Wrapf(cloudprovider.ErrNotSupported, "CreateInternetGateway")
   156  }
   157  
   158  func (self *SRegion) GetICloudFileSystems() ([]cloudprovider.ICloudFileSystem, error) {
   159  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudFileSystems")
   160  }
   161  
   162  func (self *SRegion) GetICloudFileSystemById(id string) (cloudprovider.ICloudFileSystem, error) {
   163  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudFileSystemById")
   164  }
   165  
   166  func (self *SRegion) GetICloudAccessGroups() ([]cloudprovider.ICloudAccessGroup, error) {
   167  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudAccessGroups")
   168  }
   169  
   170  func (self *SRegion) GetICloudAccessGroupById(id string) (cloudprovider.ICloudAccessGroup, error) {
   171  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudAccessGroupById")
   172  }
   173  
   174  func (self *SRegion) CreateICloudAccessGroup(opts *cloudprovider.SAccessGroup) (cloudprovider.ICloudAccessGroup, error) {
   175  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateICloudAccessGroup")
   176  }
   177  
   178  func (self *SRegion) CreateICloudFileSystem(opts *cloudprovider.FileSystemCraeteOptions) (cloudprovider.ICloudFileSystem, error) {
   179  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateICloudFileSystem")
   180  }
   181  
   182  func (self *SRegion) GetICloudWafIPSets() ([]cloudprovider.ICloudWafIPSet, error) {
   183  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudWafIPSets")
   184  }
   185  
   186  func (self *SRegion) GetICloudWafRegexSets() ([]cloudprovider.ICloudWafRegexSet, error) {
   187  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudWafRegexSets")
   188  }
   189  
   190  func (self *SRegion) GetICloudWafInstances() ([]cloudprovider.ICloudWafInstance, error) {
   191  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudWafInstances")
   192  }
   193  
   194  func (self *SRegion) GetICloudWafInstanceById(id string) (cloudprovider.ICloudWafInstance, error) {
   195  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudWafInstanceById")
   196  }
   197  
   198  func (self *SRegion) CreateICloudWafInstance(opts *cloudprovider.WafCreateOptions) (cloudprovider.ICloudWafInstance, error) {
   199  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateICloudWafInstance")
   200  }
   201  
   202  func (self *SRegion) GetICloudWafRuleGroups() ([]cloudprovider.ICloudWafRuleGroup, error) {
   203  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudWafRuleGroups")
   204  }
   205  
   206  func (self *SRegion) GetICloudMongoDBs() ([]cloudprovider.ICloudMongoDB, error) {
   207  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudMongoDBs")
   208  }
   209  
   210  func (self *SRegion) GetICloudMongoDBById(id string) (cloudprovider.ICloudMongoDB, error) {
   211  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudMongoDBById")
   212  }
   213  
   214  func (self *SRegion) GetIElasticSearchs() ([]cloudprovider.ICloudElasticSearch, error) {
   215  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIElasticSearchs")
   216  }
   217  
   218  func (self *SRegion) GetIElasticSearchById(id string) (cloudprovider.ICloudElasticSearch, error) {
   219  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIElasticSearchById")
   220  }
   221  
   222  func (self *SRegion) GetICloudKafkas() ([]cloudprovider.ICloudKafka, error) {
   223  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudKafkas")
   224  }
   225  
   226  func (self *SRegion) GetICloudKafkaById(id string) (cloudprovider.ICloudKafka, error) {
   227  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudKafkaById")
   228  }
   229  
   230  func (self *SRegion) GetICloudApps() ([]cloudprovider.ICloudApp, error) {
   231  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudApps")
   232  }
   233  
   234  func (self *SRegion) GetICloudAppById(id string) (cloudprovider.ICloudApp, error) {
   235  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudAppById")
   236  }
   237  
   238  func (self *SRegion) GetIDBInstanceSkus() ([]cloudprovider.ICloudDBInstanceSku, error) {
   239  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIDBInstanceSkus")
   240  }
   241  
   242  func (self *SRegion) GetICloudNatSkus() ([]cloudprovider.ICloudNatSku, error) {
   243  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudNatSkus")
   244  }
   245  
   246  func (self *SRegion) GetICloudKubeClusters() ([]cloudprovider.ICloudKubeCluster, error) {
   247  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudKubeClusters")
   248  }
   249  
   250  func (self *SRegion) GetICloudKubeClusterById(id string) (cloudprovider.ICloudKubeCluster, error) {
   251  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudKubeClusterById")
   252  }
   253  
   254  func (self *SRegion) GetICloudTablestores() ([]cloudprovider.ICloudTablestore, error) {
   255  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudTablestores")
   256  }
   257  
   258  type SRegionZoneBase struct {
   259  }
   260  
   261  func (self *SRegionZoneBase) GetIZones() ([]cloudprovider.ICloudZone, error) {
   262  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIZones")
   263  }
   264  
   265  func (self *SRegionZoneBase) GetIZoneById(id string) (cloudprovider.ICloudZone, error) {
   266  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIZoneById")
   267  }
   268  
   269  type SRegionVpcBase struct {
   270  }
   271  
   272  func (self *SRegionVpcBase) CreateIVpc(opts *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, error) {
   273  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateIVpc")
   274  }
   275  
   276  func (self *SRegionVpcBase) GetIVpcs() ([]cloudprovider.ICloudVpc, error) {
   277  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIVpcs")
   278  }
   279  
   280  func (self *SRegionVpcBase) GetIVpcById(id string) (cloudprovider.ICloudVpc, error) {
   281  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIVpcById")
   282  }
   283  
   284  type SRegionOssBase struct {
   285  }
   286  
   287  func (self *SRegionOssBase) CreateIBucket(name string, storageClassStr string, acl string) error {
   288  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateIBucket")
   289  }
   290  
   291  func (self *SRegionOssBase) GetIBucketById(id string) (cloudprovider.ICloudBucket, error) {
   292  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIBucketById")
   293  }
   294  
   295  func (self *SRegionOssBase) GetIBuckets() ([]cloudprovider.ICloudBucket, error) {
   296  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIBuckets")
   297  }
   298  
   299  func (self *SRegionOssBase) IBucketExist(name string) (bool, error) {
   300  	return false, cloudprovider.ErrNotImplemented
   301  }
   302  
   303  func (self *SRegionOssBase) GetIBucketByName(name string) (cloudprovider.ICloudBucket, error) {
   304  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIBucketByName")
   305  }
   306  
   307  func (self *SRegionOssBase) DeleteIBucket(name string) error {
   308  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "DeleteIBucket")
   309  }
   310  
   311  type SRegionLbBase struct {
   312  }
   313  
   314  func (self *SRegionLbBase) GetILoadBalancers() ([]cloudprovider.ICloudLoadbalancer, error) {
   315  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetILoadBalancers")
   316  }
   317  
   318  func (self *SRegionLbBase) GetILoadBalancerAcls() ([]cloudprovider.ICloudLoadbalancerAcl, error) {
   319  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetILoadBalancerAcls")
   320  }
   321  
   322  func (self *SRegionLbBase) GetILoadBalancerCertificates() ([]cloudprovider.ICloudLoadbalancerCertificate, error) {
   323  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetILoadBalancerCertificates")
   324  }
   325  
   326  func (self *SRegionLbBase) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error) {
   327  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetILoadBalancerBackendGroups")
   328  }
   329  
   330  func (self *SRegionLbBase) GetILoadBalancerById(loadbalancerId string) (cloudprovider.ICloudLoadbalancer, error) {
   331  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetILoadBalancerById")
   332  }
   333  
   334  func (self *SRegionLbBase) GetILoadBalancerAclById(aclId string) (cloudprovider.ICloudLoadbalancerAcl, error) {
   335  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetILoadBalancerAclById")
   336  }
   337  
   338  func (self *SRegionLbBase) GetILoadBalancerCertificateById(certId string) (cloudprovider.ICloudLoadbalancerCertificate, error) {
   339  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetILoadBalancerCertificateById")
   340  }
   341  
   342  func (self *SRegionLbBase) CreateILoadBalancer(loadbalancer *cloudprovider.SLoadbalancer) (cloudprovider.ICloudLoadbalancer, error) {
   343  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateLoadBalancer")
   344  }
   345  
   346  func (self *SRegionLbBase) CreateILoadBalancerAcl(acl *cloudprovider.SLoadbalancerAccessControlList) (cloudprovider.ICloudLoadbalancerAcl, error) {
   347  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateILoadBalancerAcl")
   348  }
   349  
   350  func (self *SRegionLbBase) CreateILoadBalancerCertificate(cert *cloudprovider.SLoadbalancerCertificate) (cloudprovider.ICloudLoadbalancerCertificate, error) {
   351  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateILoadBalancerCertificate")
   352  }
   353  
   354  type SRegionSecurityGroupBase struct {
   355  }
   356  
   357  func (self *SRegionSecurityGroupBase) CreateISecurityGroup(conf *cloudprovider.SecurityGroupCreateInput) (cloudprovider.ICloudSecurityGroup, error) {
   358  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateISecurityGroup")
   359  }
   360  
   361  func (self *SRegionSecurityGroupBase) GetISecurityGroupById(secgroupId string) (cloudprovider.ICloudSecurityGroup, error) {
   362  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetISecurityGroupById")
   363  }
   364  
   365  func (self *SRegionSecurityGroupBase) GetISecurityGroupByName(opts *cloudprovider.SecurityGroupFilterOptions) (cloudprovider.ICloudSecurityGroup, error) {
   366  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetISecurityGroupByName")
   367  }
   368  
   369  type SRegionEipBase struct {
   370  }
   371  
   372  func (self *SRegionEipBase) GetIEipById(id string) (cloudprovider.ICloudEIP, error) {
   373  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIEipById")
   374  }
   375  
   376  func (self *SRegionEipBase) GetIEips() ([]cloudprovider.ICloudEIP, error) {
   377  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIEips")
   378  }
   379  
   380  func (self *SRegionEipBase) CreateEIP(eip *cloudprovider.SEip) (cloudprovider.ICloudEIP, error) {
   381  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateEIP")
   382  }
   383  
   384  func (self *SRegion) GetIModelartsPools() ([]cloudprovider.ICloudModelartsPool, error) {
   385  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIModelartsPools")
   386  }
   387  
   388  func (self *SRegion) GetIModelartsPoolById(id string) (cloudprovider.ICloudModelartsPool, error) {
   389  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIModelartsPoolDetail")
   390  }
   391  
   392  func (self *SRegion) CreateIModelartsPool(pool *cloudprovider.ModelartsPoolCreateOption) (cloudprovider.ICloudModelartsPool, error) {
   393  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateIModelartsPool")
   394  }
   395  
   396  func (self *SRegion) GetIModelartsPoolSku() ([]cloudprovider.ICloudModelartsPoolSku, error) {
   397  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIModelartsPoolSku")
   398  }
   399  
   400  func (self *SRegion) GetIMiscResources() ([]cloudprovider.ICloudMiscResource, error) {
   401  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetIMiscResources")
   402  }