def handleEdit(self, confInfo):
        logger.info("get config info: " + str(self.callerArgs))

        # name = self.callerArgs.name
        name = (self.callerArgs.data['fname'][0] or "").strip()
        key_id = (self.callerArgs.data['key_id'][0] or "").strip()
        secret_key = (self.callerArgs.data['secret_key'][0] or "").strip()

        logger.info("handle add name {}, key id {}, secret_key: {}".format(
            name, key_id, secret_key))

        name = name.strip()
        if name == "":
            logger.info("the name field is empty, ignore the request.")
            return

        if key_id == "":
            logger.error("raise exceptions, because key id is empty")
            raise Exception("Invalid Data for fields: Key Id")

        # filter name's invalid character
        name2 = "".join(
            [c if c.isalnum() or c in "- _," else '' for c in name]).strip()

        if name != name2:
            logger.error("raise exceptions, because data is invalid: name=" +
                         name)
            raise Exception("Invalid Data for fields: Account Name")

        # add or update
        from taaws.aws_accesskeys import AwsAccessKeyManager
        km = AwsAccessKeyManager(KEY_NAMESPACE, KEY_OWNER,
                                 self.getSessionKey())
        km.set_accesskey(key_id=key_id, secret_key=secret_key, name=name)
    def handleEdit(self, confInfo):

        km = AwsAccessKeyManager(KEY_NAMESPACE, KEY_OWNER, self.getSessionKey())
        key_id = self.callerArgs.data['key_id'][0]
        key_id = key_id and key_id.strip() or ''
        secret_key = self.callerArgs.data['secret_key'][0]
        secret_key = secret_key and secret_key.strip() or ''
        if not key_id and not secret_key:
            km.delete_accesskey()
        else:
            km.set_accesskey(key_id=key_id, secret_key=secret_key)