def handle_checkbox(self, instance, value): _attributes = get_item("attributes") if value: _attributes.append(instance.group) else: if instance.group in _attributes: _attributes.remove(instance.group) set_item("attributes", _attributes)
def handle_enter(self, alert, root): global profile if profile is None: alert.open() else: set_item("mfa_serial", get_item_aws_file(profile, "mfa_serial")) set_item("role_arn", get_item_aws_file(profile, "role_arn")) root.manager.current = "main_screen"
def configure_session(): _client_sts = client("sts") _res = _client_sts.assume_role(RoleArn=get_item("role_arn"), RoleSessionName=get_item("profile"), SerialNumber=get_item("mfa_serial"), TokenCode=get_item("mfa")) set_item("AccessKeyId", _res["Credentials"]["AccessKeyId"]) set_item("SecretAccessKey", _res["Credentials"]["SecretAccessKey"]) set_item("SessionToken", _res["Credentials"]["SessionToken"])
def spinner_clicked(self, value, key, root=None): set_item(key, value) if key == "service": set_item("attributes", []) show_attributes(self, value)
def spinner_clicked(self, value): global profile profile = value set_item("profile", value)