'Implements interface.'

def add_config(self, options, script):

    if (not options.aws_access_key_id):
        return
    account_params = [options.aws_account_name, '--assume-role', options.aws_account_role, '--account-id', options.aws_account_id]
    if options.aws_account_pem_path:
        basename = os.path.basename(options.aws_account_pem_path)
        script.append('mv    {file}    .ssh/'.format(file=basename))
        account_params.extend(['--default-key-pair', os.path.splitext(basename)[0]])
    if options.aws_account_regions:
        account_params.extend(['--regions', options.aws_account_regions])
    script.append('hal    -q    --log=info    config    provider    aws    enable')
    script.append('hal    -q    --log=info    config    provider    aws    edit        --access-key-id    {id}    --secret-access-key    <    {file}'.format(id=options.aws_access_key_id, file=os.path.basename(options.aws_credentials)))
    script.append('hal    -q    --log=info    config    provider    aws    account    add    {params}'.format(params='    '.join(account_params)))
