baremetal_const.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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/pkg/util/sets"
  17. )
  18. const (
  19. DISK_CONF_RAID0 = "raid0"
  20. DISK_CONF_RAID1 = "raid1"
  21. DISK_CONF_RAID5 = "raid5"
  22. DISK_CONF_RAID10 = "raid10"
  23. DISK_CONF_NONE = "none"
  24. DEFAULT_DISK_CONF = DISK_CONF_NONE
  25. DEFAULT_DISK_TYPE = DISK_TYPE_ROTATE
  26. DISK_DRIVER_MEGARAID = "MegaRaid"
  27. DISK_DRIVER_LINUX = "Linux"
  28. DISK_DRIVER_HPSARAID = "HPSARaid"
  29. DISK_DRIVER_MPT2SAS = "Mpt2SAS"
  30. DISK_DRIVER_MARVELRAID = "MarvelRaid"
  31. DISK_DRIVER_ADAPTECRAID = "AdaptecRaid"
  32. DISK_DRIVER_PCIE = "PCIE"
  33. HDD_DISK_SPEC_TYPE = "HDD"
  34. SSD_DISK_SPEC_TYPE = "SSD"
  35. )
  36. var (
  37. BaremetalDefaultDiskConfig = BaremetalDiskConfig{
  38. Type: DISK_TYPE_HYBRID,
  39. Conf: DISK_CONF_NONE,
  40. Count: 0,
  41. }
  42. DISK_CONFS = sets.NewString(
  43. DISK_CONF_RAID0,
  44. DISK_CONF_RAID1,
  45. DISK_CONF_RAID5,
  46. DISK_CONF_RAID10,
  47. DISK_CONF_NONE,
  48. )
  49. DISK_DRIVERS_RAID = sets.NewString(
  50. DISK_DRIVER_MEGARAID,
  51. DISK_DRIVER_HPSARAID,
  52. DISK_DRIVER_MPT2SAS,
  53. DISK_DRIVER_MARVELRAID,
  54. DISK_DRIVER_ADAPTECRAID,
  55. )
  56. DISK_DRIVERS_SOFT_RAID = sets.NewString(
  57. DISK_DRIVER_LINUX,
  58. DISK_DRIVER_PCIE,
  59. )
  60. DISK_DRIVERS = sets.NewString(
  61. DISK_DRIVER_LINUX,
  62. DISK_DRIVER_PCIE).Union(DISK_DRIVERS_RAID)
  63. )