---
# System prepended metadata

title: Maysator v1 test

---

# Maysator v1 test


CreatePool
```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"name": "tpool", "disks": ["/dev/sdc"]}' [::]:10124 mayastor.v1.Mayastor/CreatePool
{
  "name": "tpool",
  "disks": [
    "aio:///dev/sdc?uuid=d489ccab-78b6-4b67-ac98-7d66fec18180"
  ],
  "state": "POOL_ONLINE",
  "capacity": "15359541248",
  "used": "1027604480"
}
```

CreateReplica
```shell=

shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"uuid": "rep", "pool": "tpool", "size": 1027604480}' [::]:10124 mayastor.v1.Mayastor/CreateReplica
{
  "uuid": "rep",
  "pool": "tpool",
  "size": "1027604480",
  "uri": "bdev:///rep?uuid=6f1595f1-120c-4619-b7c7-701d883f8f0b"
}
```

CreateNexus

```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"uuid": "ce7de596-bc04-492f-8c55-0c41b873edd4", "size": 1027604000, "children":["bdev:///rep?uuid=6f1595f1-120c-4619-b7c7-701d883f8f0b"]}' [::]:10124 mayastor.v1.Mayastor/CreateNexus
{
  "uuid": "ce7de596-bc04-492f-8c55-0c41b873edd4",
  "size": "1027604000",
  "state": "NEXUS_DEGRADED",
  "children": [
    {
      "uri": "bdev:///rep?uuid=6f1595f1-120c-4619-b7c7-701d883f8f0b",
      "state": "CHILD_ONLINE",
      "rebuildProgress": -1
    }
  ]
}
```

PublishNexus
```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"uuid": "ce7de596-bc04-492f-8c55-0c41b873edd4", "share": 1}' [::]:10124 mayastor.v1.Mayastor/PublishNexus
{
  "deviceUri": "nvmf://127.0.0.1:8420/nqn.2019-05.io.openebs:nexus-ce7de596-bc04-492f-8c55-0c41b873edd4"
}
```

ListPools 

```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{}' [::]:10124 mayastor.v1.Mayastor/ListPools
{
  "pools": [
    {
      "name": "tpool",
      "disks": [
        "aio:///dev/sdc?uuid=d489ccab-78b6-4b67-ac98-7d66fec18180"
      ],
      "state": "POOL_ONLINE",
      "capacity": "15359541248",
      "used": "1027604480"
    }
  ]
}
```

ListReplicas

```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{}' [::]:10124 mayastor.v1.Mayastor/ListReplicas
{
  "replicas": [
    {
      "uuid": "rep",
      "pool": "tpool",
      "size": "1027604480",
      "uri": "bdev:///rep?uuid=6f1595f1-120c-4619-b7c7-701d883f8f0b"
    }
  ]
}
```

ListNexus

```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{}' [::]:10124 mayastor.v1.Mayastor/ListNexus
{
  "nexusList": [
    {
      "uuid": "ce7de596-bc04-492f-8c55-0c41b873edd4",
      "size": "1027604000",
      "state": "NEXUS_DEGRADED",
      "children": [
        {
          "uri": "bdev:///rep?uuid=6f1595f1-120c-4619-b7c7-701d883f8f0b",
          "state": "CHILD_ONLINE",
          "rebuildProgress": -1
        }
      ],
      "deviceUri": "nvmf://127.0.0.1:8420/nqn.2019-05.io.openebs:nexus-ce7de596-bc04-492f-8c55-0c41b873edd4"
    }
  ]
}
```

Unpublish Nexus

```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"uuid": "ce7de596-bc04-492f-8c55-0c41b873edd4"}' [::]:10124 mayastor.v1.Mayastor/UnpublishNexus
{
  
}
```

Destroy Nexus

```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"uuid": "ce7de596-bc04-492f-8c55-0c41b873edd4"}' [::]:10124 mayastor.v1.Mayastor/DestroyNexus
{
  
}
```

Destroy Replica

```shell=
shubham:protobuf$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"uuid": "rep"}' [::]:10124 mayastor.v1.Mayastor/DestroyReplica
{
  
}
```

Destroy Pool

```shell=
$ grpcurl -plaintext -import-path ./v1 -proto mayastor.proto -d '{"name": "tpool"}' [::]:10124 mayastor.v1.Mayastor/DestroyPool
{
  
}
```