mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
M #: Remove 1604 conflicting validation from lxd reboot (#1442)
(cherry picked from commit 8c14b0b1b9967c241a6d70129d5485dc36426e54)
This commit is contained in:
parent
41f9a2785d
commit
fd9cae60e0
@ -23,15 +23,6 @@ require 'base64'
|
||||
|
||||
require_relative '../../scripts_common'
|
||||
|
||||
# Ref: https://rgxdb.com/r/1NUN74O6
|
||||
def base64?(str)
|
||||
b64_rexp = %r{^(?:[a-zA-Z0-9+/]{4})*(?:|(?:[a-zA-Z0-9+/]{3}=)|(?:[a-zA-Z0-9+/]{2}==)|(?:[a-zA-Z0-9+/]{1}===))$}
|
||||
|
||||
b64_rexp.match?(str.strip)
|
||||
rescue StandardError
|
||||
false
|
||||
end
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Action Arguments, STDIN doesn't include XML description of the OpenNebula VM
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -41,7 +32,7 @@ client = LXDClient.new
|
||||
container = Container.get(vm_name, nil, client)
|
||||
|
||||
xml = container.config['user.xml']
|
||||
xml = Base64.decode64(xml) if base64?(xml)
|
||||
xml = Base64.decode64(xml)
|
||||
|
||||
container = Container.get(vm_name, xml, client)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user