vmware.pp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # Configure the VMware compute driver for nova.
  3. #
  4. # === Parameters
  5. #
  6. # [*host_ip*]
  7. # The IP address of the VMware vCenter server.
  8. #
  9. # [*host_username*]
  10. # The username for connection to VMware vCenter server.
  11. #
  12. # [*host_password*]
  13. # The password for connection to VMware vCenter server.
  14. #
  15. # [*cluster_name*]
  16. # The name of a vCenter cluster compute resource.
  17. #
  18. # [*api_retry_count*]
  19. # (optional) The number of times we retry on failures,
  20. # e.g., socket error, etc.
  21. # Defaults to 5.
  22. #
  23. # [*maximum_objects*]
  24. # (optional) The maximum number of ObjectContent data objects that should
  25. # be returned in a single result. A positive value will cause
  26. # the operation to suspend the retrieval when the count of
  27. # objects reaches the specified maximum. The server may still
  28. # limit the count to something less than the configured value.
  29. # Any remaining objects may be retrieved with additional requests.
  30. # Defaults to 100.
  31. #
  32. # [*task_poll_interval*]
  33. # (optional) The interval in seconds used for polling of remote tasks.
  34. # Defaults to 5.0
  35. #
  36. # [*use_linked_clone*]
  37. # (optional) Whether to use linked clone strategy while creating VM's.
  38. # Defaults to true.
  39. #
  40. # [*compute_driver*]
  41. # (optional) Compute driver.
  42. # Defaults to 'vmwareapi.VMwareVCDriver'
  43. #
  44. # [*insecure*]
  45. # (optional) Allow insecure conections.
  46. # If true, the vCenter server certificate is not verified. If
  47. # false, then the default CA truststore is used for verification. This
  48. # option is ignored if 'ca_file' is set.
  49. # Defaults to $::os_service_default
  50. #
  51. # [*ca_file*]
  52. # (optional) Specify a CA bundle file to use in verifying the vCenter server
  53. # certificate.
  54. # Defaults to $::os_service_default
  55. #
  56. # [*datastore_regex*]
  57. # (optional) Regex to match the name of a datastore.
  58. # Defaults to $::os_service_default
  59. #
  60. # DEPRECATED PARAMETERS
  61. # [*wsdl_location*]
  62. # (optional) VIM Service WSDL Location e.g
  63. # http://<server>/vimService.wsdl. Optional over-ride to
  64. # default location for bug work-arounds.
  65. # Defaults to undef
  66. #
  67. class nova::compute::vmware(
  68. $host_ip,
  69. $host_username,
  70. $host_password,
  71. $cluster_name,
  72. $api_retry_count = 5,
  73. $maximum_objects = 100,
  74. $task_poll_interval = 5.0,
  75. $use_linked_clone = true,
  76. $compute_driver = 'vmwareapi.VMwareVCDriver',
  77. $insecure = $::os_service_default,
  78. $ca_file = $::os_service_default,
  79. $datastore_regex = $::os_service_default,
  80. # DEPRECATED PARAMETERS
  81. $wsdl_location = undef,
  82. ) {
  83. include ::nova::deps
  84. if $wsdl_location {
  85. warning('wsdl_location is deprecated, has no effect and will be removed in the future release.')
  86. }
  87. nova_config {
  88. 'DEFAULT/compute_driver': value => $compute_driver;
  89. 'vmware/host_ip': value => $host_ip;
  90. 'vmware/host_username': value => $host_username;
  91. 'vmware/host_password': value => $host_password;
  92. 'vmware/cluster_name': value => $cluster_name;
  93. 'vmware/api_retry_count': value => $api_retry_count;
  94. 'vmware/maximum_objects': value => $maximum_objects;
  95. 'vmware/task_poll_interval': value => $task_poll_interval;
  96. 'vmware/use_linked_clone': value => $use_linked_clone;
  97. 'vmware/insecure': value => $insecure;
  98. 'vmware/ca_file': value => $ca_file;
  99. 'vmware/datastore_regex': value => $datastore_regex;
  100. }
  101. package { 'python-suds':
  102. ensure => present,
  103. tag => ['openstack', 'nova-support-package'],
  104. }
  105. }