def init(create_pool_disk_images): # Shorten the reconcile periods and cache period to speed up the tests. Deployer.start_with_args( [ "-j", "-m=2", "-w=10s", "--reconcile-idle-period=500ms", "--reconcile-period=500ms", "--cache-period=1s", ] ) # Create pools ApiClient.pools_api().put_node_pool( MAYASTOR_1, POOL1_UUID, CreatePoolBody(["aio:///host/tmp/{}".format(POOL_DISK1)]), ) ApiClient.pools_api().put_node_pool( MAYASTOR_2, POOL2_UUID, CreatePoolBody(["aio:///host/tmp/{}".format(POOL_DISK2)]), ) # Create and publish a volume on node 1 request = CreateVolumeBody(VolumePolicy(False), NUM_VOLUME_REPLICAS, VOLUME_SIZE) ApiClient.volumes_api().put_volume(VOLUME_UUID, request) ApiClient.volumes_api().put_volume_target(VOLUME_UUID, MAYASTOR_1, Protocol("nvmf")) yield Deployer.stop()
def init_parameterised_deployer(): # Shorten the reconcile periods and cache period to speed up the tests. Deployer.start_with_args([ "-j", f"-m={NUM_MAYASTORS}", "-w=10s", "--reconcile-idle-period=1s", "--reconcile-period=1s", "--cache-period=1s", ]) init_resources() yield Deployer.stop()
def background(): Deployer.start_with_args([ "-j", "-m=3", "-w=10s", "--cache-period=1s", "--mayastor-env=NEXUS_NVMF_ANA_ENABLE=1,NEXUS_NVMF_RESV_ENABLE=1", "--agents-env=TEST_NEXUS_NVMF_ANA_ENABLE=1", ]) ApiClient.pools_api().put_node_pool( POOL_NODE, POOL_UUID, CreatePoolBody(["malloc:///disk?size_mb=100"])) ApiClient.volumes_api().put_volume( VOLUME_UUID, CreateVolumeBody(VolumePolicy(False), 1, VOLUME_SIZE)) volume = ApiClient.volumes_api().put_volume_target(VOLUME_UUID, TARGET_NODE_1, Protocol("nvmf")) yield volume Deployer.stop()
def init(create_pool_disk_images): # Shorten the reconcile periods and cache period to speed up the tests. Deployer.start_with_args([ "-j", "-m=2", "-w=10s", "--reconcile-idle-period=500ms", "--reconcile-period=500ms", "--cache-period=1s", ]) # Create pools ApiClient.pools_api().put_node_pool( MAYASTOR_2, POOL2_UUID, CreatePoolBody([f"aio:///host/tmp/{POOL_DISK2}"], labels={"node": MAYASTOR_2}), ) yield Deployer.stop()