Ejemplo n.º 1
0
    def ValidateContainerName(self, name: Str) -> Structure:
        """Validate the given container name.

        :param name: a container name
        :return: a validation report
        """
        return ValidationReport.to_structure(
            self.implementation.validate_container_name(name))
Ejemplo n.º 2
0
    def ValidateMountPoint(self, mount_point: Str) -> Structure:
        """Validate the given mount point.

        :param mount_point: a path to a mount point
        :return: a validation report
        """
        return ValidationReport.to_structure(
            self.implementation.validate_mount_point(mount_point))
Ejemplo n.º 3
0
    def ValidateSelectedDisks(self, drives: List[Str]) -> Structure:
        """Validate the list of selected disks.

        :param drives: a list of drives names
        :return: a validation report
        """
        return ValidationReport.to_structure(
            self.implementation.validate_selected_disks(drives))
Ejemplo n.º 4
0
    def CheckCompleteness(self, device_name: Str) -> Structure:
        """Check that the specified device is complete.

        :param device_name: a name of the device
        :return: a validation report
        """
        return ValidationReport.to_structure(
            self.implementation.check_completeness(device_name))
Ejemplo n.º 5
0
    def ValidateDeviceFactoryRequest(self, request: Structure) -> Structure:
        """Validate the given device factory request.

        :param request: a device factory request
        :return: a validation report
        """
        request = DeviceFactoryRequest.from_structure(request)
        report = self.implementation.validate_device_factory_request(request)
        return ValidationReport.to_structure(report)
Ejemplo n.º 6
0
    def convert_result(value) -> Variant:
        """Convert the validation report.

        Convert the validation report into a variant.

        :param value: a validation report
        :return: a variant with the structure
        """
        return get_variant(Structure, ValidationReport.to_structure(value))
Ejemplo n.º 7
0
    def ValidateRaidLevel(self, raid_level: Str,
                          num_members: Int) -> Structure:
        """Validate the given RAID level.

        :param raid_level: a RAID level name
        :param num_members: a number of members
        :return: a validation report
        """
        return ValidationReport.to_structure(
            self.implementation.validate_raid_level(raid_level, num_members))