Exemplo n.º 1
0
 def update(self, pwauth, num_bytes, disable_aesni):
     valid.Boolean()(pwauth)
     (valid.Number() | valid.Empty(or_none=True))(num_bytes)
     (valid.Boolean() | valid.Empty(or_none=True))(disable_aesni)
     return {"OVIRT_SSH_PWAUTH": "yes" if pwauth else None,
             "OVIRT_DISABLE_AES_NI": "true" if disable_aesni else None
             }
 def update(self, imagepath, pxe, force_enable=None):
     if not isinstance(pxe, bool):
         pxe = True if pxe.lower() == 'true' else False
     (valid.Empty() | valid.Text())(imagepath)
     (valid.Boolean()(pxe))
     return {
         "OVIRT_HOSTED_ENGINE_IMAGE_PATH": imagepath,
         "OVIRT_HOSTED_ENGINE_PXE": "yes" if pxe else None,
         "OVIRT_HOSTED_ENGINE_FORCE_ENABLE": "yes" if force_enable else None
     }
Exemplo n.º 3
0
 def update(self, enabled, server, certname):
     valid.Boolean()(enabled)
     (valid.Empty() | valid.FQDNOrIPAddress())(server)
     (valid.Empty() | valid.Text())(certname)
     return {"OVIRT_PUPPET_ENABLED": "yes" if enabled else None}
Exemplo n.º 4
0
 def update(self, nfs, ssh, local):
     (valid.Empty(or_none=True) | valid.FQDNOrIPAddress())(nfs)
     (valid.Empty(or_none=True) | valid.URL())(ssh)
     (valid.Empty(or_none=True) | valid.Boolean())(local)
     return {"OVIRT_KDUMP_LOCAL": "true" if local else None
             }
Exemplo n.º 5
0
 def update(self, node_register):
     valid.Boolean()(node_register)
     return {"OVIRT_NODE_REGISTER": "True" if node_register else None}