vpc_base.go 3.5 KB

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