Example #1
0
    def disable_token(self):
        tokens_obj = rhnFlags.get('registration_token')
        if not tokens_obj:
            # Nothing to do
            return
        if not tokens_obj.is_rereg_token:
            # Not a re-registration token - nothing to do
            return

        # Re-registration token - we know for sure there is only one
        token_server_id = tokens_obj.get_server_id()
        if token_server_id != self.getid():
            # Token is not associated with this server (it may actually not be
            # associated with any server)
            return
        server_token.disable_token(tokens_obj)
Example #2
0
    def disable_token(self):
        tokens_obj = rhnFlags.get('registration_token')
        if not tokens_obj:
            # Nothing to do
            return
        if not tokens_obj.is_rereg_token:
            # Not a re-registration token - nothing to do
            return

        # Re-registration token - we know for sure there is only one
        token_server_id = tokens_obj.get_server_id()
        if token_server_id != self.getid():
            # Token is not associated with this server (it may actually not be
            # associated with any server)
            return
        server_token.disable_token(tokens_obj)