Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
def remove(args):
  """Remove an asset."""
  asset_utils.Asset(args.asset_name,
                    asset_utils.MultiStore(gsutil=args.gsutil)).remove()
Пример #4
0
def add(args):
  """Add a new asset."""
  asset_utils.Asset.add(args.asset_name,
                        asset_utils.MultiStore(gsutil=args.gsutil))
Пример #5
0
def _store(args):
    """Return asset_utils.MultiStore based on args."""
    return asset_utils.MultiStore(
        gsutil=args.gsutil, service_account_json=args.service_account_json)