service_catalog.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. type ServiceCatalogCreateInput struct {
  19. apis.SharableVirtualResourceCreateInput
  20. // description: service catalog icon url
  21. // example: https://yunion.io/files/hello.png
  22. IconUrl string `json:"icon_url"`
  23. // description: the id or name of guest template
  24. // example: good
  25. // required: true
  26. GuestTemplate string `json:"guest_template"`
  27. }
  28. type ServiceCatalogUpdateInput struct {
  29. // description: resource name
  30. // unique: true
  31. // example: test-network
  32. Name string `json:"name"`
  33. // description: service catalog icon url
  34. // example: https://yunion.io/files/hello.png
  35. IconUrl string `json:"icon_url"`
  36. // description: the id or name of guest template
  37. // example: good
  38. GuestTemplate string `json:"guest_template"`
  39. }
  40. type ServiceCatalogDeploy struct {
  41. // description: name of the new vm
  42. // example: hello
  43. Name string `json:"name"`
  44. // description: generate name automatically if name is repeated, and only one of name and this shoudle be given
  45. // example: hello
  46. GenerateName string `json:"generate_name"`
  47. // description: the count of the new vm
  48. // example: 1
  49. Count int `json:"count"`
  50. }
  51. type ServiceCatalogDetails struct {
  52. apis.SharableVirtualResourceDetails
  53. SServiceCatalog
  54. }