def create_repo(self, repo_name, description=None): """ Creates a new Repo object in PFS with the given name. Repos are the top level data object in PFS and should be used to store data of a similar type. For example rather than having a single Repo for an entire project you might have separate Repos for logs, metrics, database dumps etc. Params: * repo_name: Name of the repo. * description: Repo description. """ req = proto.CreateRepoRequest(repo=proto.Repo(name=repo_name), description=description) self.stub.CreateRepo(req, metadata=self.metadata)
def create_repo(self, repo_name, description=None, update=None): """ Creates a new `Repo` object in PFS with the given name. Repos are the top level data object in PFS and should be used to store data of a similar type. For example rather than having a single `Repo` for an entire project you might have separate `Repo`s for logs, metrics, database dumps etc. Params: * repo_name: Name of the repo. * description: An optional string describing the repo. * update: Whether to update if the repo already exists. """ req = proto.CreateRepoRequest(repo=proto.Repo(name=repo_name), description=description, update=update) self.stub.CreateRepo(req, metadata=self.metadata)