yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/aws/internetgateway.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 aws
    16  
    17  import (
    18  	"github.com/pkg/errors"
    19  
    20  	"yunion.io/x/cloudmux/pkg/cloudprovider"
    21  	"yunion.io/x/cloudmux/pkg/multicloud"
    22  )
    23  
    24  type SInternetGateway struct {
    25  	multicloud.SResourceBase
    26  	AwsTags
    27  	region *SRegion
    28  
    29  	Attachments       []InternetGatewayAttachment `json:"Attachments"`
    30  	InternetGatewayID string                      `json:"InternetGatewayId"`
    31  	OwnerID           string                      `json:"OwnerId"`
    32  }
    33  
    34  type InternetGatewayAttachment struct {
    35  	State string `json:"State"`
    36  	VpcID string `json:"VpcId"`
    37  }
    38  
    39  func (i *SInternetGateway) GetId() string {
    40  	return i.InternetGatewayID
    41  }
    42  
    43  func (i *SInternetGateway) GetName() string {
    44  	return i.InternetGatewayID
    45  }
    46  
    47  func (i *SInternetGateway) GetGlobalId() string {
    48  	return i.GetId()
    49  }
    50  
    51  func (i *SInternetGateway) GetStatus() string {
    52  	return ""
    53  }
    54  
    55  func (i *SInternetGateway) Refresh() error {
    56  	return errors.Wrap(cloudprovider.ErrNotImplemented, "Refresh")
    57  }
    58  
    59  func (i *SInternetGateway) IsEmulated() bool {
    60  	return false
    61  }