opennebula 6.4.5 → 6.4.7
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.
- checksums.yaml +4 -4
 - data/lib/DriverExecHelper.rb +2 -6
 - data/lib/cloud/CloudClient.rb +1 -1
 - data/lib/models/role.rb +2 -2
 - data/lib/opennebula/client.rb +2 -2
 - data/lib/opennebula/flow/service_template_ext.rb +0 -1
 - data/lib/opennebula/ldap_auth.rb +2 -2
 - data/lib/opennebula/oneflow_client.rb +7 -4
 - data/lib/opennebula/x509_auth.rb +1 -1
 - data/lib/opennebula.rb +1 -1
 - data/lib/rest_client.rb +1 -7
 - data/lib/scripts_common.rb +0 -3
 - data/lib/vi_client.rb +3 -3
 - data/lib/virtual_machine.rb +1 -1
 - data/lib/vm_template.rb +1 -6
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 9d048a90dea6b3ccdfa45f6d820c6c59d65f138b1d42519daca95fa830017323
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 333007092b7549bc5a39bb199b36fedf9558fe2b08ad7a26675776bc726bc05d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: e2f7beeed1c49aba665faa4f8b114fd2f41490d9d38de595f5b7d4bbfaf0b429dc2a4ff0197a367b8211666aefaffd0d80d88be9c8d00c1d40e114b7d7594639
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a719996efc874204a23a4a6d86941dc4ae8591afb8d7003841126ebee8adec7a584de2302bf6764255093a609c1c97d4169ee87f1e3d8639f047b1f8f75b894d
         
     | 
    
        data/lib/DriverExecHelper.rb
    CHANGED
    
    | 
         @@ -68,9 +68,7 @@ module DriverExecHelper 
     | 
|
| 
       68 
68 
     | 
    
         
             
                # @param [String, nil] default_name alternative name for the script
         
     | 
| 
       69 
69 
     | 
    
         
             
                # @param [String, ''] directory to append to the scripts path for actions
         
     | 
| 
       70 
70 
     | 
    
         
             
                # @return [String] command line needed to execute the action
         
     | 
| 
       71 
     | 
    
         
            -
                def action_command_line(action, parameters,
         
     | 
| 
       72 
     | 
    
         
            -
                                        default_name = nil, directory = '')
         
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
      
 71 
     | 
    
         
            +
                def action_command_line(action, parameters, default_name = nil, directory = '')
         
     | 
| 
       74 
72 
     | 
    
         
             
                    if action.is_a?(String) && action[0] == '/'
         
     | 
| 
       75 
73 
     | 
    
         
             
                        return action + ' ' + parameters if parameters
         
     | 
| 
       76 
74 
     | 
    
         | 
| 
         @@ -111,9 +109,7 @@ module DriverExecHelper 
     | 
|
| 
       111 
109 
     | 
    
         
             
                #
         
     | 
| 
       112 
110 
     | 
    
         
             
                # Sends a message to the OpenNebula core through stdout
         
     | 
| 
       113 
111 
     | 
    
         
             
                # rubocop:disable Metrics/ParameterLists
         
     | 
| 
       114 
     | 
    
         
            -
                def send_message(action = '-', result = RESULT[:failure],
         
     | 
| 
       115 
     | 
    
         
            -
                                 id = '-', info = '-')
         
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
      
 112 
     | 
    
         
            +
                def send_message(action = '-', result = RESULT[:failure], id = '-', info = '-')
         
     | 
| 
       117 
113 
     | 
    
         
             
                    @send_mutex.synchronize do
         
     | 
| 
       118 
114 
     | 
    
         
             
                        STDOUT.puts "#{action} #{result} #{id} #{info}"
         
     | 
| 
       119 
115 
     | 
    
         
             
                        STDOUT.flush
         
     | 
    
        data/lib/cloud/CloudClient.rb
    CHANGED
    
    
    
        data/lib/models/role.rb
    CHANGED
    
    | 
         @@ -634,8 +634,8 @@ module OpenNebula 
     | 
|
| 
       634 
634 
     | 
    
         
             
                            return OpenNebula::Error.new("Role #{name} is in DONE state")
         
     | 
| 
       635 
635 
     | 
    
         
             
                        end
         
     | 
| 
       636 
636 
     | 
    
         | 
| 
       637 
     | 
    
         
            -
                        do_offset =  
     | 
| 
       638 
     | 
    
         
            -
             
     | 
| 
      
 637 
     | 
    
         
            +
                        do_offset = !period.nil? && period.to_i > 0 &&
         
     | 
| 
      
 638 
     | 
    
         
            +
                                    !vms_per_period.nil? && vms_per_period.to_i > 0
         
     | 
| 
       639 
639 
     | 
    
         | 
| 
       640 
640 
     | 
    
         
             
                        nodes.each_with_index do |node, index|
         
     | 
| 
       641 
641 
     | 
    
         
             
                            vm_id = node['deploy_id']
         
     | 
    
        data/lib/opennebula/client.rb
    CHANGED
    
    | 
         @@ -140,9 +140,9 @@ module OpenNebula 
     | 
|
| 
       140 
140 
     | 
    
         
             
                            @one_endpoint = endpoint
         
     | 
| 
       141 
141 
     | 
    
         
             
                        elsif ENV["ONE_XMLRPC"]
         
     | 
| 
       142 
142 
     | 
    
         
             
                            @one_endpoint = ENV["ONE_XMLRPC"]
         
     | 
| 
       143 
     | 
    
         
            -
                        elsif ENV['HOME'] and File. 
     | 
| 
      
 143 
     | 
    
         
            +
                        elsif ENV['HOME'] and File.exist?(ENV['HOME']+"/.one/one_endpoint")
         
     | 
| 
       144 
144 
     | 
    
         
             
                            @one_endpoint = File.read(ENV['HOME']+"/.one/one_endpoint")
         
     | 
| 
       145 
     | 
    
         
            -
                        elsif File. 
     | 
| 
      
 145 
     | 
    
         
            +
                        elsif File.exist?("/var/lib/one/.one/one_endpoint")
         
     | 
| 
       146 
146 
     | 
    
         
             
                            @one_endpoint = File.read("/var/lib/one/.one/one_endpoint")
         
     | 
| 
       147 
147 
     | 
    
         
             
                        else
         
     | 
| 
       148 
148 
     | 
    
         
             
                            @one_endpoint = "http://localhost:2633/RPC2"
         
     | 
| 
         @@ -38,7 +38,6 @@ module OpenNebula::ServiceTemplateExt 
     | 
|
| 
       38 
38 
     | 
    
         
             
                        # @param market_id [Integer] Marketplace ID to import app
         
     | 
| 
       39 
39 
     | 
    
         
             
                        # @param name      [String]  Service Template App name
         
     | 
| 
       40 
40 
     | 
    
         
             
                        def mp_import(templates, market_id, name)
         
     | 
| 
       41 
     | 
    
         
            -
                            template = ''
         
     | 
| 
       42 
41 
     | 
    
         
             
                            name   ||= "#{@body['name']}-#{SecureRandom.hex[0..9]}"
         
     | 
| 
       43 
42 
     | 
    
         | 
| 
       44 
43 
     | 
    
         
             
                            template = <<-EOT
         
     | 
    
        data/lib/opennebula/ldap_auth.rb
    CHANGED
    
    | 
         @@ -89,7 +89,7 @@ class OpenNebula::LdapAuth 
     | 
|
| 
       89 
89 
     | 
    
         
             
                    file=@options[:mapping_file_path]
         
     | 
| 
       90 
90 
     | 
    
         
             
                    generate = false
         
     | 
| 
       91 
91 
     | 
    
         | 
| 
       92 
     | 
    
         
            -
                    if File. 
     | 
| 
      
 92 
     | 
    
         
            +
                    if File.exist?(file)
         
     | 
| 
       93 
93 
     | 
    
         
             
                        stat = File.stat(file)
         
     | 
| 
       94 
94 
     | 
    
         
             
                        age = Time.now.to_i - stat.mtime.to_i
         
     | 
| 
       95 
95 
     | 
    
         
             
                        generate = true if age > @options[:mapping_timeout]
         
     | 
| 
         @@ -124,7 +124,7 @@ class OpenNebula::LdapAuth 
     | 
|
| 
       124 
124 
     | 
    
         | 
| 
       125 
125 
     | 
    
         
             
                    @mapping = {}
         
     | 
| 
       126 
126 
     | 
    
         | 
| 
       127 
     | 
    
         
            -
                    if File. 
     | 
| 
      
 127 
     | 
    
         
            +
                    if File.exist?(file)
         
     | 
| 
       128 
128 
     | 
    
         
             
                        @mapping = YAML.load(File.read(file))
         
     | 
| 
       129 
129 
     | 
    
         
             
                    end
         
     | 
| 
       130 
130 
     | 
    
         | 
| 
         @@ -339,9 +339,9 @@ module Service 
     | 
|
| 
       339 
339 
     | 
    
         
             
                            url = opts[:url]
         
     | 
| 
       340 
340 
     | 
    
         
             
                        elsif ENV['ONEFLOW_URL']
         
     | 
| 
       341 
341 
     | 
    
         
             
                            url = ENV['ONEFLOW_URL']
         
     | 
| 
       342 
     | 
    
         
            -
                        elsif ENV['HOME'] && File. 
     | 
| 
      
 342 
     | 
    
         
            +
                        elsif ENV['HOME'] && File.exist?(ENV['HOME'] + endpoint)
         
     | 
| 
       343 
343 
     | 
    
         
             
                            url = File.read(ENV['HOME'] + endpoint).strip
         
     | 
| 
       344 
     | 
    
         
            -
                        elsif File. 
     | 
| 
      
 344 
     | 
    
         
            +
                        elsif File.exist?('/var/lib/one/.one/oneflow_endpoint')
         
     | 
| 
       345 
345 
     | 
    
         
             
                            url = File.read('/var/lib/one/.one/oneflow_endpoint').strip
         
     | 
| 
       346 
346 
     | 
    
         
             
                        else
         
     | 
| 
       347 
347 
     | 
    
         
             
                            url = 'http://localhost:2474'
         
     | 
| 
         @@ -454,11 +454,14 @@ module Service 
     | 
|
| 
       454 
454 
     | 
    
         | 
| 
       455 
455 
     | 
    
         
             
                        req['User-Agent'] = @user_agent
         
     | 
| 
       456 
456 
     | 
    
         | 
| 
       457 
     | 
    
         
            -
                         
     | 
| 
      
 457 
     | 
    
         
            +
                        if !@uri.path.nil?
         
     | 
| 
      
 458 
     | 
    
         
            +
                            req.instance_variable_set(:@path, @uri.path + req.path)
         
     | 
| 
      
 459 
     | 
    
         
            +
                        end
         
     | 
| 
      
 460 
     | 
    
         
            +
             
     | 
| 
      
 461 
     | 
    
         
            +
                        CloudClient.http_start(@uri, @timeout) do |http|
         
     | 
| 
       458 
462 
     | 
    
         
             
                            http.request(req)
         
     | 
| 
       459 
463 
     | 
    
         
             
                        end
         
     | 
| 
       460 
464 
     | 
    
         | 
| 
       461 
     | 
    
         
            -
                        res
         
     | 
| 
       462 
465 
     | 
    
         
             
                    end
         
     | 
| 
       463 
466 
     | 
    
         
             
                end
         
     | 
| 
       464 
467 
     | 
    
         
             
            end
         
     | 
    
        data/lib/opennebula/x509_auth.rb
    CHANGED
    
    
    
        data/lib/opennebula.rb
    CHANGED
    
    
    
        data/lib/rest_client.rb
    CHANGED
    
    | 
         @@ -86,13 +86,7 @@ module VCenterDriver 
     | 
|
| 
       86 
86 
     | 
    
         
             
                        new(connection)
         
     | 
| 
       87 
87 
     | 
    
         
             
                    end
         
     | 
| 
       88 
88 
     | 
    
         | 
| 
       89 
     | 
    
         
            -
                    def get_or_create_tag(
         
     | 
| 
       90 
     | 
    
         
            -
                        api_client,
         
     | 
| 
       91 
     | 
    
         
            -
                        category_id,
         
     | 
| 
       92 
     | 
    
         
            -
                        tag_name,
         
     | 
| 
       93 
     | 
    
         
            -
                        tag_description
         
     | 
| 
       94 
     | 
    
         
            -
                    )
         
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
      
 89 
     | 
    
         
            +
                    def get_or_create_tag(api_client, category_id, tag_name, tag_description)
         
     | 
| 
       96 
90 
     | 
    
         
             
                        tag_api = VSphereAutomation::CIS::TaggingTagApi.new(api_client)
         
     | 
| 
       97 
91 
     | 
    
         
             
                        tag = tag_api.list.value.find do |id|
         
     | 
| 
       98 
92 
     | 
    
         
             
                            c = tag_api.get(id).value
         
     | 
    
        data/lib/scripts_common.rb
    CHANGED
    
    
    
        data/lib/vi_client.rb
    CHANGED
    
    | 
         @@ -239,8 +239,8 @@ module VCenterDriver 
     | 
|
| 
       239 
239 
     | 
    
         
             
                        begin
         
     | 
| 
       240 
240 
     | 
    
         
             
                            orig_stderr = $stderr.clone
         
     | 
| 
       241 
241 
     | 
    
         
             
                            orig_stdout = $stdout.clone
         
     | 
| 
       242 
     | 
    
         
            -
                            $stderr.reopen File.new( 
     | 
| 
       243 
     | 
    
         
            -
                            $stdout.reopen File.new( 
     | 
| 
      
 242 
     | 
    
         
            +
                            $stderr.reopen File.new(File::NULL, 'w')
         
     | 
| 
      
 243 
     | 
    
         
            +
                            $stdout.reopen File.new(File::NULL, 'w')
         
     | 
| 
       244 
244 
     | 
    
         
             
                            retval = yield
         
     | 
| 
       245 
245 
     | 
    
         
             
                        rescue StandardError => e
         
     | 
| 
       246 
246 
     | 
    
         
             
                            $stdout.reopen orig_stdout
         
     | 
| 
         @@ -256,7 +256,7 @@ module VCenterDriver 
     | 
|
| 
       256 
256 
     | 
    
         
             
                    def self.in_stderr_silence
         
     | 
| 
       257 
257 
     | 
    
         
             
                        begin
         
     | 
| 
       258 
258 
     | 
    
         
             
                            orig_stderr = $stderr.clone
         
     | 
| 
       259 
     | 
    
         
            -
                            $stderr.reopen File.new( 
     | 
| 
      
 259 
     | 
    
         
            +
                            $stderr.reopen File.new(File::NULL, 'w')
         
     | 
| 
       260 
260 
     | 
    
         
             
                            retval = yield
         
     | 
| 
       261 
261 
     | 
    
         
             
                        rescue StandardError => e
         
     | 
| 
       262 
262 
     | 
    
         
             
                            $stderr.reopen orig_stderr
         
     | 
    
        data/lib/virtual_machine.rb
    CHANGED
    
    | 
         @@ -2720,7 +2720,7 @@ end 
     | 
|
| 
       2720 
2720 
     | 
    
         
             
                        img_name = VCenterDriver::FileHelper.unescape_path(img_name_escaped)
         
     | 
| 
       2721 
2721 
     | 
    
         | 
| 
       2722 
2722 
     | 
    
         
             
                        vc_disks.each do |d|
         
     | 
| 
       2723 
     | 
    
         
            -
                            key_matches  =  
     | 
| 
      
 2723 
     | 
    
         
            +
                            key_matches  = unmanaged_key && d[:key] == unmanaged_key.to_i
         
     | 
| 
       2724 
2724 
     | 
    
         
             
                            path_matches = (d[:path_wo_ds] == img_name)
         
     | 
| 
       2725 
2725 
     | 
    
         | 
| 
       2726 
2726 
     | 
    
         
             
                            if key_matches || path_matches
         
     | 
    
        data/lib/vm_template.rb
    CHANGED
    
    | 
         @@ -1117,12 +1117,7 @@ module VCenterDriver 
     | 
|
| 
       1117 
1117 
     | 
    
         
             
                        one_vn
         
     | 
| 
       1118 
1118 
     | 
    
         
             
                    end
         
     | 
| 
       1119 
1119 
     | 
    
         | 
| 
       1120 
     | 
    
         
            -
                    def import_vcenter_nics(
         
     | 
| 
       1121 
     | 
    
         
            -
                        opts,
         
     | 
| 
       1122 
     | 
    
         
            -
                        vm_id = nil,
         
     | 
| 
       1123 
     | 
    
         
            -
                        dc_name = nil
         
     | 
| 
       1124 
     | 
    
         
            -
                    )
         
     | 
| 
       1125 
     | 
    
         
            -
             
     | 
| 
      
 1120 
     | 
    
         
            +
                    def import_vcenter_nics(opts, vm_id = nil, dc_name = nil)
         
     | 
| 
       1126 
1121 
     | 
    
         
             
                        vi_client = opts[:vi_client]
         
     | 
| 
       1127 
1122 
     | 
    
         
             
                        vc_uuid = opts[:vc_uuid]
         
     | 
| 
       1128 
1123 
     | 
    
         
             
                        npool = opts[:npool]
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: opennebula
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 6.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 6.4.7
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - OpenNebula
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-12-10 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: nokogiri
         
     | 
| 
         @@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       259 
259 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       260 
260 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       261 
261 
     | 
    
         
             
            requirements: []
         
     | 
| 
       262 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 262 
     | 
    
         
            +
            rubygems_version: 3.3.5
         
     | 
| 
       263 
263 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       264 
264 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       265 
265 
     | 
    
         
             
            summary: OpenNebula Client API
         
     |