コード例 #1
0
    def lookup(self, name, dev=None):

        try:
            return get_partition_details(name)
        except OperationFailed as e:
            wok_log.error("lookup method of partition failed")
            raise OperationFailed("GINPART00003E",
                                  {'err': e})
コード例 #2
0
    def lookup(self, name, dev=None):

        try:
            part_details = get_partition_details(name)
            part_path = part_details['path']
            vg_name = _get_vgname(part_path)
            if vg_name:
                part_details['vgname'] = vg_name
            else:
                part_details['vgname'] = "N/A"
            return part_details

        except NotFoundError:
            raise NotFoundError("GINPART00014E", {'name': name})

        except OperationFailed as e:
            raise OperationFailed("GINPART00003E",
                                  {'name': name, 'err': e.message})
コード例 #3
0
ファイル: diskparts.py プロジェクト: macressler/ginger
    def lookup(self, name, dev=None):

        try:
            part_details = get_partition_details(name)
            part_path = part_details['path']
            vg_name = _get_vgname(part_path)
            if vg_name:
                part_details['vgname'] = vg_name
            else:
                part_details['vgname'] = "N/A"
            return part_details

        except NotFoundError:
            wok_log.error("partition %s not found" % name)
            raise NotFoundError("GINPART00014E", {'name': name})

        except OperationFailed as e:
            wok_log.error("lookup method of partition failed")
            raise OperationFailed("GINPART00003E", {'name': name, 'err': e})
コード例 #4
0
 def lookup(self, name):
     try:
         return get_partition_details(name)
     except ValueError:
         raise NotFoundError("GINDASDPAR0009E", {'name': name})
コード例 #5
0
ファイル: host.py プロジェクト: pengoC/kimchi
 def lookup(self, name):
     return disks.get_partition_details(name)
コード例 #6
0
ファイル: dasdpartitions.py プロジェクト: MalleshKoti/ginger
 def lookup(self, name):
     try:
         return get_partition_details(name)
     except ValueError:
         wok_log.error("DASD Partition %s not found" % name)
         raise NotFoundError("GINDASDPAR0009E", {'name': 'name'})
コード例 #7
0
 def lookup(self, name):
     try:
         return get_partition_details(name)
     except ValueError:
         raise NotFoundError("GINDASDPAR0009E", {'name': name})