Did I find the right examples for you? yes no

All Samples(103)  |  Call(103)  |  Derive(0)  |  Import(0)

src/x/c/xcp-storage-managers-HEAD/drivers/nfs.py   xcp-storage-managers(Download)
def check_server_tcp(server):
    """Make sure that NFS over TCP/IP V3 is supported on the server. 
    Returns True if everything is OK, False otherwise."""
    try:
        util.ioretry(lambda: util.pread([RPCINFO_BIN,"-t", 
def soft_mount(mountpoint, remoteserver, remotepath, transport):
    """Mount the remote NFS export at 'mountpoint'"""
    try:
        if not util.ioretry(lambda: util.isdir(mountpoint)):
            util.ioretry(lambda: util.makedirs(mountpoint))
 
    try:
        util.ioretry(lambda: 
                     util.pread(["mount.nfs", "%s:%s" 
                                 % (remoteserver, remotepath),  
    dom.appendChild(element)
    for val in filter(util.match_uuid, util.ioretry( \
            lambda: util.listdir(path))):
        fullpath = os.path.join(path, val)
        if not util.ioretry(lambda: util.isdir(fullpath)):

src/x/c/xcp-storage-managers-HEAD/drivers/vhdutil.py   xcp-storage-managers(Download)
def ioretry(cmd):
    return util.ioretry(lambda: util.pread2(cmd),
            errlist = [errno.EIO, errno.EAGAIN])
 
def getVHDInfo(path, extractUuidFunction, includeParent = True):

src/x/c/xcp-storage-managers-HEAD/drivers/FileSR.py   xcp-storage-managers(Download)
        root of a file-based SR.) """
        try:
            if util.ioretry(lambda: util.pathexists(self.path)):
                if len(util.ioretry(lambda: util.listdir(self.path))) != 0:
                    raise xs_errors.XenError('SRExists')
            else:
                try:
                    util.ioretry(lambda: os.mkdir(self.path))
        # files that are non VDI's
        try:
            if util.ioretry(lambda: util.pathexists(self.path)):
                #Load the VDI list
                self._loadvdis()
 
                # remove everything else, there are no vdi's
                for name in util.ioretry(lambda: util.listdir(self.path)):
                    fullpath =  os.path.join(self.path,name)
                    try:

src/x/c/xcp-storage-managers-HEAD/drivers/NFSSR.py   xcp-storage-managers(Download)
 
        newpath = os.path.join(self.path, sr_uuid)
        if util.ioretry(lambda: util.pathexists(newpath)):
            if len(util.ioretry(lambda: util.listdir(newpath))) != 0:
                self.detach(sr_uuid)
                raise xs_errors.XenError('SRExists')
        else:
            try:
                util.ioretry(lambda: util.makedirs(newpath))
            newpath = os.path.join(self.path, sr_uuid)
 
            if util.ioretry(lambda: util.pathexists(newpath)):
                util.ioretry(lambda: os.rmdir(newpath))
            self.detach(sr_uuid)

src/x/c/xcp-storage-managers-HEAD/drivers/LVMSR.py   xcp-storage-managers(Download)
    def attach(self, sr_uuid, vdi_uuid):
        try:
            if not os.path.exists(self.path) or not self._isactive(self.path):
                cmd = ["lvchange", "-ay", self.path]
                text = util.ioretry(lambda: util.pread2(cmd))
    def detach(self, sr_uuid, vdi_uuid):
        try:
            if os.path.exists(self.path):
                cmd = ["lvchange", "-an", self.path]
                text = util.ioretry(lambda:util.pread2(cmd))

src/x/c/xcp-storage-managers-HEAD/tests/faultinjection/NFSSR.py   xcp-storage-managers(Download)
    def attach(self, sr_uuid):
        if not util.ioretry(lambda: self._checkmount()):
            try:
                # make sure NFS over TCP/IP V3 is supported on the server
                util.ioretry(lambda: util.pread(["/usr/sbin/rpcinfo","-t", \
            try:
                # make a mountpoint:
                if not util.ioretry(lambda: util.isdir(self.path)):
                    util.ioretry(lambda: util.makedirs(self.path))
 
                timeout = int((SOFTMOUNT_TIMEOUT / 3.0) * 10.0)
                util.ioretry(lambda: util.pread(["mount.nfs", "%s:%s" \

src/x/c/xcp-storage-managers-HEAD/tests/faultinjection/FileSR.py   xcp-storage-managers(Download)
        root of a file-based SR.) """
        try:
            if util.ioretry(lambda: util.pathexists(self.path)):
                if len(util.ioretry(lambda: util.listdir(self.path))) != 0:
                    raise xs_errors.XenError('SRExists')
            else:
                try:
                    util.ioretry(lambda: os.mkdir(self.path))
        # files that are non VDI's
        try:
            if util.ioretry(lambda: util.pathexists(self.path)):
                #Load the VDI list
                self._loadvdis()
 
                # remove everything else, there are no vdi's
                for name in util.ioretry(lambda: util.listdir(self.path)):
                    fullpath =  os.path.join(self.path,name)
                    try: