コード例 #1
0
    def test_enable_persist_perf_stats(self):
        unity = UnitySystem('10.244.223.61')
        assert_that(unity.is_perf_stats_persisted(), equal_to(False))

        unity.enable_persist_perf_stats()
        assert_that(unity.is_perf_stats_persisted(), equal_to(True))

        unity.disable_persist_perf_stats()
        assert_that(unity.is_perf_stats_persisted(), equal_to(False))
コード例 #2
0
 def _is_advanced_dedup_supported(self, support_matrix):
     from storops.unity.resource.system import UnitySystem
     unity_system = UnitySystem(cli=self._cli)
     supported = False
     for supported_model in support_matrix:
         if UnityModel(unity_system.model) >= UnityModel(supported_model):
             supported = True
             break
     return supported and self.is_all_flash
コード例 #3
0
    def test_enable_performance_statistics(self):
        unity = UnitySystem('10.244.223.61')
        assert_that(unity.is_perf_stats_enabled(), equal_to(False))

        queries = unity.enable_perf_stats(1)
        assert_that(queries, instance_of(UnityMetricRealTimeQueryList))

        time.sleep(5)
        assert_that(unity.is_perf_stats_enabled(), equal_to(True))
        assert_that(unity._cli.curr_counter,
                    instance_of(UnityMetricQueryResultList))

        unity.disable_perf_stats()
        assert_that(unity.is_perf_stats_enabled(), equal_to(False))
        assert_that(unity._cli.curr_counter, none())
        assert_that(unity._cli.prev_counter, none())
コード例 #4
0
 def test_get_properties(self):
     system = UnitySystem(cli=t_rest())
     assert_that(system.existed, equal_to(True))
     assert_that(system.health, instance_of(UnityHealth))
     assert_that(system.name, equal_to('FNM00151200215'))
     assert_that(system.model, equal_to('Unity 500'))
     assert_that(system.serial_number, equal_to('FNM00151200215'))
     assert_that(system.internal_model, equal_to('OBERON 25 DRIVE CHASSIS'))
     assert_that(system.platform, equal_to('Oberon_DualSP'))
     assert_that(system.mac_address, equal_to('08:00:1B:FF:EA:CD'))
     assert_that(system.is_eula_accepted, equal_to(True))
     assert_that(system.is_upgrade_complete, equal_to(True))
     assert_that(system.is_auto_failback_enabled, equal_to(True))
     assert_that(system.current_power, equal_to(469))
     assert_that(system.avg_power, equal_to(474))
コード例 #5
0
 def test_get_file_port_la_unsupported(self):
     unity = UnitySystem(cli=t_rest("4.0.0"))
     ports = unity.get_file_port()
     assert_that(len(ports), equal_to(8))
コード例 #6
0
 def test_get_file_port(self):
     unity = UnitySystem(cli=t_rest("4.1.0"))
     ports = unity.get_file_port()
     assert_that(len(ports), equal_to(6))
コード例 #7
0
 def test_init_by_ip(self):
     system = UnitySystem('10.244.223.66', 'admin', 'Password123!')
     assert_that(system.model, equal_to('Unity 500'))
コード例 #8
0
def t_unity():
    return UnitySystem('10.244.223.66', 'admin', 'Password123!')
コード例 #9
0
ファイル: test_sp.py プロジェクト: thedreadpirateeric/storops
 def test_default_metric_csv_filename(self):
     sp_list = UnitySystem('10.244.223.61').get_sp()
     filename = sp_list.get_default_metric_csv_filename()
     assert_that(filename, contains_string('.storops'))
     assert_that(filename,
                 contains_string('10.244.223.61_storageProcessor.csv'))
コード例 #10
0
ファイル: test_sp.py プロジェクト: thedreadpirateeric/storops
 def test_repr_without_metric(self):
     spa, _ = UnitySystem('10.244.223.61').get_sp()
     assert_that(str(spa), is_not(contains_string('"nfs_write_mbps":')))