In this example, we build on the previous example, reusing objects that we have already created. The repository must be attached to a particular file system. We loop through the file systems available on the Network File Server and extract the ID object for this file system:
for fsid in nfs.fileSystemIds:
if fsid.name=="nfs:/mnt/vol1/repo01
":
repofs_id=fsid
Now create a repository object using the Suds Client Factory, and then call the fileSystemCreateRepository method:
repository=client.factory.create('repository') repository.name="MyRepository" job=client.service.fileSystemCreateRepository(repofs_id,repository) repo_id=wait_for_job(client,job.id)