router.go 1.8 KB

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