reservedip.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 compute
  15. import (
  16. "yunion.io/x/onecloud/pkg/apis"
  17. )
  18. const (
  19. RESERVEDIP_TABLE = "reservedips_tbl"
  20. RESERVEDIP_RESOURCE_TYPE = "reservedip"
  21. RESERVEDIP_RESOURCE_TYPES = "reservedips"
  22. RESERVEDIP_STATUS_ONLINE = "online"
  23. RESERVEDIP_STATUS_OFFLINE = "offline"
  24. RESERVEDIP_STATUS_UNKNOWN = "unknown"
  25. )
  26. type ReservedipListInput struct {
  27. apis.ResourceBaseListInput
  28. NetworkFilterListInput
  29. // list all reserved ips, including expired ones
  30. All *bool `json:"all"`
  31. // ip_addr
  32. IpAddr []string `json:"ip_addr"`
  33. // 状态
  34. Status []string `json:"status"`
  35. }
  36. type ReservedipDetails struct {
  37. apis.ResourceBaseDetails
  38. NetworkResourceInfo
  39. SReservedip
  40. // 是否过期
  41. Expired bool `json:"expired"`
  42. }