示例#1
0
 def test_005_get_zpool_config(self):
     pool = ZPool.get(name=LIBZFS_TEST_POOL)
     config = pool.config
     pool.refresh_stats()
     oldconfig = pool.old_config
     assert len(config.keys()) > 0
     assert len(oldconfig.keys()) > 0
     assert config == oldconfig
     assert config.get(bindings['ZPOOL_CONFIG_POOL_NAME'])
示例#2
0
 def test_006_get_zpool_config_easy_access(self):
     from datetime import datetime
     pool = ZPool.get(name=LIBZFS_TEST_POOL)
     config = pool.config
     assert isinstance(config.initial_load_time, datetime)
     assert config.name == config.get(bindings['ZPOOL_CONFIG_POOL_NAME'], None)
示例#3
0
 def test_003_get_zpool_properties(self):
     pool = ZPool.get(name=LIBZFS_TEST_POOL)
     props = pool.properties
     assert len(props.keys()) > 0
     assert props.get(zpool_prop_t.ZPOOL_PROP_NAME) == LIBZFS_TEST_POOL
     assert props.get(zpool_prop_t.ZPOOL_PROP_SIZE) > 0
示例#4
0
 def test_004_get_zpool_properties_easy_access(self):
     pool = ZPool.get(name=LIBZFS_TEST_POOL)
     props = pool.properties
     assert props.name == props.get(zpool_prop_t.ZPOOL_PROP_NAME, None)
     assert props.size == props.get(zpool_prop_t.ZPOOL_PROP_SIZE, None)
示例#5
0
 def test_002_get_zpool(self):
     pool = ZPool.get(name=LIBZFS_TEST_POOL)
     assert pool is not None