コード例 #1
0
 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)
コード例 #2
0
ファイル: initial_screen.py プロジェクト: NicolasThiesen/IMA
 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"
コード例 #3
0
ファイル: session_manager.py プロジェクト: NicolasThiesen/IMA
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"])
コード例 #4
0
 def spinner_clicked(self, value, key, root=None):
     set_item(key, value)
     if key == "service":
         set_item("attributes", [])
         show_attributes(self, value)
コード例 #5
0
ファイル: initial_screen.py プロジェクト: NicolasThiesen/IMA
 def spinner_clicked(self, value):
     global profile
     profile = value
     set_item("profile", value)