Esempio n. 1
0
 def validators(self):
     return {
         "rhn.user":
         valid.Text(),
         "rhn.profilename":
         valid.Empty() | valid.Text(min_length=3),
         "rhn.url":
         valid.Empty() | valid.URL(),
         "rhn.ca":
         valid.Empty() | valid.URL(),
         "rhn.proxyhost":
         (valid.FQDNOrIPAddress() | valid.URL() | valid.Empty()),
         "rhn.proxyport":
         valid.Port() | valid.Empty(),
         "rhn.proxyuser":
         valid.Text() | valid.Empty(),
     }
Esempio n. 2
0
 def validators(self):
     """Validators validate the input on change and give UI feedback
     """
     # FIXME improve validation for ssh and nfs
     return {
         "kdump.type": valid.Options(dict(self._types).keys()),
         "kdump.ssh_location": valid.Empty() | valid.URL(),
         "kdump.nfs_location": valid.Empty() | valid.NFSAddress(),
     }
Esempio n. 3
0
 def validators(self):
     return {
         "rhn.username":
         valid.Ascii(),
         "rhn.profilename":
         valid.Ascii() | valid.Empty(),
         "rhn.url":
         valid.Empty() | valid.URL(),
         "rhn.ca":
         valid.Empty() | valid.URL(),
         "rhn.proxyhost":
         (valid.FQDNOrIPAddress() | valid.URL() | valid.Empty()),
         "rhn.proxyport":
         valid.Port() | valid.Empty(),
         "rhn.proxyuser":
         valid.Text() | valid.Empty(),
         "rhn.org":
         valid.Text() | valid.Empty(),
         "rhn.environment":
         valid.Text() | valid.Empty(),
         "rhn.activation_key":
         valid.Text() | valid.Empty(),
     }
Esempio n. 4
0
 def update(self, enabled, server, certname):
     valid.Boolean()(enabled)
     (valid.Empty() | valid.FQDNOrIPAddress())(server)
     (valid.Empty() | valid.URL())(certname)
     return {"OVIRT_PUPPET_ENABLED": "yes" if enabled else False}
Esempio n. 5
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
             }
 def validators(self):
     return {"hosted_engine.diskpath": valid.Empty() |
             valid.URL() | valid.FileURL()}