예제 #1
0
파일: storage.py 프로젝트: SIMRAN1/sushy
    def get_drive(self, drive_identity):
        """Given the drive identity return a ``Drive`` object

        :param identity: The identity of the ``Drive``
        :returns: The ``Drive`` object
        :raises: ResourceNotFoundError
        """
        return drive.Drive(self._conn, drive_identity,
                           redfish_version=self.redfish_version)
예제 #2
0
    def setUp(self):
        super(DriveTestCase, self).setUp()
        self.conn = mock.Mock()
        with open('sushy/tests/unit/json_samples/drive.json') as f:
            self.conn.get.return_value.json.return_value = json.load(f)

        self.stor_drive = drive.Drive(
            self.conn,
            '/redfish/v1/Systems/437XR1138/Storage/1/Drives/32ADF365C6C1B7BD',
            redfish_version='1.0.2')