yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/openstack/router.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 openstack
    16  
    17  type SExternalFixedIP struct {
    18  	IPAddress string `json:"ip_address"`
    19  	SubnetId  string `json:"subnet_id"`
    20  }
    21  type SExternalGatewayInfo struct {
    22  	EnableSnat       bool               `json:"enable_snat"`
    23  	ExtrernalFiedIps []SExternalFixedIP `json:"external_fixed_ips"`
    24  	NetworkId        string             `json:"network_id"`
    25  }
    26  
    27  type SConntrackHelper struct {
    28  	Protocol string `json:"protocol"`
    29  	Helper   string `json:"helper"`
    30  	Port     int    `json:"port"`
    31  }
    32  type SRouter struct {
    33  	ports               []SPort
    34  	AdminStateUp        bool                 `json:"admin_state_up"`
    35  	Description         string               `json:"description"`
    36  	FlavorId            string               `json:"flavor_id"`
    37  	Id                  string               `json:"id"`
    38  	Name                string               `json:"name"`
    39  	Routes              []SRouteEntry        `json:"routes"`
    40  	Status              string               `json:"status"`
    41  	ProjectId           string               `json:"project_id"`
    42  	TenantId            string               `json:"tenant_id"`
    43  	Tags                []string             `json:"tags"`
    44  	ConntrackHelpers    []SConntrackHelper   `json:"conntrack_helpers"`
    45  	ExternalGatewayInfo SExternalGatewayInfo `json:"external_gateway_info"`
    46  }