opennebula 6.6.0 → 6.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ActionManager.rb +1 -1
  3. data/lib/CommandManager.rb +1 -1
  4. data/lib/DriverExecHelper.rb +1 -1
  5. data/lib/OpenNebulaDriver.rb +1 -1
  6. data/lib/VirtualMachineDriver.rb +9 -2
  7. data/lib/cloud/CloudClient.rb +3 -3
  8. data/lib/datacenter.rb +21 -25
  9. data/lib/datastore.rb +4 -4
  10. data/lib/distributed_firewall.rb +1 -1
  11. data/lib/file_helper.rb +2 -2
  12. data/lib/host.rb +1 -1
  13. data/lib/logical_port.rb +1 -1
  14. data/lib/logical_switch.rb +1 -1
  15. data/lib/memoize.rb +1 -1
  16. data/lib/models/role.rb +68 -68
  17. data/lib/models/service.rb +91 -68
  18. data/lib/models.rb +1 -1
  19. data/lib/network.rb +1 -1
  20. data/lib/nsx_client.rb +1 -1
  21. data/lib/nsx_component.rb +1 -1
  22. data/lib/nsx_constants.rb +2 -2
  23. data/lib/nsx_driver.rb +1 -1
  24. data/lib/nsx_error.rb +1 -1
  25. data/lib/nsx_rule.rb +1 -1
  26. data/lib/nsxt_client.rb +1 -1
  27. data/lib/nsxt_dfw.rb +1 -1
  28. data/lib/nsxt_logical_port.rb +1 -1
  29. data/lib/nsxt_rule.rb +1 -1
  30. data/lib/nsxt_tz.rb +1 -1
  31. data/lib/nsxv_client.rb +1 -1
  32. data/lib/nsxv_dfw.rb +1 -1
  33. data/lib/nsxv_logical_port.rb +1 -1
  34. data/lib/nsxv_rule.rb +1 -1
  35. data/lib/nsxv_tz.rb +1 -1
  36. data/lib/opaque_network.rb +1 -1
  37. data/lib/opennebula/acl.rb +1 -1
  38. data/lib/opennebula/acl_pool.rb +1 -1
  39. data/lib/opennebula/client.rb +1 -1
  40. data/lib/opennebula/cluster.rb +1 -1
  41. data/lib/opennebula/cluster_pool.rb +1 -1
  42. data/lib/opennebula/datastore.rb +1 -1
  43. data/lib/opennebula/datastore_pool.rb +1 -1
  44. data/lib/opennebula/document.rb +1 -1
  45. data/lib/opennebula/document_json.rb +1 -1
  46. data/lib/opennebula/document_pool.rb +1 -1
  47. data/lib/opennebula/document_pool_json.rb +1 -1
  48. data/lib/opennebula/error.rb +1 -1
  49. data/lib/opennebula/flow/grammar.rb +1 -1
  50. data/lib/opennebula/flow/service_pool.rb +1 -1
  51. data/lib/opennebula/flow/service_template.rb +33 -23
  52. data/lib/opennebula/flow/service_template_ext.rb +1 -1
  53. data/lib/opennebula/flow/service_template_pool.rb +1 -1
  54. data/lib/opennebula/flow/validator.rb +1 -1
  55. data/lib/opennebula/flow.rb +1 -1
  56. data/lib/opennebula/group.rb +1 -1
  57. data/lib/opennebula/group_pool.rb +1 -1
  58. data/lib/opennebula/hook.rb +1 -1
  59. data/lib/opennebula/hook_log.rb +1 -1
  60. data/lib/opennebula/hook_pool.rb +1 -1
  61. data/lib/opennebula/host.rb +1 -1
  62. data/lib/opennebula/host_pool.rb +1 -1
  63. data/lib/opennebula/image.rb +1 -1
  64. data/lib/opennebula/image_pool.rb +1 -1
  65. data/lib/opennebula/ldap_auth.rb +3 -3
  66. data/lib/opennebula/ldap_auth_spec.rb +1 -1
  67. data/lib/opennebula/lockable_ext.rb +1 -1
  68. data/lib/opennebula/marketplace.rb +1 -1
  69. data/lib/opennebula/marketplace_pool.rb +1 -1
  70. data/lib/opennebula/marketplaceapp.rb +1 -1
  71. data/lib/opennebula/marketplaceapp_ext.rb +4 -4
  72. data/lib/opennebula/marketplaceapp_pool.rb +1 -1
  73. data/lib/opennebula/oneflow_client.rb +1 -1
  74. data/lib/opennebula/pool.rb +1 -1
  75. data/lib/opennebula/pool_element.rb +1 -1
  76. data/lib/opennebula/security_group.rb +1 -1
  77. data/lib/opennebula/security_group_pool.rb +1 -1
  78. data/lib/opennebula/server_cipher_auth.rb +1 -1
  79. data/lib/opennebula/server_x509_auth.rb +1 -1
  80. data/lib/opennebula/ssh_auth.rb +1 -1
  81. data/lib/opennebula/system.rb +1 -1
  82. data/lib/opennebula/template.rb +1 -1
  83. data/lib/opennebula/template_ext.rb +3 -3
  84. data/lib/opennebula/template_pool.rb +1 -1
  85. data/lib/opennebula/user.rb +1 -1
  86. data/lib/opennebula/user_pool.rb +1 -1
  87. data/lib/opennebula/utils.rb +1 -1
  88. data/lib/opennebula/vdc.rb +1 -1
  89. data/lib/opennebula/vdc_pool.rb +1 -1
  90. data/lib/opennebula/virtual_machine.rb +12 -3
  91. data/lib/opennebula/virtual_machine_ext.rb +11 -12
  92. data/lib/opennebula/virtual_machine_pool.rb +1 -1
  93. data/lib/opennebula/virtual_network.rb +1 -1
  94. data/lib/opennebula/virtual_network_pool.rb +1 -1
  95. data/lib/opennebula/virtual_router.rb +1 -1
  96. data/lib/opennebula/virtual_router_pool.rb +1 -1
  97. data/lib/opennebula/vm_group.rb +1 -1
  98. data/lib/opennebula/vm_group_pool.rb +1 -1
  99. data/lib/opennebula/vntemplate.rb +1 -1
  100. data/lib/opennebula/vntemplate_pool.rb +1 -1
  101. data/lib/opennebula/wait_ext.rb +1 -1
  102. data/lib/opennebula/x509_auth.rb +1 -1
  103. data/lib/opennebula/xml_element.rb +1 -1
  104. data/lib/opennebula/xml_pool.rb +1 -1
  105. data/lib/opennebula/xml_utils.rb +1 -1
  106. data/lib/opennebula/zone.rb +1 -1
  107. data/lib/opennebula/zone_pool.rb +1 -1
  108. data/lib/opennebula.rb +2 -2
  109. data/lib/rest_client.rb +14 -18
  110. data/lib/scripts_common.rb +1 -1
  111. data/lib/transport_zone.rb +1 -1
  112. data/lib/vcenter_driver.rb +1 -1
  113. data/lib/vcenter_importer.rb +1 -1
  114. data/lib/vi_client.rb +65 -73
  115. data/lib/vi_helper.rb +1 -1
  116. data/lib/virtual_machine.rb +9 -3
  117. data/lib/virtual_wire.rb +1 -1
  118. data/lib/vm_disk.rb +1 -1
  119. data/lib/vm_folder.rb +1 -1
  120. data/lib/vm_helper.rb +1 -1
  121. data/lib/vm_monitor.rb +1 -1
  122. data/lib/vm_nic.rb +1 -1
  123. data/lib/vm_template.rb +1 -1
  124. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f610a3cc2a5834d258a603ccad14fe5f5a9e9df337dd9359217107d37f34cbb3
4
- data.tar.gz: 2b3366199de5e2645eb4d6fdaf4ddf61cc83bbc19695c707239e41115023853e
3
+ metadata.gz: d0911e0ad571781c4b94ee39d8459948d92ef8eb0d95aa9e06387bf402d2abd9
4
+ data.tar.gz: 98c66b223bdf54a82a8d4524288067b9b41045781ff90d4828328db18066d67f
5
5
  SHA512:
6
- metadata.gz: 83f4b0a341037d412c45d78005672e74afe753f8de770052fee086c83c77c162ce0a206b244f60198eec1d38d74dd56266481978b22e35fdfc3e53ec749a0966
7
- data.tar.gz: fda585240ab17fa73f26abba9b68db760270043c5bd2df843897a0431db9228f4d83e4fd5d57e615c9ac42c3c2339dd15ac767f6cad69a4050bccea5bcaa84c4
6
+ metadata.gz: 9fc7ce19570b9ee1c5b3047e4d0503bd7028b4cee025fd37b8c42526fbe440fb0398ca2c9ba7a803e524e4fd9415f54c971e6be8aaa16a3513df91677cb1f557
7
+ data.tar.gz: 6e39b6567ce933244ddcedb2700abb82e002ccf3ed6199b78cccd064330fd93e7774d44defa7d6901b6a9d08ffd0abc798cd17f1706088f24897d7efcaaaeef5
data/lib/ActionManager.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- */
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License"); you may */
4
4
  # not use this file except in compliance with the License. You may obtain */
5
5
  # a copy of the License at */
@@ -1,5 +1,5 @@
1
1
  # --------------------------------------------------------------------------
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may
5
5
  # not use this file except in compliance with the License. You may obtain
@@ -1,6 +1,6 @@
1
1
  # rubocop:disable Naming/FileName
2
2
  # -------------------------------------------------------------------------- #
3
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
4
4
  # #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
6
6
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -55,7 +55,8 @@ class VirtualMachineDriver < OpenNebulaDriver
55
55
  :update_conf => "UPDATECONF",
56
56
  :resize => "RESIZE",
57
57
  :backup => "BACKUP",
58
- :update_nic => "UPDATENIC"
58
+ :update_nic => "UPDATENIC",
59
+ :backup_cancel=> "BACKUPCANCEL"
59
60
  }
60
61
 
61
62
  POLL_ATTRIBUTE = OpenNebula::VirtualMachine::Driver::POLL_ATTRIBUTE
@@ -104,6 +105,7 @@ class VirtualMachineDriver < OpenNebulaDriver
104
105
  register_action(ACTION[:resize].to_sym, method("resize"))
105
106
  register_action(ACTION[:backup].to_sym, method("backup"))
106
107
  register_action(ACTION[:update_nic].to_sym, method("update_nic"))
108
+ register_action(ACTION[:backup_cancel].to_sym, method("backup_cancel"))
107
109
  end
108
110
 
109
111
  # Decodes the encoded XML driver message received from the core
@@ -248,6 +250,11 @@ class VirtualMachineDriver < OpenNebulaDriver
248
250
  send_message(ACTION[:update_nic],RESULT[:failure],id,error)
249
251
  end
250
252
 
253
+ def backup_cancel(id, drv_message)
254
+ error = "Action not implemented by driver #{self.class}"
255
+ send_message(ACTION[:backup_cancel],RESULT[:failure],id,error)
256
+ end
257
+
251
258
  private
252
259
 
253
260
  # Interface to handle the pending events from the ActionManager Interface
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -51,7 +51,7 @@ end
51
51
  module CloudClient
52
52
 
53
53
  # OpenNebula version
54
- VERSION = '6.6.0'
54
+ VERSION = '6.6.2'
55
55
 
56
56
  # #########################################################################
57
57
  # Default location for the authentication file
@@ -229,7 +229,7 @@ module CloudCLI
229
229
  def version_text
230
230
  version=<<EOT
231
231
  OpenNebula #{CloudClient::VERSION}
232
- Copyright 2002-2022, OpenNebula Project, OpenNebula Systems
232
+ Copyright 2002-2023, OpenNebula Project, OpenNebula Systems
233
233
 
234
234
  Licensed under the Apache License, Version 2.0 (the "License"); you may
235
235
  not use this file except in compliance with the License. You may obtain
data/lib/datacenter.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -929,30 +929,26 @@ module VCenterDriver
929
929
  spec.configSpec.maxMtu = mtu
930
930
 
931
931
  # The DVS must be created in the networkFolder of the datacenter
932
- begin
933
- dvs_creation_task = @item
934
- .networkFolder
935
- .CreateDVS_Task(
936
- :spec => spec
937
- )
938
- dvs_creation_task.wait_for_completion
939
-
940
- # If task finished successfuly we rename the uplink portgroup
941
- dvs = nil
942
- if dvs_creation_task.info.state == 'success'
943
- dvs = dvs_creation_task.info.result
944
- dvs
945
- .config
946
- .uplinkPortgroup[0]
947
- .Rename_Task(
948
- :newName => "#{switch_name}-uplink-pg"
949
- ).wait_for_completion
950
- else
951
- raise "The Distributed vSwitch #{switch_name} \
952
- could not be created. "
953
- end
954
- rescue StandardError => e
955
- raise e
932
+ dvs_creation_task = @item
933
+ .networkFolder
934
+ .CreateDVS_Task(
935
+ :spec => spec
936
+ )
937
+ dvs_creation_task.wait_for_completion
938
+
939
+ # If task finished successfuly we rename the uplink portgroup
940
+ dvs = nil
941
+ if dvs_creation_task.info.state == 'success'
942
+ dvs = dvs_creation_task.info.result
943
+ dvs
944
+ .config
945
+ .uplinkPortgroup[0]
946
+ .Rename_Task(
947
+ :newName => "#{switch_name}-uplink-pg"
948
+ ).wait_for_completion
949
+ else
950
+ raise "The Distributed vSwitch #{switch_name} \
951
+ could not be created. "
956
952
  end
957
953
 
958
954
  @net_rollback << {
data/lib/datastore.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -743,9 +743,9 @@ module VCenterDriver
743
743
  image_path = ''
744
744
 
745
745
  # Skip not relevant files
746
- next unless %w[FloppyImageFileInfo
747
- IsoImageFileInfo
748
- VmDiskFileInfo].include? image.class.to_s
746
+ next unless ['FloppyImageFileInfo',
747
+ 'IsoImageFileInfo',
748
+ 'VmDiskFileInfo'].include? image.class.to_s
749
749
 
750
750
  # Get image path and name
751
751
  image_path << folderpath << image.path
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/file_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -109,7 +109,7 @@ module VCenterDriver
109
109
  def self.needs_unpack?(file_path)
110
110
  type = get_type(file_path)
111
111
  type.gsub!(%r{^application/(x-)?}, '')
112
- %w[bzip2 gzip tar].include?(type)
112
+ ['bzip2', 'gzip', 'tar'].include?(type)
113
113
  end
114
114
 
115
115
  def self.vcenter_file_info(file_path)
data/lib/host.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/logical_port.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/memoize.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/models/role.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2023, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -32,26 +32,26 @@ module OpenNebula
32
32
  attr_reader :service
33
33
 
34
34
  # Actions that can be performed on the VMs of a given Role
35
- SCHEDULE_ACTIONS = %w[
36
- terminate
37
- terminate-hard
38
- undeploy
39
- undeploy-hard
40
- hold
41
- release
42
- stop
43
- suspend
44
- resume
45
- reboot
46
- reboot-hard
47
- poweroff
48
- poweroff-hard
49
- snapshot-create
50
- snapshot-revert
51
- snapshot-delete
52
- disk-snapshot-create
53
- disk-snapshot-revert
54
- disk-snapshot-delete
35
+ SCHEDULE_ACTIONS = [
36
+ 'terminate',
37
+ 'terminate-hard',
38
+ 'undeploy',
39
+ 'undeploy-hard',
40
+ 'hold',
41
+ 'release',
42
+ 'stop',
43
+ 'suspend',
44
+ 'resume',
45
+ 'reboot',
46
+ 'reboot-hard',
47
+ 'poweroff',
48
+ 'poweroff-hard',
49
+ 'snapshot-create',
50
+ 'snapshot-revert',
51
+ 'snapshot-delete',
52
+ 'disk-snapshot-create',
53
+ 'disk-snapshot-revert',
54
+ 'disk-snapshot-delete'
55
55
  ]
56
56
 
57
57
  STATE = {
@@ -69,52 +69,52 @@ module OpenNebula
69
69
  'HOLD' => 11
70
70
  }
71
71
 
72
- STATE_STR = %w[
73
- PENDING
74
- DEPLOYING
75
- RUNNING
76
- UNDEPLOYING
77
- WARNING
78
- DONE
79
- FAILED_UNDEPLOYING
80
- FAILED_DEPLOYING
81
- SCALING
82
- FAILED_SCALING
83
- COOLDOWN
84
- HOLD
72
+ STATE_STR = [
73
+ 'PENDING',
74
+ 'DEPLOYING',
75
+ 'RUNNING',
76
+ 'UNDEPLOYING',
77
+ 'WARNING',
78
+ 'DONE',
79
+ 'FAILED_UNDEPLOYING',
80
+ 'FAILED_DEPLOYING',
81
+ 'SCALING',
82
+ 'FAILED_SCALING',
83
+ 'COOLDOWN',
84
+ 'HOLD'
85
85
  ]
86
86
 
87
- RECOVER_DEPLOY_STATES = %w[
88
- FAILED_DEPLOYING
89
- DEPLOYING
90
- PENDING
87
+ RECOVER_DEPLOY_STATES = [
88
+ 'FAILED_DEPLOYING',
89
+ 'DEPLOYING',
90
+ 'PENDING'
91
91
  ]
92
92
 
93
- RECOVER_UNDEPLOY_STATES = %w[
94
- FAILED_UNDEPLOYING
95
- UNDEPLOYING
93
+ RECOVER_UNDEPLOY_STATES = [
94
+ 'FAILED_UNDEPLOYING',
95
+ 'UNDEPLOYING'
96
96
  ]
97
97
 
98
- RECOVER_SCALE_STATES = %w[
99
- FAILED_SCALING
100
- SCALING
98
+ RECOVER_SCALE_STATES = [
99
+ 'FAILED_SCALING',
100
+ 'SCALING'
101
101
  ]
102
102
 
103
- VM_FAILURE_STATES = %w[
104
- BOOT_FAILURE
105
- BOOT_MIGRATE_FAILURE
106
- PROLOG_MIGRATE_FAILURE
107
- PROLOG_FAILURE
108
- EPILOG_FAILURE
109
- EPILOG_STOP_FAILURE
110
- EPILOG_UNDEPLOY_FAILURE
111
- PROLOG_MIGRATE_POWEROFF_FAILURE
112
- PROLOG_MIGRATE_SUSPEND_FAILURE
113
- PROLOG_MIGRATE_UNKNOWN_FAILURE
114
- BOOT_UNDEPLOY_FAILURE
115
- BOOT_STOPPED_FAILURE
116
- PROLOG_RESUME_FAILURE
117
- PROLOG_UNDEPLOY_FAILURE
103
+ VM_FAILURE_STATES = [
104
+ 'BOOT_FAILURE',
105
+ 'BOOT_MIGRATE_FAILURE',
106
+ 'PROLOG_MIGRATE_FAILURE',
107
+ 'PROLOG_FAILURE',
108
+ 'EPILOG_FAILURE',
109
+ 'EPILOG_STOP_FAILURE',
110
+ 'EPILOG_UNDEPLOY_FAILURE',
111
+ 'PROLOG_MIGRATE_POWEROFF_FAILURE',
112
+ 'PROLOG_MIGRATE_SUSPEND_FAILURE',
113
+ 'PROLOG_MIGRATE_UNKNOWN_FAILURE',
114
+ 'BOOT_UNDEPLOY_FAILURE',
115
+ 'BOOT_STOPPED_FAILURE',
116
+ 'PROLOG_RESUME_FAILURE',
117
+ 'PROLOG_UNDEPLOY_FAILURE'
118
118
  ]
119
119
 
120
120
  SCALE_WAYS = {
@@ -129,17 +129,17 @@ module OpenNebula
129
129
  # parents: this has only sense in deploy operation
130
130
  # state: this is internal information managed by OneFlow server
131
131
  # vm_template: this will affect scale operation
132
- IMMUTABLE_ATTRS = %w[
133
- cardinality
134
- last_vmname
135
- nodes
136
- parents
137
- state
138
- vm_template
132
+ IMMUTABLE_ATTRS = [
133
+ 'cardinality',
134
+ 'last_vmname',
135
+ 'nodes',
136
+ 'parents',
137
+ 'state',
138
+ 'vm_template'
139
139
  ]
140
140
 
141
141
  # VM information to save in document
142
- VM_INFO = %w[ID UID GID UNAME GNAME NAME]
142
+ VM_INFO = ['ID', 'UID', 'GID', 'UNAME', 'GNAME', 'NAME']
143
143
 
144
144
  LOG_COMP = 'ROL'
145
145
 
@@ -1125,7 +1125,7 @@ module OpenNebula
1125
1125
  # Min is a hard limit, if the current cardinality + adjustment does
1126
1126
  # not reach it, the difference is added
1127
1127
 
1128
- max = [cardinality, max_cardinality.to_i].max()
1128
+ max = [cardinality, max_cardinality.to_i].max
1129
1129
  # min = [cardinality(), min_cardinality.to_i].min()
1130
1130
  min = min_cardinality.to_i
1131
1131