def valid(self): log_debug(4) # check for anonymous if self.attrs.get('machine_id'): entitlements = check_entitlement_by_machine_id(self.attrs.get('machine_id')) log_debug(4, "found entitlements for machine_id", self.attrs.get('machine_id'), entitlements) if 'salt_entitled' in entitlements: raise rhnFault(48, """ This system is already registered as a Salt Minion. If you want to register it as a traditional client please delete it first via the web UI or API and then register it using the traditional tools. """) if 'type' in self.attrs and self.attrs['type'] \ and string.upper(self.attrs['type']) == "ANONYMOUS": raise rhnFault(28, """ You need to re-register your system with SUSE Manager. Previously you have chosen to skip the creation of a system profile with SUSE Manager and this trial feature is no longer available now. """) # we don't support anonymous anymore # now we have a real server. Get its secret sid = self.attrs["system_id"] secret = getServerSecret(sid) if secret is None: # no secret, can't validate log_debug(1, "Server id %s not found in database" % sid) return 0 return self.__validate_checksum(secret)
def valid(self): log_debug(4) # check for anonymous if self.attrs.has_key('type') and self.attrs['type'] \ and string.upper(self.attrs['type']) == "ANONYMOUS": raise rhnFault(28, """ You need to re-register your system with Red Hat Satellite. Previously you have chosen to skip the creation of a system profile with Red Hat Satellite and this trial feature is no longer available now. """) # we don't support anonymous anymore # now we have a real server. Get its secret sid = self.attrs["system_id"] secret = getServerSecret(sid) if secret is None: # no secret, can't validate log_debug(1, "Server id %s not found in database" % sid) return 0 return self.__validate_checksum(secret)
def valid(self): log_debug(4) # check for anonymous if 'type' in self.attrs and self.attrs['type'] \ and string.upper(self.attrs['type']) == "ANONYMOUS": raise rhnFault(28, """ You need to re-register your system with Red Hat Satellite. Previously you have chosen to skip the creation of a system profile with Red Hat Satellite and this trial feature is no longer available now. """) # we don't support anonymous anymore # now we have a real server. Get its secret sid = self.attrs["system_id"] secret = getServerSecret(sid) if secret is None: # no secret, can't validate log_debug(1, "Server id %s not found in database" % sid) return 0 return self.__validate_checksum(secret)