yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/vpc_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  	"yunion.io/x/pkg/errors"
    19  
    20  	apis "yunion.io/x/cloudmux/pkg/apis/compute"
    21  	"yunion.io/x/cloudmux/pkg/cloudprovider"
    22  )
    23  
    24  type SVpc struct {
    25  	SResourceBase
    26  }
    27  
    28  func (self *SVpc) GetINatGateways() ([]cloudprovider.ICloudNatGateway, error) {
    29  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetINatGateways")
    30  }
    31  
    32  func (self *SVpc) GetICloudVpcPeeringConnections() ([]cloudprovider.ICloudVpcPeeringConnection, error) {
    33  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudVpcPeeringConnections")
    34  }
    35  
    36  func (self *SVpc) GetICloudAccepterVpcPeeringConnections() ([]cloudprovider.ICloudVpcPeeringConnection, error) {
    37  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudVpcPeeringConnections")
    38  }
    39  
    40  func (self *SVpc) GetICloudVpcPeeringConnectionById(id string) (cloudprovider.ICloudVpcPeeringConnection, error) {
    41  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudVpcPeeringConnectionById")
    42  }
    43  
    44  func (self *SVpc) CreateICloudVpcPeeringConnection(opts *cloudprovider.VpcPeeringConnectionCreateOptions) (cloudprovider.ICloudVpcPeeringConnection, error) {
    45  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateICloudVpcPeeringConnection")
    46  }
    47  
    48  func (self *SVpc) AcceptICloudVpcPeeringConnection(id string) error {
    49  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "AcceptICloudVpcPeeringConnection")
    50  }
    51  
    52  func (self *SVpc) GetAuthorityOwnerId() string {
    53  	return ""
    54  }
    55  
    56  func (self *SVpc) CreateRouteToVpcPeeringConnection(cidrBlock, peerId string) error {
    57  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateRouteToVpcPeeringConnection")
    58  }
    59  
    60  func (self *SVpc) DeleteVpcPeeringConnectionRoute(vpcPeeringConnectionId string) error {
    61  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "DeleteVpcPeeringConnectionRoute")
    62  }
    63  
    64  func (self *SVpc) ProposeJoinICloudInterVpcNetwork(opts *cloudprovider.SVpcJointInterVpcNetworkOption) error {
    65  	return errors.Wrapf(cloudprovider.ErrNotImplemented, "ProposeJoinICloudInterVpcNetwork")
    66  }
    67  
    68  func (self *SVpc) IsSupportSetExternalAccess() bool {
    69  	return false
    70  }
    71  
    72  func (self *SVpc) GetExternalAccessMode() string {
    73  	return apis.VPC_EXTERNAL_ACCESS_MODE_EIP
    74  }
    75  
    76  func (self *SVpc) AttachInternetGateway(igwId string) error {
    77  	return errors.Wrap(cloudprovider.ErrNotSupported, "AttachInternetGateway")
    78  }
    79  
    80  func (self *SVpc) CreateINatGateway(opts *cloudprovider.NatGatewayCreateOptions) (cloudprovider.ICloudNatGateway, error) {
    81  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateINatGateway")
    82  }
    83  
    84  func (self *SVpc) CreateIWire(opts *cloudprovider.SWireCreateOptions) (cloudprovider.ICloudWire, error) {
    85  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateIWire")
    86  }
    87  
    88  func (self *SVpc) GetGlobalVpcId() string {
    89  	return ""
    90  }
    91  
    92  func (self *SVpc) GetICloudIPv6Gateways() ([]cloudprovider.ICloudIPv6Gateway, error) {
    93  	return nil, errors.Wrapf(cloudprovider.ErrNotImplemented, "GetICloudIPv6Gateways")
    94  }