egi-fedcloud-vmhound 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 318e4b960de7c33ef26bdc80d47b2549e7990540
4
- data.tar.gz: 6443cbdf45d2a17a90a73a5b7a0c0419a1641247
3
+ metadata.gz: 59f9e2aa22326c3b20d57eebdd6a6c9c20af61a7
4
+ data.tar.gz: e748665d3c1ae05c2864a18232a32d2d5bfcef7c
5
5
  SHA512:
6
- metadata.gz: eb7997567ebd5f0c68f917ee1d3503581dec6aa2fc0776f900eab238ef4048710ba04db6937788f3fcc80afbd4abb97867e61e2df6725af93878cc1df3a41d35
7
- data.tar.gz: 7fdda488d9ce49582c2b114b7b9280f37601749d74069e2a5af406cf70c5ac60c91f8a8ff3fa1be2c99871841210ee73ba7327c4a4bcab6bcb231269f7a454eb
6
+ metadata.gz: 7a414b844fc63a5a503e7d937561592042b4140dda21cc2b64bf7f5da8b01c9e2af90477a647ebbf3e788ec1dbccec201b533962689c951e4c5bf4ccb599d96a
7
+ data.tar.gz: 362e9c383857a3ca285535e015d5980c4a1bc8fafc571138e142f13d9da9fa809e2698fc74b4a06aad1e9ffbcbc90741355869eeef006aaa7fe41ea1d2be507b
@@ -3,9 +3,6 @@ require 'opennebula'
3
3
  #
4
4
  class Egi::Fedcloud::Vmhound::Connectors::OpennebulaConnector < Egi::Fedcloud::Vmhound::Connectors::BaseConnector
5
5
 
6
- # Number of VMs to process in one iteration
7
- VM_POOL_BATCH_SIZE = 10000
8
-
9
6
  # Initializes a connector instance.
10
7
  #
11
8
  # @param opts [Hash] options for the connector
@@ -97,28 +94,16 @@ class Egi::Fedcloud::Vmhound::Connectors::OpennebulaConnector < Egi::Fedcloud::V
97
94
  def instances_batch_pool(vm_pool)
98
95
  fail 'Pool object not provided!' unless vm_pool
99
96
  Egi::Fedcloud::Vmhound::Log.debug "[#{self.class}] Iterating over the VM " \
100
- "pool with batch size #{VM_POOL_BATCH_SIZE}"
101
-
102
- batch_start = 0
103
- batch_stop = VM_POOL_BATCH_SIZE - 1
104
- vm_pool_ary = []
105
-
106
- begin
107
- Egi::Fedcloud::Vmhound::Log.debug "[#{self.class}] Getting #{batch_start} to #{batch_stop}"
108
- check_retval vm_pool.info(
109
- OpenNebula::VirtualMachinePool::INFO_ALL,
110
- batch_start, batch_stop,
111
- OpenNebula::VirtualMachinePool::INFO_NOT_DONE
112
- )
113
- Egi::Fedcloud::Vmhound::Log.debug "[#{self.class}] Got #{vm_pool.count.inspect} VMs from pool"
114
- vm_pool_ary.concat vm_pool.to_a unless vm_pool.count < 1
115
-
116
- batch_start = batch_stop + 1
117
- batch_stop += VM_POOL_BATCH_SIZE
118
- end until vm_pool.count < 1
119
-
120
- vm_pool_ary.compact!
121
- vm_pool_ary
97
+ "pool without batch processing"
98
+
99
+ check_retval vm_pool.info(
100
+ OpenNebula::VirtualMachinePool::INFO_ALL,
101
+ -1, -1,
102
+ OpenNebula::VirtualMachinePool::INFO_NOT_DONE
103
+ )
104
+ Egi::Fedcloud::Vmhound::Log.debug "[#{self.class}] Got #{vm_pool.count.inspect} VMs from pool"
105
+
106
+ vm_pool.to_a
122
107
  end
123
108
 
124
109
  # Retrieves a list of images.
@@ -2,7 +2,7 @@ module Egi
2
2
  module Fedcloud
3
3
  module Vmhound
4
4
  # Versioning constant
5
- VERSION = "0.0.2" unless defined?(::Egi::Fedcloud::Vmhound::VERSION)
5
+ VERSION = "0.0.3" unless defined?(::Egi::Fedcloud::Vmhound::VERSION)
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egi-fedcloud-vmhound
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Parak