Jump to: navigation, search

Difference between revisions of "Manila/API"

(Show Share Metadata)
(API Operations)
 
(51 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
'''Share'''
 
'''Share'''
A remote mountable filesystem. It can only be attached to several instances at a time.
+
A remote mountable filesystem. It can only be attached to several instances at a time.
  
 
'''Share type'''
 
'''Share type'''
Share protocol (NFS, CIFS)
+
Share protocol (NFS, CIFS)
  
 
'''Snapshot'''
 
'''Snapshot'''
A point in time copy of the data contained in a share.
+
A point in time copy of the data contained in a share.
 +
 
 +
'''Share Network'''
 +
stores network information that will be used by share servers, where shares are hosted.
 +
 
 +
'''Security Service'''
 +
stores information for configuring clients for LDAP, Kerberos or Active Directory on 'share server'. It should be attached to share-network, if assumed to be used.
 +
 
 +
'''Share Server'''
 +
is created by multitenant backend drivers, where shares are hosted. Using 'generic' driver, it is Nova's VMs, using 'cluster_mode' driver from NetApp it is 'vserver's...
 +
 
 +
'''Volume type'''
 +
designed for filtering/choosing 'backends' before creation of share. Behaviour same as in 'Cinder' project.
 +
 
 
=== High-Level Task Flow ===
 
=== High-Level Task Flow ===
  
Line 22: Line 35:
  
 
The tenant creates a share.
 
The tenant creates a share.
For example, the tenant creates a 30G NFS share called share1.
+
For example, the tenant creates a 30G NFS share called share1 in network, specified by share-network with id '%some-share-network-id%' and on backend 'netapp' using volume-type.
 
      
 
      
  $ manila create --name share1 --description "Example of high-level taskflow" nfs 30
+
  $ manila create nfs 30 --name share1 --description "Description of share" --share-network-id %some-share-network-id% --volume-type netapp
  
   
 
 
=== Authentication ===
 
=== Authentication ===
  
Line 45: Line 57:
  
 
Manila API supports both the JSON and XML data serialization formats. The request format is specified using the Content-Type header and is required for calls that have a request body. The response format can be specified in requests either by using the Accept header or by adding an .xml or .json extension to the request URI. Note that it is possible for a response to be serialized using a format different from the request. If no response format is specified, JSON is the default. If conflicting formats are specified using both an Accept header and a query extension, the query extension takes precedence.
 
Manila API supports both the JSON and XML data serialization formats. The request format is specified using the Content-Type header and is required for calls that have a request body. The response format can be specified in requests either by using the Accept header or by adding an .xml or .json extension to the request URI. Note that it is possible for a response to be serialized using a format different from the request. If no response format is specified, JSON is the default. If conflicting formats are specified using both an Accept header and a query extension, the query extension takes precedence.
 +
 +
'''NOTE:''' manila supports XML container type for the moment, after implementation of bp for nova: https://blueprints.launchpad.net/nova/+spec/remove-v3-xml-api
 +
were decided to stop support and test this container type in manila.
  
 
Table 2.1. Response Formats
 
Table 2.1. Response Formats
Line 56: Line 71:
 
|}
 
|}
  
 
 
=== API Operations ===
 
=== API Operations ===
 
==== Shares ====
 
==== Shares ====
Line 70: Line 84:
  
 
JSON Request
 
JSON Request
 
+
  {
  {   "share": {    
+
    "share": {
         "description": "Some description",
+
         "volume_type": "%volume_type%",
 
         "name": "test",
 
         "name": "test",
 +
        "snapshot_id": null,
 +
        "description": "test description",
 +
        "metadata": {
 +
            "key1": "value1",
 +
            "key2": "value2",
 +
        },
 
         "share_proto": "nfs",
 
         "share_proto": "nfs",
         "size": 1,
+
         "share_network_id": "%share_network_id%",
        "metadata": {
+
         "size": 1
                    "key1": "value1",
 
                    "key2": "value2"
 
            },
 
         "snapshot_id": null
 
 
     }
 
     }
 
  }
 
  }
Line 87: Line 103:
  
 
  {
 
  {
    "share": {
+
    "share": {
         "id": "5d3b8062-8c94-4f43-9106-43d9f43d94f1",
+
         "id": %share_id%",  
 
         "links": [
 
         "links": [
             {
+
             {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
                "href": "http://localhost:8786/v1/fa831edf91fb4802a5bf9f92fbd8a689/shares/5d3b8062-8c94-4f43-9106-43d9f43d94f1",
+
             {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
                "rel": "self"
 
            },
 
             {
 
                "href": "http://localhost:8786/fa831edf91fb4802a5bf9f92fbd8a689/shares/5d3b8062-8c94-4f43-9106-43d9f43d94f1",
 
                "rel": "bookmark"
 
            }
 
 
         ],
 
         ],
 
         "name": "test"
 
         "name": "test"
Line 105: Line 115:
 
===== List shares with details =====
 
===== List shares with details =====
  
GET /v1/<tenant_id>/shares/details
+
GET /v1/<tenant_id>/shares/detail
  
 
Accept: application/json
 
Accept: application/json
Line 111: Line 121:
  
 
JSON Response
 
JSON Response
 
 
  {
 
  {
    "shares": [
+
    "shares": [
 
         {
 
         {
            "availability_zone": "nova",
+
            "status": "available",
            "created_at": "2013-10-01T13:21:08.000000",
+
            "export_location": %ip%:/opt/stack/data/manila/mnt/share-%share_id%,
            "description": "Some description",
+
            "name": "test",
            "export_location": "localhost:/opt/stack/data/manila/mnt/share-5d3b8062-8c94-4f43-9106-43d9f43d94f1",
+
            "links": [
            "id": "5d3b8062-8c94-4f43-9106-43d9f43d94f1",
+
                {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
            "links": [
+
                {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
                {
+
            ],
                    "href": "http://localhost:8786/v1/fa831edf91fb4802a5bf9f92fbd8a689/shares/5d3b8062-8c94-4f43-9106-43d9f43d94f1",
+
            "availability_zone": "nova",
                    "rel": "self"
+
            "created_at": "2014-05-30T12:14:31.000000",
                },
+
            "description": null,
                {
+
            "share_proto": "NFS",
                    "href": "http://localhost:8786/fa831edf91fb4802a5bf9f92fbd8a689/shares/5d3b8062-8c94-4f43-9106-43d9f43d94f1",
+
            "share_network_id": "%share_network_id%",
                    "rel": "bookmark"
+
            "metadata": {
                }
+
                "key1": "value1",
            ],
+
                "key2": "value2",
            "name": "test",
+
            },
            "share_proto": "NFS",
+
            "host": "hostname@backendname",
            "size": 1,
+
            "volume_type": "%volume_type%",
            "snapshot_id": null,
+
            "snapshot_id": null,
            "status": "available"
+
            "project_id": "%project_id(tenant_id)%",
 +
            "id": "%share_id%",
 +
            "size": 1
 
         },
 
         },
 
         {
 
         {
            "availability_zone": "nova",
+
            "status": "available",
            "created_at": "2013-10-01T11:15:19.000000",
+
            "export_location": null,  
            "description": "Some description",
+
            "name": "somename",
            "export_location": "localhost:/opt/stack/data/manila/mnt/share-e9ecd8eb-439d-4ffe-83ab-86467c96c5b8",
+
            "links": [
            "id": "e9ecd8eb-439d-4ffe-83ab-86467c96c5b8",
+
                {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
            "links": [
+
                {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
                {
+
            ],  
                    "href": "http://localhost:8786/v1/fa831edf91fb4802a5bf9f92fbd8a689/shares/e9ecd8eb-439d-4ffe-83ab-86467c96c5b8",
+
            "availability_zone": "nova",
                    "rel": "self"
+
            "created_at": "2014-05-30T12:12:55.000000",
                },
+
            "description": "somedescription",  
                {
+
            "share_proto": "NFS",  
                    "href": "http://localhost:8786/fa831edf91fb4802a5bf9f92fbd8a689/shares/e9ecd8eb-439d-4ffe-83ab-86467c96c5b8",
+
            "share_network_id": "%share_network_id%",
                    "rel": "bookmark"
+
            "metadata": {},
                }
+
              "host": "hostname2@backendname2",  
            ],
+
            "volume_type": "%volume_type%",
            "name": "test2",
+
              "snapshot_id": "%snapshot_id%",
            "share_proto": "NFS",
+
            "project_id": "%project_id(tenant_id)%",
            "size": 2,
+
              "id": "%share_id%",
            "snapshot_id": null,
+
              "size": 1
            "status": "available",
 
            "metadata": {
 
                        "key1": "value1",  
 
                        "key2": "value2"
 
            }
 
 
         }
 
         }
 
     ]
 
     ]
Line 172: Line 178:
  
 
JSON Response
 
JSON Response
 
 
  {
 
  {
    "share": {
+
    "share": {
         "availability_zone": "nova",
+
         "status": "available",
        "created_at": "2013-10-01T13:21:08.000000",
+
         "export_location": "%ip%:/opt/stack/data/manila/mnt/share-%share_id%",
        "description": "Some description",
+
         "name": "name_of_cifs_share",
         "export_location": "localhost:/opt/stack/data/manila/mnt/share-5d3b8062-8c94-4f43-9106-43d9f43d94f1",
 
         "id": "5d3b8062-8c94-4f43-9106-43d9f43d94f1",
 
 
         "links": [
 
         "links": [
             {
+
             {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
                "href": "http://localhost:8786/v1/fa831edf91fb4802a5bf9f92fbd8a689/shares/5d3b8062-8c94-4f43-9106-43d9f43d94f1",
+
             {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
                "rel": "self"
 
            },
 
             {
 
                "href": "http://localhost2:8786/fa831edf91fb4802a5bf9f92fbd8a689/shares/5d3b8062-8c94-4f43-9106-43d9f43d94f1",
 
                "rel": "bookmark"
 
            }
 
 
         ],
 
         ],
         "name": "test",
+
         "availability_zone": "nova",
         "share_proto": "NFS",
+
        "created_at": "2014-05-30T11:31:13.000000",
         "size": 1,
+
        "description": "some description",
 +
         "share_proto": "CIFS",
 +
        "share_network_id": "%share_network_id%",
 +
         "metadata": {
 +
            "key1": "value1",
 +
            "key2": "value2"
 +
        },
 +
        "host": "hostname@backendname",
 +
        "volume_type": "%volume_type%",
 
         "snapshot_id": null,
 
         "snapshot_id": null,
         "status": "available",
+
         "project_id": "%project_id%",
         "metadata": {
+
         "id": "%share_id%",
                    "key1": "value1",  
+
        "size": 5
                    "key2": "value2"
 
        }
 
 
     }
 
     }
 
  }
 
  }
Line 224: Line 227:
 
         "created_at": "2013-10-02T09:58:12.000000",
 
         "created_at": "2013-10-02T09:58:12.000000",
 
         "description": "New description",
 
         "description": "New description",
         "export_location": "localhost:/opt/stack/data/manila/mnt/share-ad18175b-d9fc-4d75-98de-0adba1992b8d",
+
        "share_network_id": "%share_network_id%",
         "id": "ad18175b-d9fc-4d75-98de-0adba1992b8d",
+
         "export_location": "localhost:/opt/stack/data/manila/mnt/share-%share_id%",
 +
         "id": "%share_id%",
 
         "links": [
 
         "links": [
 
             {
 
             {
                 "href": "http://localhost:8786/v1/23ccb90954c149ee8cb7de08521914be/shares/ad18175b-d9fc-4d75-98de-0adba1992b8d",
+
                 "href": "http://localhost:8786/v1/%tenant_id%/shares/%share_id%",
 
                 "rel": "self"
 
                 "rel": "self"
 
             },
 
             },
 
             {
 
             {
                 "href": "http://localhost:8786/23ccb90954c149ee8cb7de08521914be/shares/ad18175b-d9fc-4d75-98de-0adba1992b8d",
+
                 "href": "http://localhost:8786/%tenant_id%/shares/%share_id%",
 
                 "rel": "bookmark"
 
                 "rel": "bookmark"
 
             }
 
             }
 
         ],
 
         ],
 
         "name": "newname",
 
         "name": "newname",
 +
        "volume_type": "%volume_type%",
 
         "share_proto": "NFS",
 
         "share_proto": "NFS",
 
         "size": 2,
 
         "size": 2,
 
         "snapshot_id": null,
 
         "snapshot_id": null,
 
         "status": "available",
 
         "status": "available",
 +
        "project_id": "%project_id%",
 +
        "host": "hostname@backendname",
 
         "metadata": {
 
         "metadata": {
 
                     "key1": "value1",  
 
                     "key1": "value1",  
Line 315: Line 322:
  
 
DELETE /v1/<tenant_id>/shares/<share_id>/metadata/<key>
 
DELETE /v1/<tenant_id>/shares/<share_id>/metadata/<key>
 +
 +
==== Share Actions ====
 +
===== Allow access =====
 +
 +
POST /v1/<tenant_id>/shares/<share_id>/action
 +
 +
Accept: application/json
 +
 +
JSON Request
 +
 +
{
 +
    "os-allow_access": {
 +
        "access_to": "1.1.1.1",
 +
        "access_type": "ip"
 +
    }
 +
}
 +
JSON Response
 +
 +
{
 +
    "access": {
 +
        "access_to": "1.1.1.1",
 +
        "access_type": "ip",
 +
        "created_at": "2013-10-02T10:29:36.539532",
 +
        "deleted": false,
 +
        "deleted_at": null,
 +
        "id": "%access_rule_id%",
 +
        "share_id": "%share_id%",
 +
        "state": "new",
 +
        "updated_at": null
 +
    }
 +
}
 +
 +
===== Deny Access =====
 +
POST /v1/<tenant_id>/shares/<share_id>/action
 +
 +
Accept: application/json
 +
 +
JSON Request
 +
 +
{
 +
      "os-deny_access": {
 +
        "access_id": "%access_rule_id%"
 +
    }
 +
}
 +
 +
===== List Access Rules =====
 +
 +
POST /v1/<tenant_id>/shares/<share_id>/action
 +
 +
Accept: application/json
 +
 +
JSON Request
 +
 +
{
 +
    "os-access_list": null
 +
}
 +
 +
JSON Response
 +
 +
{
 +
    "access_list": [
 +
        {
 +
            "access_to": "1.1.1.1",
 +
            "access_type": "ip",
 +
            "id": "%access_rule_id%",
 +
            "state": "active"
 +
        }
 +
    ]
 +
}
 +
 +
===== Reset Share State =====
 +
 +
POST /v1/<tenant_id>/shares/<share_id>/action
 +
 +
Accept: application/json
 +
 +
JSON Request
 +
 +
{
 +
    "os-reset_status": {"status": "error"}
 +
}
 +
 +
JSON Response is empty
  
 
==== Snapshots ====
 
==== Snapshots ====
Line 330: Line 420:
 
         "force": false,
 
         "force": false,
 
         "name": null,
 
         "name": null,
         "share_id": "e1f9c138-f614-43a6-8a0c-51c39f3b169c"
+
         "share_id": "%share_id%"
 
     }
 
     }
 
  }
 
  }
Line 338: Line 428:
 
  {
 
  {
 
     "snapshot": {
 
     "snapshot": {
         "id": "3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
         "id": "%snapshot_id%",
 
         "links": [
 
         "links": [
 
             {
 
             {
                 "href": "http://localhost:8786/v1/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
                 "href": "http://localhost:8786/v1/%tenant_id%/snapshots/%snapshot_id%",
 
                 "rel": "self"
 
                 "rel": "self"
 
             },
 
             },
 
             {
 
             {
                 "href": "http://localhost:8786/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
                 "href": "http://localhost:8786/%tenant_id%/snapshots/%snapshot_id%",
 
                 "rel": "bookmark"
 
                 "rel": "bookmark"
 
             }
 
             }
Line 355: Line 445:
 
===== List Snapshots with Details =====
 
===== List Snapshots with Details =====
  
GET /v1/<tenant_id>/snapshots/details
+
GET /v1/<tenant_id>/snapshots/detail
  
 
Accept: application/json
 
Accept: application/json
Line 363: Line 453:
 
  {
 
  {
 
     "snapshots": [
 
     "snapshots": [
        {
+
        {
            "created_at": "2013-10-02T10:04:59.000000",
+
            "status": "available",
            "description": null,
+
            "share_id": "%share_id%",
            "export_location": "localhost:/opt/stack/data/manila/mnt/share-e1f9c138-f614-43a6-8a0c-51c39f3b169c",
+
            "description": "test-desc",
            "id": "3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
            "links": [
            "links": [
+
                {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
                {
+
                {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
                    "href": "http://localhost:8786/v1/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
            ],
                    "rel": "self"
+
            "id": "%snapshot_id%",
                },
+
            "size": 1,
                {
+
            "name": "snap-test",
                    "href": "http://localhost:8786/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
            "created_at": "2014-05-30T17:20:37.000000",
                    "rel": "bookmark"
+
            "export_location": "10.254.0.3:/shares/share-%share_id%",
                }
+
            "share_proto": "NFS",
            ],
+
            "share_size": 1
            "name": null,
+
        },
            "share_id": "e1f9c138-f614-43a6-8a0c-51c39f3b169c",
+
        {
            "share_proto": "NFS",
+
            "status": "available",
            "share_size": 1,
+
            "share_id": "%share_id%",
            "size": 1,
+
            "description": "test-desc",
            "status": "available"
+
            "links": [
        }
+
                {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
    ]
+
                {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
 +
            ],  
 +
            "id": "%snapshot_id%",
 +
            "size": 1,  
 +
            "name": "snap-test",
 +
            "created_at": "2014-05-30T17:20:24.000000",
 +
            "export_location": "10.254.0.3:/shares/share-%share_id%",
 +
            "share_proto": "NFS",
 +
            "share_size": 1
 +
        }
 +
    ]
 
  }
 
  }
  
Line 397: Line 497:
 
  {
 
  {
 
     "snapshot": {
 
     "snapshot": {
        "created_at": "2013-10-02T10:04:59.000000",
+
        "status": "available",
        "description": null,
+
        "share_id": "%share_id%",
        "export_location": "localhost:/opt/stack/data/manila/mnt/share-e1f9c138-f614-43a6-8a0c-51c39f3b169c",
+
        "description": "test-desc",
        "id": "3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
        "links": [
        "links": [
+
            {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
            {
+
            {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
                "href": "http://localhost:8786/v1/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
        ],
                "rel": "self"
+
        "id": "%snapshot_id%",
            },
+
        "size": 1,
            {
+
        "name": "snap-test",
                "href": "http://localhost:8786/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
        "created_at": "2014-05-30T17:20:37.000000",
                "rel": "bookmark"
+
        "export_location": "10.254.0.3:/shares/share-%share_id%",
            }
+
        "share_proto": "NFS",
        ],
+
        "share_size": 1
        "name": null,
+
    }
        "share_id": "e1f9c138-f614-43a6-8a0c-51c39f3b169c",
 
        "share_proto": "NFS",
 
        "share_size": 1,
 
        "size": 1,
 
        "status": "available"
 
    }
 
 
  }
 
  }
  
Line 439: Line 533:
 
  {
 
  {
 
     "snapshot": {
 
     "snapshot": {
        "created_at": "2013-10-02T10:04:59.000000",
+
        "status": "available",
        "description": "New description",
+
        "share_id": "%share_id%",
        "export_location": "localhost:/opt/stack/data/manila/mnt/share-e1f9c138-f614-43a6-8a0c-51c39f3b169c",
+
        "description": "New description",
        "id": "3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
        "links": [
        "links": [
+
            {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
            {
+
            {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
                "href": "http://localhost:8786/v1/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
        ],
                "rel": "self"
+
        "id": "%snapshot_id%",
            },
+
        "size": 1,
            {
+
        "name": "newname",
                "href": "http://localhost:8786/23ccb90954c149ee8cb7de08521914be/snapshots/3c5b3b68-75c4-412f-8a9c-7ced9df2ac6c",
+
        "created_at": "2014-05-30T17:20:37.000000",
                "rel": "bookmark"
+
        "export_location": "10.254.0.3:/shares/share-%share_id%",
            }
+
        "share_proto": "NFS",
        ],
+
        "share_size": 1
        "name": "newname",
+
    }
        "share_id": "e1f9c138-f614-43a6-8a0c-51c39f3b169c",
 
        "share_proto": "NFS",
 
        "share_size": 1,
 
        "size": 1,
 
        "status": "available"
 
    }
 
 
  }
 
  }
  
Line 468: Line 556:
 
Accept: application/json
 
Accept: application/json
  
=== Extensions ===
+
==== Snapshot Actions ====
==== Share Actions ====
+
===== Reset Snapshot State =====
===== Allow access =====
+
 
 +
POST /v1/<tenant_id>/snapshots/<snapshot_id>/action
 +
 
 +
Accept: application/json
 +
 
 +
JSON Request
 +
 
 +
{
 +
    "os-reset_status": {"status": "error"}
 +
}
 +
 
 +
JSON Response is empty
 +
 
 +
==== Share Networks ====
 +
===== Create Share Network =====
 +
 +
 
 +
POST /v1/<tenant_id>/share-networks
  
POST /v1/<tenant_id>/shares/<share_id>/action
+
Content-Type: application/json
  
 
Accept: application/json
 
Accept: application/json
 +
  
 
JSON Request
 
JSON Request
  
 
  {
 
  {
     "os-allow_access": {
+
    "share_network": {
         "access_to": "1.1.1.1",
+
        "name": "test_name",
         "access_type": "ip"
+
        "description": "test_description",
 +
        "neutron_net_id": "some_neutron_net_id",
 +
        "neutron_subnet_id": "some_neutron_subnet_id",
 +
    }
 +
}
 +
 
 +
JSON Response
 +
 
 +
{
 +
     "share_network": {
 +
         "id": "%share_network_id%",
 +
        "name": "test_name",
 +
        "description": "test_description",
 +
        "neutron_net_id": "%some_neutron_net_id%",
 +
        "neutron_subnet_id": "%some_neutron_subnet_id%",
 +
        "segmentation_id": null,
 +
        "network_type": null,
 +
        "status": null,
 +
        "created_at": "2009-10-11T12:13:14.000000",
 +
        "updated_at": null,
 +
        "ip_version": null,
 +
        "cidr": null,
 +
         "project_id": "%project_id%",
 
     }
 
     }
 
  }
 
  }
 +
 +
===== List share-networks =====
 +
 +
GET /v1/<tenant_id>/share-networks
 +
 +
Accept: application/json
 +
 +
 
JSON Response
 
JSON Response
  
 
  {
 
  {
     "access": {
+
     "share_networks": [
         "access_to": "1.1.1.1",
+
        {
        "access_type": "ip",
+
            "id": "%share_network_id%",
        "created_at": "2013-10-02T10:29:36.539532",
+
            "name": "private",
        "deleted": false,
+
            "status": null
        "deleted_at": null,
+
         }
        "id": "ae3cd150-610e-4e8a-8e2c-e1c0c02d38ad",
+
    ]
        "share_id": "e1f9c138-f614-43a6-8a0c-51c39f3b169c",
+
}
         "state": "new",
+
 
         "updated_at": null
+
===== List share-networks with details=====
 +
 
 +
GET /v1/<tenant_id>/share-networks/detail
 +
 
 +
Accept: application/json
 +
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "share_networks": [
 +
        {
 +
            "status": null,
 +
            "name": "private",
 +
            "segmentation_id": null,
 +
            "created_at": "2014-05-30T17:14:24.000000",
 +
            "neutron_subnet_id": "%neutron_subnet_id%",
 +
            "updated_at": null,
 +
            "network_type": null,
 +
            "neutron_net_id": "%neutron_net_id%",
 +
            "ip_version": null,
 +
            "cidr": null,
 +
            "project_id": "%project_id%",
 +
            "id": "%share_network_id%",
 +
            "description": null
 +
        }
 +
    ]
 +
}
 +
 
 +
===== Show share-network =====
 +
 
 +
GET /v1/<tenant_id>/share-networks/<share_network_id>
 +
 
 +
Accept: application/json
 +
 +
JSON Response
 +
 
 +
{
 +
    "share_network":
 +
        {
 +
            "id": "%share_network_id%",
 +
            "name": "private",
 +
            "status": null
 +
            "segmentation_id": null,
 +
            "created_at": "2014-05-30T17:14:24.000000",
 +
            "neutron_subnet_id": "neutron_subnet_id",
 +
            "updated_at": null,
 +
            "network_type": null,
 +
            "neutron_net_id": "%neutron_net_id%",
 +
            "ip_version": null,
 +
            "cidr": null,
 +
            "project_id": "%project_id%",
 +
            "description": null
 +
        }
 +
}
 +
 
 +
===== Update Share Network =====
 +
 
 +
PUT /v1/<tenant_id>/share-networks/<share_network_id>
 +
 
 +
Accept: application/json
 +
 
 +
JSON Request
 +
 
 +
{
 +
    "share_network": {
 +
         "description": "newdesc",
 +
         "name": "newname"
 
     }
 
     }
 
  }
 
  }
  
===== Deny Access =====
+
JSON Response
POST /v1/<tenant_id>/shares/<share_id>/action
+
 
 +
{
 +
    "share_network": {
 +
        "status": null,
 +
        "name": "newname",
 +
        "segmentation_id": null,
 +
        "created_at": "2014-05-30T17:56:55.000000",
 +
        "neutron_subnet_id": null,
 +
        "updated_at": "2014-05-30T17:57:07.000000",
 +
        "network_type": null,
 +
        "neutron_net_id": null,
 +
        "ip_version": null, "cidr": null,
 +
        "project_id": "%project_id%",
 +
        "id": "%share_network_id%",
 +
        "description": "newdesc"
 +
    }
 +
}
 +
 
 +
===== Delete Share Network =====
 +
 
 +
DELETE /v1/<tenant_id>/share-networks/<share_network_id>
 +
 
 +
===== Add Security Service to Share network =====
 +
 
 +
POST /v1/<tenant_id>/share-networks/<share_network_id>/action
 +
 
 +
Accept: application/json
 +
 +
JSON Request
 +
 
 +
{
 +
    "add_security_service": {
 +
        "security_service_id": "%security_service_id%"
 +
    }
 +
}
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "share_network": {
 +
        "status": null,
 +
        "name": "test",
 +
        "segmentation_id": null,
 +
        "created_at": "2014-06-02T13:57:48.000000",
 +
        "neutron_subnet_id": null,
 +
        "updated_at": null,
 +
        "network_type": null,
 +
        "neutron_net_id": null,
 +
        "ip_version": null,
 +
        "cidr": null,
 +
        "project_id": "%project_id%",
 +
        "id": "%share_network_id%",
 +
        "description": null
 +
      }
 +
}
 +
 
 +
===== Remove Security Service from Share network =====
 +
 
 +
POST /v1/<tenant_id>/share-networks/<share_network_id>/action
 +
 
 +
Accept: application/json
 +
 +
JSON Request
 +
 
 +
{
 +
    "remove_security_service": {
 +
        "security_service_id": "%security_service_id%"
 +
    }
 +
}
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "share_network": {
 +
        "status": null,
 +
        "name": "test",
 +
        "segmentation_id": null,
 +
        "created_at": "2014-06-02T13:57:48.000000",
 +
        "neutron_subnet_id": null,
 +
        "updated_at": null,
 +
        "network_type": null,
 +
        "neutron_net_id": null,
 +
        "ip_version": null,
 +
        "cidr": null,
 +
        "project_id": "%project_id%",
 +
        "id": "%share_network_id%",
 +
        "description": null
 +
      }
 +
}
 +
 
 +
==== Security Services ====
 +
===== Create Security Service =====
 +
 +
 
 +
POST /v1/<tenant_id>/security-services
 +
 
 +
Content-Type: application/json
 +
 
 +
Accept: application/json
 +
 +
 
 +
JSON Request
 +
 
 +
{
 +
    "security_service": {
 +
        "domain": "domain",
 +
        "name": "name",
 +
        "dns_ip": "dns-ip",
 +
        "sid": "security",
 +
        "password": "password",
 +
        "type": "ldap",
 +
        "description": "description"
 +
    }
 +
}
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "security_service": {
 +
        "status": "NEW",
 +
        "domain": "domain",
 +
        "description": "description",
 +
        "dns_ip": "dns-ip",
 +
        "updated_at": null,
 +
        "password": "password",
 +
        "id": "%security_service_id%",
 +
        "name": "name",
 +
        "created_at": "2014-06-02T08:45:53.685967",
 +
        "server": null,
 +
        "sid": "security",
 +
        "project_id": "%project_id%",
 +
        "type": "ldap"
 +
    }
 +
}
 +
 
 +
===== List Security Services =====
 +
 
 +
GET /v1/<tenant_id>/security-services
 +
 
 +
Accept: application/json
 +
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "security_services": [
 +
        {
 +
            "status": "NEW",
 +
            "type": "ldap",
 +
            "id": "%security_service_id%",
 +
            "name": "name"
 +
        }
 +
    ]
 +
}
 +
 
 +
===== List Security Service with details=====
 +
 
 +
GET /v1/<tenant_id>/security-services/detail
 +
 
 +
Accept: application/json
 +
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "security_services": [
 +
        {
 +
            "status": "NEW",
 +
            "domain": "domain",
 +
            "description": "description",
 +
            "dns_ip": "dns-ip",
 +
            "updated_at": null,
 +
            "password": "password",
 +
            "id": "%security_service_id%",
 +
            "name": "name",
 +
            "created_at": "2014-06-02T08:45:53.000000",
 +
            "server": null,
 +
            "sid": "security",
 +
            "project_id": "%project_id%",
 +
            "type": "ldap"
 +
        }
 +
    ]
 +
}
 +
 
 +
===== List Security Services for Share Network =====
 +
 
 +
GET /v1/<tenant_id>/security-services?share_network_id=%share_network_id%
 +
 
 +
Accept: application/json
 +
 +
JSON Response
 +
 
 +
{
 +
    "security_services": [
 +
        {
 +
            "status": "NEW",
 +
            "type": "ldap",
 +
            "id": "%security_service_id%",
 +
            "name": "name"
 +
        }
 +
    ]
 +
}
 +
 
 +
===== Show Security Service =====
 +
 
 +
GET /v1/<tenant_id>/security-services/<security_service_id>
 +
 
 +
Accept: application/json
 +
 +
JSON Response
 +
 
 +
{
 +
    "security_service": {
 +
        "status": "NEW",
 +
        "domain": "domain",
 +
        "description": "description",
 +
        "dns_ip": "dns-ip",
 +
        "updated_at": null,
 +
        "password": "password",
 +
        "id": "%security_service_id%",
 +
        "name": "name",
 +
        "created_at": "2014-06-02T08:45:53.000000",
 +
        "server": null,
 +
        "sid": "security",
 +
        "project_id": "%project_id%",
 +
        "type": "ldap"
 +
    }
 +
}
 +
 
 +
===== Update Security Service =====
 +
 
 +
PUT /v1/<tenant_id>/security-services/<security_service_id>
 +
 
 +
Accept: application/json
 +
 
 +
JSON Request
 +
 
 +
{
 +
    "security_service": {
 +
        "domain": "newdomain",
 +
        "description": "newdescription",
 +
        "dns_ip": "newdns-ip",
 +
        "sid": "newsecurity",
 +
        "password": "newpassword",
 +
        "name": "newname"
 +
    }
 +
}
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "security_service": {
 +
        "status": "NEW",
 +
        "domain": "newdomain",
 +
        "description": "newdescription",
 +
        "dns_ip": "newdns-ip",
 +
        "updated_at": "2014-06-02T08:55:25.809860",
 +
        "password": "newpassword",
 +
        "id": "%security_service_id%",
 +
        "name": "newname",
 +
        "created_at": "2014-06-02T08:45:53.000000",
 +
        "server": null,
 +
        "sid": "newsecurity",
 +
        "project_id": "%project_id%",
 +
        "type": "ldap"
 +
    }
 +
}
 +
 
 +
===== Delete Security Service =====
 +
 
 +
DELETE /v1/<tenant_id>/security-services/<security_service_id>
 +
 
 +
==== Share Servers ====
 +
===== List Share Servers =====
 +
GET /v1/<tenant_id>/share-servers
 +
 
 +
Accept: application/json
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "share_servers": [
 +
        {
 +
            "status": "ACTIVE",
 +
            "updated_at": "2014-06-03T13:52:04.000000",
 +
            "share_network_name": "private",
 +
            "host": "localhost@paris",
 +
            "project_id": "%project_id%",
 +
            "id": "e9a6fa06-833f-4ab6-aa20-5d5abf8737c5"
 +
        }
 +
    ]
 +
}
 +
 
 +
===== Show Share Server =====
 +
GET /v1/<tenant_id>/share-server/<share_server_id>
 +
 
 +
Accept: application/json
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "share_server": {
 +
        "status": "ACTIVE",
 +
        "backend_details": {
 +
            "instance_id": "%instance_id%",
 +
            "ip": "10.254.0.3",
 +
            "username": "ubuntu",
 +
            "password": "ubuntu",
 +
            "pk_path": "/home/stack/.ssh/manila-service0ce582d2-671e-4286-af25-74f8f40fe4d6"
 +
        },
 +
        "created_at": "2014-06-03T13:49:10.000000",
 +
        "updated_at": "2014-06-03T13:52:04.000000",
 +
        "share_network_name": "private",
 +
        "host": "localhost@paris",
 +
        "project_id": "%project_id%",
 +
        "id": "%share_server_id%"
 +
    }
 +
}
 +
 
 +
===== Show Details of Share Server =====
 +
GET /v1/<tenant_id>/share-server/<share_server_id>/details
 +
 
 +
Accept: application/json
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "details": {
 +
        "instance_id": "%instance_id%",
 +
        "ip": "10.254.0.3",
 +
        "username": "ubuntu",
 +
        "password": "ubuntu",
 +
        "pk_path": "/home/stack/.ssh/manila-service0ce582d2-671e-4286-af25-74f8f40fe4d6"
 +
    }
 +
}
 +
 
 +
==== Limits ====
 +
===== List Limits =====
 +
 +
GET /v1/<tenant_id>/limits
 +
 
 +
Content-Type: application/json
 +
 
 +
Accept: application/json
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "limits": {
 +
        "rate": [],
 +
        "absolute": {
 +
            "totalShareNetworksUsed": 3,
 +
            "maxTotalShareGigabytes": 1000,
 +
            "maxTotalShareNetworks": 5,
 +
            "totalSharesUsed": 10,
 +
            "totalShareGigabytesUsed": 11,
 +
            "totalShareSnapshotsUsed": 1,
 +
            "maxTotalShares": 10,
 +
            "maxTotalShareSnapshots": 10
 +
        }
 +
    }
 +
}
 +
 
 +
==== Extensions ====
 +
===== List Extensions =====
 +
 +
GET /v1/<tenant_id>/extensions
 +
 
 +
Content-Type: application/json
 +
 
 +
Accept: application/json
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "extensions": [
 +
        {
 +
            "updated": "2013-06-09T00:00:00+00:00",
 +
            "name": "ExtendedQuotas",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/compute/ext/extended_quotas/api/v1.1",
 +
            "alias": "os-extended-quotas",
 +
            "description": "Adds ability for admins to delete quota\n    and optionally force the update Quota command.\n    "
 +
        },
 +
        {
 +
            "updated": "2012-03-12T00:00:00+00:00",
 +
            "name": "QuotaClasses",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/volume/ext/quota-classes-sets/api/v1.1",
 +
            "alias": "os-quota-class-sets",
 +
            "description": "Quota classes management support"
 +
        },
 +
        {
 +
            "updated": "2011-08-08T00:00:00+00:00",
 +
            "name": "Quotas",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/compute/ext/quotas-sets/api/v1.1",
 +
            "alias": "os-quota-sets",
 +
            "description": "Quotas management support"
 +
        },
 +
        {
 +
            "updated": "2011-08-24T00:00:00+00:00",
 +
            "name": "TypesManage",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/share/ext/types-manage/api/v1",
 +
            "alias": "os-types-manage",
 +
            "description": "Types manage support."
 +
        },
 +
        {
 +
            "updated": "2013-07-18T00:00:00+00:00",
 +
            "name": "UserQuotas",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/compute/ext/user_quotas/api/v1.1",
 +
            "alias": "os-user-quotas",
 +
            "description": "Project user quota support."
 +
        },
 +
        {
 +
            "updated": "2012-08-14T00:00:00+00:00",
 +
            "name": "ShareActions",
 +
            "links": [],
 +
            "namespace": "",
 +
            "alias": "share-actions",
 +
            "description": "Enable share actions."
 +
        },
 +
        {
 +
            "updated": "2011-08-24T00:00:00+00:00",
 +
            "name": "TypesExtraSpecs",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/share/ext/types-extra-specs/api/v1",
 +
            "alias": "os-types-extra-specs",
 +
            "description": "Type extra specs support."
 +
        },
 +
        {
 +
            "updated": "2012-08-25T00:00:00+00:00",
 +
            "name": "AdminActions",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/share/ext/admin-actions/api/v1.1",
 +
            "alias": "os-admin-actions",
 +
            "description": "Enable admin actions."
 +
        },
 +
        {
 +
            "updated": "2012-10-28T00:00:00-00:00",
 +
            "name": "Services",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/volume/ext/services/api/v2",
 +
            "alias": "os-services",
 +
            "description": "Services support"
 +
        },
 +
        {
 +
            "updated": "2014-03-27T00:00:00+00:00",
 +
            "name": "UsedLimits",
 +
            "links": [],
 +
            "namespace": "http://docs.openstack.org/share/ext/used-limits/api/v1.0",
 +
            "alias": "os-used-limits",
 +
            "description": "Provide data on limited resources that are being used."
 +
        }
 +
    ]
 +
}
 +
 
 +
==== Services ====
 +
===== List Services =====
 +
 +
GET /v1/<tenant_id>/os-services
 +
 
 +
Content-Type: application/json
 +
 
 +
Accept: application/json
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "services": [
 +
        {
 +
            "status": "enabled",
 +
            "binary": "manila-scheduler",
 +
            "zone": "nova",
 +
            "state": "up",
 +
            "updated_at": "2014-06-02T14:57:52.000000",
 +
            "host": "nosb-devstack"
 +
        },
 +
        {
 +
            "status": "enabled",
 +
            "binary": "manila-share",
 +
            "zone": "nova",
 +
            "state": "up",
 +
            "updated_at": "2014-06-02T14:57:52.000000",
 +
            "host": "nosb-devstack@paris"
 +
        },
 +
        {"status": "enabled",
 +
            "binary": "manila-share",
 +
            "zone": "nova",
 +
            "state": "up",
 +
            "updated_at": "2014-06-02T14:57:47.000000",
 +
            "host": "nosb-devstack@london"
 +
        }
 +
    ]
 +
}
 +
 
 +
===== List Services With Filters =====
 +
 
 +
GET /v1/<tenant_id>/os-services?status=enabled&binary=manila-share&host=nosb-devstack%40london&state=up&zone=nova
 +
 
 +
Content-Type: application/json
  
 
Accept: application/json
 
Accept: application/json
  
 +
JSON Response
 +
 +
{
 +
    "services": [
 +
        {
 +
            "status": "enabled",
 +
            "binary": "manila-share",
 +
            "zone": "nova",
 +
            "state": "up",
 +
            "updated_at": "2014-06-02T14:57:47.000000",
 +
            "host": "nosb-devstack@london"
 +
        }
 +
    ]
 +
}
 +
 +
==== Volume Types ====
 +
===== Create Volume Type =====
 +
 +
POST /v1/<tenant_id>/types/%volume_type_id%
 +
 +
Content-Type: application/json
 +
 +
Accept: application/json
 +
 
JSON Request
 
JSON Request
  
 
  {
 
  {
      "os-deny_access": {
+
    "volume_type": {
         "access_id": "ae3cd150-610e-4e8a-8e2c-e1c0c02d38ad"
+
         "name": "test",
 
     }
 
     }
 
  }
 
  }
  
===== List Access Rules =====
+
JSON Response
 +
 
 +
{
 +
    "volume_type": {
 +
        "extra_specs": {},
 +
        "name": "test",
 +
        "id": "%volume_type_id%"
 +
    }
 +
}
 +
 
 +
===== Set Key for Volume Type =====
 +
 
 +
POST /v1/<tenant_id>/types/%volume_type_id%/extra_specs
 +
 
 +
Content-Type: application/json
 +
 
 +
Accept: application/json
 +
 
 +
JSON Request
 +
 
 +
{
 +
    "extra_specs": {
 +
        "k": "v"
 +
    }
 +
}
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "extra_specs": {
 +
        "k": "v"
 +
    }
 +
}
 +
 
 +
===== Unset Key for Volume Type =====
 +
 
 +
DELETE /v1/<tenant_id>/types/%volume_type_id%/extra_specs/%key%
  
POST /v1/<tenant_id>/shares/<share_id>/action
+
Content-Type: application/json
  
 
Accept: application/json
 
Accept: application/json
Line 522: Line 1,287:
  
 
  {
 
  {
     "os-access_list": null
+
     "extra_specs": {
 +
        "k": "v"
 +
    }
 +
}
 +
 
 +
JSON Response is empty
 +
 
 +
===== List Volume Types =====
 +
 
 +
GET /v1/<tenant_id>/types
 +
 
 +
Content-Type: application/json
 +
 
 +
Accept: application/json
 +
 
 +
JSON Response
 +
 
 +
{
 +
    "volume_types": [
 +
        {
 +
            "extra_specs": {"q": "w"},
 +
            "name": "test",
 +
            "id": "%volume_type_id%"
 +
        },
 +
    ]
 
  }
 
  }
 +
 +
===== List Extra Specs for Volume Type =====
 +
 +
GET /v1/<tenant_id>/types/<volume_type_id>/extra_specs
 +
 +
Content-Type: application/json
 +
 +
Accept: application/json
  
 
JSON Response
 
JSON Response
  
 
  {
 
  {
     "access_list": [
+
     "extra_specs": {
        {
+
        "share_backend_name": "TEST_BACKEND"
            "access_to": "1.1.1.1",
+
    }
            "access_type": "ip",
 
            "id": "f66ae7f2-7d12-4c5e-8ee8-aeef69b155fc",
 
            "state": "active"
 
        }
 
    ]
 
 
  }
 
  }
 +
 +
===== Delete Volume Type =====
 +
 +
DELETE /v1/<tenant_id>/types/<volume_type_id>

Latest revision as of 11:20, 4 June 2014

Contents

OpenStack Shared Filesystem Management Service API v1 specification

This document describes how to develop applications that use Manila Service API v1 for authentication. This document also describes how to integrate services with Manila Service API v1.

Glossary

To use the Shared Filesystem Managenent service API effectively, you should understand several key concepts:

Share

A remote mountable filesystem. It can only be attached to several instances at a time.

Share type

Share protocol (NFS, CIFS)

Snapshot

A point in time copy of the data contained in a share.

Share Network

stores network information that will be used by share servers, where shares are hosted.

Security Service

stores information for configuring clients for LDAP, Kerberos or Active Directory on 'share server'. It should be attached to share-network, if assumed to be used.

Share Server

is created by multitenant backend drivers, where shares are hosted. Using 'generic' driver, it is Nova's VMs, using 'cluster_mode' driver from NetApp it is 'vserver's...

Volume type

designed for filtering/choosing 'backends' before creation of share. Behaviour same as in 'Cinder' project.

High-Level Task Flow

The high-level task flow for Manila is as follows:

The tenant creates a share. For example, the tenant creates a 30G NFS share called share1 in network, specified by share-network with id '%some-share-network-id%' and on backend 'netapp' using volume-type.

$ manila create nfs 30 --name share1 --description "Description of share" --share-network-id %some-share-network-id% --volume-type netapp

Authentication

You can use cURL to try the authentication process in two steps: get a token; send the token to a service. Get an authentication token by providing your user name and either your API key or your password. Here are examples of both approaches: You can request a token by providing your user name and your password.


$ curl -X POST https://localhost:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "joecool", "password":"coolword"}, "tenantId":"5"}}' -H 'Content-type: application/json'

Successful authentication returns a token which you can use as evidence that your identity has already been authenticated. To use the token, pass it to other services as an X-Auth-Token header. Authentication also returns a service catalog, listing the endpoints you can use for Cloud services. Use the authentication token to send a GET to a service you would like to use. Authentication tokens are typically valid for 24 hours. Applications should be designed to re-authenticate after receiving a 401 (Unauthorized) response from a service endpoint.


Request/Response Types

Manila API supports both the JSON and XML data serialization formats. The request format is specified using the Content-Type header and is required for calls that have a request body. The response format can be specified in requests either by using the Accept header or by adding an .xml or .json extension to the request URI. Note that it is possible for a response to be serialized using a format different from the request. If no response format is specified, JSON is the default. If conflicting formats are specified using both an Accept header and a query extension, the query extension takes precedence.

NOTE: manila supports XML container type for the moment, after implementation of bp for nova: https://blueprints.launchpad.net/nova/+spec/remove-v3-xml-api were decided to stop support and test this container type in manila.

Table 2.1. Response Formats

Format Acceptt Header Query Extension Default
JSON application/json .json Yes
XML application/xml .xml No

API Operations

Shares

Create Share

POST /v1/<tenant_id>/shares

Content-Type: application/json

Accept: application/json


JSON Request

{
   "share": {
       "volume_type": "%volume_type%",
       "name": "test",
       "snapshot_id": null,
       "description": "test description",
       "metadata": {
           "key1": "value1",
           "key2": "value2",
       },
       "share_proto": "nfs",
       "share_network_id": "%share_network_id%",
       "size": 1
   }
}

JSON Response

{
   "share": {
       "id": %share_id%", 
       "links": [
           {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
           {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
       ],
       "name": "test"
   }
}
List shares with details

GET /v1/<tenant_id>/shares/detail

Accept: application/json


JSON Response

{
   "shares": [
       {
            "status": "available",
            "export_location": %ip%:/opt/stack/data/manila/mnt/share-%share_id%,
            "name": "test",
            "links": [
                {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
                {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
            ],
            "availability_zone": "nova",
            "created_at": "2014-05-30T12:14:31.000000",
            "description": null,
            "share_proto": "NFS",
            "share_network_id": "%share_network_id%",
            "metadata": {
                "key1": "value1",
                "key2": "value2",
            },
            "host": "hostname@backendname",
            "volume_type": "%volume_type%",
            "snapshot_id": null,
            "project_id": "%project_id(tenant_id)%",
            "id": "%share_id%",
            "size": 1
       },
       {
            "status": "available",
            "export_location": null, 
            "name": "somename",
            "links": [
                {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
                {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
            ], 
            "availability_zone": "nova", 
            "created_at": "2014-05-30T12:12:55.000000", 
            "description": "somedescription", 
            "share_proto": "NFS", 
            "share_network_id": "%share_network_id%", 
            "metadata": {},
             "host": "hostname2@backendname2", 
            "volume_type": "%volume_type%",
             "snapshot_id": "%snapshot_id%",
            "project_id": "%project_id(tenant_id)%",
             "id": "%share_id%",
             "size": 1
       }
   ]
}
Show Share

GET /v1/<tenant_id>/shares/<share_id>

Accept: application/json

JSON Response

{
   "share": {
       "status": "available",
       "export_location": "%ip%:/opt/stack/data/manila/mnt/share-%share_id%",
       "name": "name_of_cifs_share",
       "links": [
           {"href": "http://%ip%:8786/v1/%tenant_id%/shares/%share_id%", "rel": "self"},
           {"href": "http://%ip%:8786/%tenant_id%/shares/%share_id%", "rel": "bookmark"}
       ],
       "availability_zone": "nova",
       "created_at": "2014-05-30T11:31:13.000000",
       "description": "some description",
       "share_proto": "CIFS",
       "share_network_id": "%share_network_id%",
       "metadata": {
           "key1": "value1", 
           "key2": "value2"
       },
       "host": "hostname@backendname",
       "volume_type": "%volume_type%",
       "snapshot_id": null,
       "project_id": "%project_id%",
       "id": "%share_id%",
       "size": 5
   }
}
Update Share

PUT /v1/<tenant_id>/shares/<share_id>

Accept: application/json

JSON Request

{
    "share": {
       "display_description": "New description",
       "display_name": "newname"
   }
}

JSON Response

{
   "share": {
       "availability_zone": "nova",
       "created_at": "2013-10-02T09:58:12.000000",
       "description": "New description",
       "share_network_id": "%share_network_id%",
       "export_location": "localhost:/opt/stack/data/manila/mnt/share-%share_id%",
       "id": "%share_id%",
       "links": [
           {
               "href": "http://localhost:8786/v1/%tenant_id%/shares/%share_id%",
               "rel": "self"
           },
           {
               "href": "http://localhost:8786/%tenant_id%/shares/%share_id%",
               "rel": "bookmark"
           }
       ],
       "name": "newname",
       "volume_type": "%volume_type%",
       "share_proto": "NFS",
       "size": 2,
       "snapshot_id": null,
       "status": "available",
       "project_id": "%project_id%",
       "host": "hostname@backendname",
       "metadata": {
                    "key1": "value1", 
                    "key2": "value2"
       }
   }
}
Delete Share

DELETE /v1/<tenant_id>/shares/<share_id>

Show Share Metadata

GET /v1/<tenant_id>/shares/<share_id>/metadata

Accept: application/json

JSON Response

{
    "metadata": {
       "key1": "value1",
       "key2": "value2"
   }
}
Update Share Metadata

PUT /v1/<tenant_id>/shares/<share_id>/metadata

Accept: application/json

JSON Request

{
    "metadata": {
       "key1": "value1"
   }
}

JSON Response

{
    "metadata": {
       "key1": "value1"
   }
}
Set Share Metadata

POST /v1/<tenant_id>/shares/<share_id>/metadata

Accept: application/json

JSON Request

{
    "metadata": {
       "key1": "value1"
   }
}

JSON Response

{
    "metadata": {
       "key1": "value1", 
       "key2": "value2"
   }
}
Unset Share Metadata

DELETE /v1/<tenant_id>/shares/<share_id>/metadata/<key>

Share Actions

Allow access

POST /v1/<tenant_id>/shares/<share_id>/action

Accept: application/json

JSON Request

{
    "os-allow_access": {
       "access_to": "1.1.1.1",
       "access_type": "ip"
   }
}

JSON Response

{
    "access": {
       "access_to": "1.1.1.1",
       "access_type": "ip",
       "created_at": "2013-10-02T10:29:36.539532",
       "deleted": false,
       "deleted_at": null,
       "id": "%access_rule_id%",
       "share_id": "%share_id%",
       "state": "new",
       "updated_at": null
   }
}
Deny Access

POST /v1/<tenant_id>/shares/<share_id>/action

Accept: application/json

JSON Request

{
     "os-deny_access": {
       "access_id": "%access_rule_id%"
   }
}
List Access Rules

POST /v1/<tenant_id>/shares/<share_id>/action

Accept: application/json

JSON Request

{
    "os-access_list": null
}

JSON Response

{
    "access_list": [
       {
           "access_to": "1.1.1.1",
           "access_type": "ip",
           "id": "%access_rule_id%",
           "state": "active"
       }
   ]
}
Reset Share State

POST /v1/<tenant_id>/shares/<share_id>/action

Accept: application/json

JSON Request

{
    "os-reset_status": {"status": "error"}
}

JSON Response is empty

Snapshots

Create Snapshot

POST /v1/<tenant_id>/snapshots

Accept: application/json

JSON Request

{
    "snapshot": {
       "description": null,
       "force": false,
       "name": null,
       "share_id": "%share_id%"
   }
}

JSON Response

{
    "snapshot": {
       "id": "%snapshot_id%",
       "links": [
           {
               "href": "http://localhost:8786/v1/%tenant_id%/snapshots/%snapshot_id%",
               "rel": "self"
           },
           {
               "href": "http://localhost:8786/%tenant_id%/snapshots/%snapshot_id%",
               "rel": "bookmark"
           }
       ],
       "name": null
   }
}
List Snapshots with Details

GET /v1/<tenant_id>/snapshots/detail

Accept: application/json

JSON Response

{
    "snapshots": [
        {
            "status": "available",
            "share_id": "%share_id%",
            "description": "test-desc",
            "links": [
                {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
                {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
            ],
            "id": "%snapshot_id%",
            "size": 1,
            "name": "snap-test",
            "created_at": "2014-05-30T17:20:37.000000",
            "export_location": "10.254.0.3:/shares/share-%share_id%",
            "share_proto": "NFS",
            "share_size": 1
        },
        {
            "status": "available",
            "share_id": "%share_id%",
            "description": "test-desc",
            "links": [
                {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
                {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
            ], 
            "id": "%snapshot_id%",
            "size": 1, 
            "name": "snap-test",
            "created_at": "2014-05-30T17:20:24.000000",
            "export_location": "10.254.0.3:/shares/share-%share_id%",
            "share_proto": "NFS",
            "share_size": 1
        }
    ]
}
Show Snapshot

GET /v1/<tenant_id>/snapshots/<snapshot_id>

Accept: application/json

JSON Response

{
    "snapshot": {
        "status": "available",
        "share_id": "%share_id%",
        "description": "test-desc",
        "links": [
            {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
            {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
        ],
        "id": "%snapshot_id%",
        "size": 1,
        "name": "snap-test",
        "created_at": "2014-05-30T17:20:37.000000",
        "export_location": "10.254.0.3:/shares/share-%share_id%",
        "share_proto": "NFS",
        "share_size": 1
    }
}
Update Snapshot

PUT /v1/<tenant_id>/snapshots/<snapshot_id>

Accept: application/json

JSON Request

{
   "snapshot": {
       "display_description": "New description",
       "display_name": "newname"
   }
}

JSON Response

{
    "snapshot": {
        "status": "available",
        "share_id": "%share_id%",
        "description": "New description",
        "links": [
            {"href": "http://%ip%:8786/v1/%tenant_id%/snapshots/%snapshot_id%", "rel": "self"},
            {"href": "http://%ip%:8786/%tenant_id%/snapshots/%snapshot_id%", "rel": "bookmark"}
        ],
        "id": "%snapshot_id%",
        "size": 1,
        "name": "newname",
        "created_at": "2014-05-30T17:20:37.000000",
        "export_location": "10.254.0.3:/shares/share-%share_id%",
        "share_proto": "NFS",
        "share_size": 1
    }
}
Delete Snapshot

DELETE /v1/<tenant_id>/snapshots/<snapshot_id>

Accept: application/json

Snapshot Actions

Reset Snapshot State

POST /v1/<tenant_id>/snapshots/<snapshot_id>/action

Accept: application/json

JSON Request

{
    "os-reset_status": {"status": "error"}
}

JSON Response is empty

Share Networks

Create Share Network

POST /v1/<tenant_id>/share-networks

Content-Type: application/json

Accept: application/json


JSON Request

{
   "share_network": {
       "name": "test_name",
       "description": "test_description",
       "neutron_net_id": "some_neutron_net_id",
       "neutron_subnet_id": "some_neutron_subnet_id",
   }
}

JSON Response

{
    "share_network": {
       "id": "%share_network_id%",
       "name": "test_name",
       "description": "test_description",
       "neutron_net_id": "%some_neutron_net_id%",
       "neutron_subnet_id": "%some_neutron_subnet_id%",
       "segmentation_id": null,
       "network_type": null,
       "status": null,
       "created_at": "2009-10-11T12:13:14.000000",
       "updated_at": null,
       "ip_version": null,
       "cidr": null,
       "project_id": "%project_id%",
   }
}
List share-networks

GET /v1/<tenant_id>/share-networks

Accept: application/json


JSON Response

{
    "share_networks": [
       {
           "id": "%share_network_id%",
           "name": "private",
           "status": null
       }
   ]
}
List share-networks with details

GET /v1/<tenant_id>/share-networks/detail

Accept: application/json


JSON Response

{
    "share_networks": [
        {
            "status": null,
            "name": "private",
            "segmentation_id": null,
            "created_at": "2014-05-30T17:14:24.000000",
            "neutron_subnet_id": "%neutron_subnet_id%",
            "updated_at": null,
            "network_type": null,
            "neutron_net_id": "%neutron_net_id%",
            "ip_version": null,
            "cidr": null,
            "project_id": "%project_id%",
            "id": "%share_network_id%",
            "description": null
        }
    ]
}
Show share-network

GET /v1/<tenant_id>/share-networks/<share_network_id>

Accept: application/json

JSON Response

{
    "share_network":
       {
           "id": "%share_network_id%",
           "name": "private",
           "status": null
           "segmentation_id": null,
           "created_at": "2014-05-30T17:14:24.000000",
           "neutron_subnet_id": "neutron_subnet_id",
           "updated_at": null,
           "network_type": null,
           "neutron_net_id": "%neutron_net_id%",
           "ip_version": null,
           "cidr": null,
           "project_id": "%project_id%",
           "description": null
       }
}
Update Share Network

PUT /v1/<tenant_id>/share-networks/<share_network_id>

Accept: application/json

JSON Request

{
    "share_network": {
       "description": "newdesc",
       "name": "newname"
   }
}

JSON Response

{
    "share_network": {
        "status": null,
        "name": "newname",
        "segmentation_id": null,
        "created_at": "2014-05-30T17:56:55.000000",
        "neutron_subnet_id": null,
        "updated_at": "2014-05-30T17:57:07.000000",
        "network_type": null,
        "neutron_net_id": null,
        "ip_version": null, "cidr": null,
        "project_id": "%project_id%",
        "id": "%share_network_id%",
        "description": "newdesc"
    }
}
Delete Share Network

DELETE /v1/<tenant_id>/share-networks/<share_network_id>

Add Security Service to Share network

POST /v1/<tenant_id>/share-networks/<share_network_id>/action

Accept: application/json

JSON Request

{
    "add_security_service": {
        "security_service_id": "%security_service_id%"
    }
}

JSON Response

{
    "share_network": {
        "status": null,
        "name": "test",
        "segmentation_id": null,
        "created_at": "2014-06-02T13:57:48.000000",
        "neutron_subnet_id": null,
        "updated_at": null,
        "network_type": null,
        "neutron_net_id": null,
        "ip_version": null,
        "cidr": null, 
        "project_id": "%project_id%",
        "id": "%share_network_id%",
        "description": null
     }
}
Remove Security Service from Share network

POST /v1/<tenant_id>/share-networks/<share_network_id>/action

Accept: application/json

JSON Request

{
    "remove_security_service": {
        "security_service_id": "%security_service_id%"
    }
}

JSON Response

{
    "share_network": {
        "status": null,
        "name": "test",
        "segmentation_id": null,
        "created_at": "2014-06-02T13:57:48.000000",
        "neutron_subnet_id": null,
        "updated_at": null,
        "network_type": null,
        "neutron_net_id": null,
        "ip_version": null,
        "cidr": null, 
        "project_id": "%project_id%",
        "id": "%share_network_id%",
        "description": null
     }
}

Security Services

Create Security Service

POST /v1/<tenant_id>/security-services

Content-Type: application/json

Accept: application/json


JSON Request

{
    "security_service": {
        "domain": "domain",
        "name": "name",
        "dns_ip": "dns-ip",
        "sid": "security",
        "password": "password",
        "type": "ldap",
        "description": "description"
    }
}

JSON Response

{
    "security_service": {
        "status": "NEW",
        "domain": "domain",
        "description": "description",
        "dns_ip": "dns-ip",
        "updated_at": null,
        "password": "password",
        "id": "%security_service_id%",
        "name": "name",
        "created_at": "2014-06-02T08:45:53.685967",
        "server": null,
        "sid": "security",
        "project_id": "%project_id%",
        "type": "ldap"
    }
}
List Security Services

GET /v1/<tenant_id>/security-services

Accept: application/json


JSON Response

{
    "security_services": [
        {
            "status": "NEW",
            "type": "ldap",
            "id": "%security_service_id%",
            "name": "name"
        }
    ]
}
List Security Service with details

GET /v1/<tenant_id>/security-services/detail

Accept: application/json


JSON Response

{
    "security_services": [
        {
            "status": "NEW",
            "domain": "domain",
            "description": "description",
            "dns_ip": "dns-ip",
            "updated_at": null,
            "password": "password",
            "id": "%security_service_id%",
            "name": "name",
            "created_at": "2014-06-02T08:45:53.000000",
            "server": null,
            "sid": "security",
            "project_id": "%project_id%",
            "type": "ldap"
        }
    ]
}
List Security Services for Share Network

GET /v1/<tenant_id>/security-services?share_network_id=%share_network_id%

Accept: application/json

JSON Response

{
    "security_services": [
        {
            "status": "NEW",
            "type": "ldap",
            "id": "%security_service_id%",
            "name": "name"
        }
    ]
}
Show Security Service

GET /v1/<tenant_id>/security-services/<security_service_id>

Accept: application/json

JSON Response

{
    "security_service": {
        "status": "NEW",
        "domain": "domain",
        "description": "description",
        "dns_ip": "dns-ip",
        "updated_at": null,
        "password": "password",
        "id": "%security_service_id%",
        "name": "name",
        "created_at": "2014-06-02T08:45:53.000000",
        "server": null,
        "sid": "security",
        "project_id": "%project_id%",
        "type": "ldap"
    }
}
Update Security Service

PUT /v1/<tenant_id>/security-services/<security_service_id>

Accept: application/json

JSON Request

{
    "security_service": {
        "domain": "newdomain",
        "description": "newdescription",
        "dns_ip": "newdns-ip",
        "sid": "newsecurity",
        "password": "newpassword",
        "name": "newname"
    }
}

JSON Response

{
    "security_service": {
        "status": "NEW",
        "domain": "newdomain",
        "description": "newdescription",
        "dns_ip": "newdns-ip",
        "updated_at": "2014-06-02T08:55:25.809860",
        "password": "newpassword",
        "id": "%security_service_id%",
        "name": "newname",
        "created_at": "2014-06-02T08:45:53.000000",
        "server": null,
        "sid": "newsecurity",
        "project_id": "%project_id%",
        "type": "ldap"
    }
}
Delete Security Service

DELETE /v1/<tenant_id>/security-services/<security_service_id>

Share Servers

List Share Servers

GET /v1/<tenant_id>/share-servers

Accept: application/json

JSON Response

{
    "share_servers": [
        {
            "status": "ACTIVE",
            "updated_at": "2014-06-03T13:52:04.000000",
            "share_network_name": "private",
            "host": "localhost@paris",
            "project_id": "%project_id%",
            "id": "e9a6fa06-833f-4ab6-aa20-5d5abf8737c5"
        }
    ]
}
Show Share Server

GET /v1/<tenant_id>/share-server/<share_server_id>

Accept: application/json

JSON Response

{
    "share_server": {
        "status": "ACTIVE",
        "backend_details": {
            "instance_id": "%instance_id%",
            "ip": "10.254.0.3",
            "username": "ubuntu",
            "password": "ubuntu",
            "pk_path": "/home/stack/.ssh/manila-service0ce582d2-671e-4286-af25-74f8f40fe4d6"
        },
        "created_at": "2014-06-03T13:49:10.000000",
        "updated_at": "2014-06-03T13:52:04.000000",
        "share_network_name": "private",
        "host": "localhost@paris",
        "project_id": "%project_id%",
        "id": "%share_server_id%"
    }
}
Show Details of Share Server

GET /v1/<tenant_id>/share-server/<share_server_id>/details

Accept: application/json

JSON Response

{
    "details": {
        "instance_id": "%instance_id%",
        "ip": "10.254.0.3",
        "username": "ubuntu",
        "password": "ubuntu",
        "pk_path": "/home/stack/.ssh/manila-service0ce582d2-671e-4286-af25-74f8f40fe4d6"
    }
}

Limits

List Limits

GET /v1/<tenant_id>/limits

Content-Type: application/json

Accept: application/json

JSON Response

{
    "limits": {
        "rate": [],
        "absolute": {
            "totalShareNetworksUsed": 3,
            "maxTotalShareGigabytes": 1000,
            "maxTotalShareNetworks": 5,
            "totalSharesUsed": 10,
            "totalShareGigabytesUsed": 11,
            "totalShareSnapshotsUsed": 1,
            "maxTotalShares": 10,
            "maxTotalShareSnapshots": 10
        }
    }
}

Extensions

List Extensions

GET /v1/<tenant_id>/extensions

Content-Type: application/json

Accept: application/json

JSON Response

{
    "extensions": [
        {
            "updated": "2013-06-09T00:00:00+00:00",
            "name": "ExtendedQuotas",
            "links": [],
            "namespace": "http://docs.openstack.org/compute/ext/extended_quotas/api/v1.1",
            "alias": "os-extended-quotas",
            "description": "Adds ability for admins to delete quota\n    and optionally force the update Quota command.\n    "
        },
        {
            "updated": "2012-03-12T00:00:00+00:00",
            "name": "QuotaClasses",
            "links": [],
            "namespace": "http://docs.openstack.org/volume/ext/quota-classes-sets/api/v1.1",
            "alias": "os-quota-class-sets",
            "description": "Quota classes management support"
        },
        {
            "updated": "2011-08-08T00:00:00+00:00",
            "name": "Quotas",
            "links": [], 
            "namespace": "http://docs.openstack.org/compute/ext/quotas-sets/api/v1.1",
            "alias": "os-quota-sets",
            "description": "Quotas management support"
        },
        {
            "updated": "2011-08-24T00:00:00+00:00",
            "name": "TypesManage",
            "links": [],
            "namespace": "http://docs.openstack.org/share/ext/types-manage/api/v1",
            "alias": "os-types-manage",
            "description": "Types manage support."
        },
        {
            "updated": "2013-07-18T00:00:00+00:00",
            "name": "UserQuotas",
            "links": [],
            "namespace": "http://docs.openstack.org/compute/ext/user_quotas/api/v1.1",
            "alias": "os-user-quotas",
            "description": "Project user quota support."
        },
        {
            "updated": "2012-08-14T00:00:00+00:00",
            "name": "ShareActions",
            "links": [],
            "namespace": "",
            "alias": "share-actions",
            "description": "Enable share actions."
        },
        {
            "updated": "2011-08-24T00:00:00+00:00",
            "name": "TypesExtraSpecs",
            "links": [],
            "namespace": "http://docs.openstack.org/share/ext/types-extra-specs/api/v1",
            "alias": "os-types-extra-specs",
            "description": "Type extra specs support."
        },
        {
            "updated": "2012-08-25T00:00:00+00:00",
            "name": "AdminActions",
            "links": [],
            "namespace": "http://docs.openstack.org/share/ext/admin-actions/api/v1.1",
            "alias": "os-admin-actions",
            "description": "Enable admin actions."
        },
        {
            "updated": "2012-10-28T00:00:00-00:00",
            "name": "Services",
            "links": [],
            "namespace": "http://docs.openstack.org/volume/ext/services/api/v2",
            "alias": "os-services",
            "description": "Services support"
        },
        {
            "updated": "2014-03-27T00:00:00+00:00",
            "name": "UsedLimits", 
            "links": [],
            "namespace": "http://docs.openstack.org/share/ext/used-limits/api/v1.0",
            "alias": "os-used-limits",
            "description": "Provide data on limited resources that are being used."
        }
    ]
}

Services

List Services

GET /v1/<tenant_id>/os-services

Content-Type: application/json

Accept: application/json

JSON Response

{
    "services": [
        {
            "status": "enabled",
            "binary": "manila-scheduler",
            "zone": "nova",
            "state": "up",
            "updated_at": "2014-06-02T14:57:52.000000",
            "host": "nosb-devstack"
        },
        {
            "status": "enabled",
            "binary": "manila-share", 
            "zone": "nova", 
            "state": "up", 
            "updated_at": "2014-06-02T14:57:52.000000", 
            "host": "nosb-devstack@paris"
        },
        {"status": "enabled", 
            "binary": "manila-share", 
            "zone": "nova", 
            "state": "up", 
            "updated_at": "2014-06-02T14:57:47.000000", 
            "host": "nosb-devstack@london"
        }
    ]
}
List Services With Filters

GET /v1/<tenant_id>/os-services?status=enabled&binary=manila-share&host=nosb-devstack%40london&state=up&zone=nova

Content-Type: application/json

Accept: application/json

JSON Response

{
    "services": [
        {
            "status": "enabled", 
            "binary": "manila-share", 
            "zone": "nova", 
            "state": "up", 
            "updated_at": "2014-06-02T14:57:47.000000", 
            "host": "nosb-devstack@london"
        }
    ]
}

Volume Types

Create Volume Type

POST /v1/<tenant_id>/types/%volume_type_id%

Content-Type: application/json

Accept: application/json

JSON Request

{
   "volume_type": {
       "name": "test",
   }
}

JSON Response

{
    "volume_type": {
        "extra_specs": {},
        "name": "test",
        "id": "%volume_type_id%"
    }
}
Set Key for Volume Type

POST /v1/<tenant_id>/types/%volume_type_id%/extra_specs

Content-Type: application/json

Accept: application/json

JSON Request

{
    "extra_specs": {
        "k": "v"
    }
}

JSON Response

{
    "extra_specs": {
        "k": "v"
    }
}
Unset Key for Volume Type

DELETE /v1/<tenant_id>/types/%volume_type_id%/extra_specs/%key%

Content-Type: application/json

Accept: application/json

JSON Request

{
    "extra_specs": {
        "k": "v"
    }
}

JSON Response is empty

List Volume Types

GET /v1/<tenant_id>/types

Content-Type: application/json

Accept: application/json

JSON Response

{
    "volume_types": [
        {
            "extra_specs": {"q": "w"},
            "name": "test",
            "id": "%volume_type_id%"
        }, 
    ]
}
List Extra Specs for Volume Type

GET /v1/<tenant_id>/types/<volume_type_id>/extra_specs

Content-Type: application/json

Accept: application/json

JSON Response

{
    "extra_specs": {
        "share_backend_name": "TEST_BACKEND"
    }
}
Delete Volume Type

DELETE /v1/<tenant_id>/types/<volume_type_id>