def upload(args): """Upload a new version of the asset.""" asset = asset_utils.Asset(args.asset_name, asset_utils.MultiStore(gsutil=args.gsutil)) asset.upload_new_version(args.target_dir, commit=args.commit, extra_tags=args.extra_tags)
def download(args): """Download the current version of an asset.""" asset = asset_utils.Asset(args.asset_name, asset_utils.MultiStore(gsutil=args.gsutil)) asset.download_current_version(args.target_dir)
def remove(args): """Remove an asset.""" asset_utils.Asset(args.asset_name, asset_utils.MultiStore(gsutil=args.gsutil)).remove()
def add(args): """Add a new asset.""" asset_utils.Asset.add(args.asset_name, asset_utils.MultiStore(gsutil=args.gsutil))
def _store(args): """Return asset_utils.MultiStore based on args.""" return asset_utils.MultiStore( gsutil=args.gsutil, service_account_json=args.service_account_json)