bug #2868: fix OpenNebula.pool_page size problem

Now OpenNebula.pool_page_size is a module method and the value is stored
in the class variable @@pool_page_size

(cherry picked from commit 21b3ac2869)
This commit is contained in:
Javi Fontan committed 2014-05-05 18:46:25 +02:00
1 parent 0083cb947a
commit 0620f1f29c
1 file changed
+6 -4
+6 -4
View File
@@ -20,7 +20,9 @@ require 'stringio'
module OpenNebula
attr_accessor :pool_page_size
def self.pool_page_size
@@pool_page_size
end
if OpenNebula::OX
class OxStreamParser < XMLRPC::XMLParser::AbstractStreamParser
@@ -68,12 +70,12 @@ module OpenNebula
if size=ENV['ONE_POOL_PAGE_SIZE']
if size.strip.match(/^\d+$/) && size.to_i >= 2
@pool_page_size = size.to_i
@@pool_page_size = size.to_i
else
@pool_page_size = nil
@@pool_page_size = nil
end
else
@pool_page_size = DEFAULT_POOL_PAGE_SIZE
@@pool_page_size = DEFAULT_POOL_PAGE_SIZE
end