'Implements interface.'

@classmethod
def add_config(cls, options, script):

    command = ['hal    -q    --log=info    config    storage    s3    edit']
    if options.storage_s3_access_key_id:
        command.extend(['--access-key-id', options.storage_s3_access_key_id])
    if options.storage_s3_bucket:
        command.extend(['--bucket', options.storage_s3_bucket])
    if options.storage_s3_assume_role:
        command.extend(['--assume-role', options.storage_s3_assume_role])
    if options.storage_s3_region:
        command.extend(['--region', options.storage_s3_region])
    if options.storage_s3_endpoint:
        command.extend(['--endpoint', options.storage_s3_endpoint])
    if options.storage_s3_credentials:
        command.extend(['--secret-access-key    <    {file}'.format(file=os.path.basename(options.storage_s3_credentials))])
    script.append('    '.join(command))
