Exemple #1
0
 def test_get_disk_shares(self):
     ssh = MockSSH([
         (
             'multipath -l',
             GET_DISK_SHARES_RESULT_PART_1,
         ),
         (
             "pvs --noheadings --units M --separator '|'",
             GET_DISK_SHARES_RESULT_PART_2,
         ),
         (
             'lvs --noheadings --units M',
             GET_DISK_SHARES_RESULT_PART_3,
         ),
     ])
     self.assertEqual(
         _get_disk_shares(ssh),
         [
             {
                 'serial_number': '50002AC000123457',
                 'size': 10000,
                 'volume': 'VolGroup00'
             },
             {
                 'serial_number': '50002AC000660910',
                 'size': 146632,
                 'volume': 'VolGroup01'
             },
             {
                 'serial_number': '50002AC000123456',
                 'size': 81920,
                 'volume': 'dm-11'
             }
         ]
     )
Exemple #2
0
 def test_get_disk_shares(self):
     ssh = MockSSH([
         (
             'multipath -l',
             GET_DISK_SHARES_RESULT_PART_1,
         ),
         (
             "pvs --noheadings --units M --separator '|'",
             GET_DISK_SHARES_RESULT_PART_2,
         ),
         (
             'lvs --noheadings --units M',
             GET_DISK_SHARES_RESULT_PART_3,
         ),
     ])
     self.assertEqual(
         _get_disk_shares(ssh),
         [
             {
                 'serial_number': '50002AC000660910',
                 'size': 2080,
                 'volume': 'LogVol01',
             },
             {
                 'serial_number': '50002AC000660910',
                 'size': 144552,
                 'volume': 'LogVol00',
             },
         ],
     )
 def test_get_disk_shares(self):
     ssh = MockSSH([
         (
             'multipath -l',
             GET_DISK_SHARES_RESULT_PART_1,
         ),
         (
             "pvs --noheadings --units M --separator '|'",
             GET_DISK_SHARES_RESULT_PART_2,
         ),
         (
             'lvs --noheadings --units M',
             GET_DISK_SHARES_RESULT_PART_3,
         ),
     ])
     self.assertEqual(
         _get_disk_shares(ssh),
         [
             {
                 'serial_number': '50002AC000123457',
                 'size': 10000,
                 'volume': 'VolGroup00'
             },
             {
                 'serial_number': '50002AC000660910',
                 'size': 146632,
                 'volume': 'VolGroup01'
             },
             {
                 'serial_number': '50002AC000123456',
                 'size': 81920,
                 'volume': 'dm-11'
             }
         ]
     )