Portworx · Capability

OpenStorage SDK — OpenStoragePolicy

OpenStorage SDK — OpenStoragePolicy. 8 operations. Lead operation: Enumerate returns a list of storage policies. Self-contained Naftiko capability covering one Portworx business surface.

Run with Naftiko PortworxOpenStoragePolicy

What You Can Do

GET
Openstoragepolicyenumerate — Enumerate returns a list of storage policies
/v1/v1/storagepolicies
POST
Openstoragepolicycreate — Creates a storage policy
/v1/v1/storagepolicies
PUT
Openstoragepolicyupdate — Updates specified storage policy
/v1/v1/storagepolicies
GET
Openstoragepolicydefaultinspect — DefaultInspect return default storage policy if any, otherwise
/v1/v1/storagepolicies/default
POST
Openstoragepolicysetdefault — Set specified storage policy as default policy
/v1/v1/storagepolicies/default/{name}
GET
Openstoragepolicyinspect — Inspect returns information about a specified storage policy
/v1/v1/storagepolicies/inspect/{name}
POST
Openstoragepolicyrelease — Release specified storage policy constraint for volume
/v1/v1/storagepolicies/release
DELETE
Openstoragepolicydelete — Deletes specified storage policy
/v1/v1/storagepolicies/{name}

MCP Tools

enumerate-returns-list-storage-policies

Enumerate returns a list of storage policies

read-only idempotent
creates-storage-policy

Creates a storage policy

updates-specified-storage-policy

Updates specified storage policy

idempotent
defaultinspect-return-default-storage-policy

DefaultInspect return default storage policy if any, otherwise

read-only idempotent
set-specified-storage-policy-default

Set specified storage policy as default policy

inspect-returns-information-about-specified

Inspect returns information about a specified storage policy

read-only idempotent
release-specified-storage-policy-constraint

Release specified storage policy constraint for volume

deletes-specified-storage-policy

Deletes specified storage policy

idempotent

Capability Spec

portworx-openstoragepolicy.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: OpenStorage SDK — OpenStoragePolicy
  description: 'OpenStorage SDK — OpenStoragePolicy. 8 operations. Lead operation: Enumerate returns a list of storage policies.
    Self-contained Naftiko capability covering one Portworx business surface.'
  tags:
  - Portworx
  - OpenStoragePolicy
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PORTWORX_API_KEY: PORTWORX_API_KEY
capability:
  consumes:
  - type: http
    namespace: portworx-openstoragepolicy
    baseUri: ''
    description: OpenStorage SDK — OpenStoragePolicy business capability. Self-contained, no shared references.
    resources:
    - name: v1-storagepolicies
      path: /v1/storagepolicies
      operations:
      - name: openstoragepolicyenumerate
        method: GET
        description: Enumerate returns a list of storage policies
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: openstoragepolicycreate
        method: POST
        description: Creates a storage policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: openstoragepolicyupdate
        method: PUT
        description: Updates specified storage policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-storagepolicies-default
      path: /v1/storagepolicies/default
      operations:
      - name: openstoragepolicydefaultinspect
        method: GET
        description: DefaultInspect return default storage policy if any, otherwise
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v1-storagepolicies-default-name
      path: /v1/storagepolicies/default/{name}
      operations:
      - name: openstoragepolicysetdefault
        method: POST
        description: Set specified storage policy as default policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          description: name of policy to set as default storage policy
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-storagepolicies-inspect-name
      path: /v1/storagepolicies/inspect/{name}
      operations:
      - name: openstoragepolicyinspect
        method: GET
        description: Inspect returns information about a specified storage policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          description: name of storage policy to retrive
          required: true
    - name: v1-storagepolicies-release
      path: /v1/storagepolicies/release
      operations:
      - name: openstoragepolicyrelease
        method: POST
        description: Release specified storage policy constraint for volume
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-storagepolicies-name
      path: /v1/storagepolicies/{name}
      operations:
      - name: openstoragepolicydelete
        method: DELETE
        description: Deletes specified storage policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          description: name of storage policy to delete
          required: true
    authentication:
      type: bearer
      token: '{{env.PORTWORX_API_KEY}}'
  exposes:
  - type: rest
    namespace: portworx-openstoragepolicy-rest
    port: 8080
    description: REST adapter for OpenStorage SDK — OpenStoragePolicy. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1/storagepolicies
      name: v1-storagepolicies
      description: REST surface for v1-storagepolicies.
      operations:
      - method: GET
        name: openstoragepolicyenumerate
        description: Enumerate returns a list of storage policies
        call: portworx-openstoragepolicy.openstoragepolicyenumerate
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: openstoragepolicycreate
        description: Creates a storage policy
        call: portworx-openstoragepolicy.openstoragepolicycreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: openstoragepolicyupdate
        description: Updates specified storage policy
        call: portworx-openstoragepolicy.openstoragepolicyupdate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/storagepolicies/default
      name: v1-storagepolicies-default
      description: REST surface for v1-storagepolicies-default.
      operations:
      - method: GET
        name: openstoragepolicydefaultinspect
        description: DefaultInspect return default storage policy if any, otherwise
        call: portworx-openstoragepolicy.openstoragepolicydefaultinspect
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/storagepolicies/default/{name}
      name: v1-storagepolicies-default-name
      description: REST surface for v1-storagepolicies-default-name.
      operations:
      - method: POST
        name: openstoragepolicysetdefault
        description: Set specified storage policy as default policy
        call: portworx-openstoragepolicy.openstoragepolicysetdefault
        with:
          name: rest.name
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/storagepolicies/inspect/{name}
      name: v1-storagepolicies-inspect-name
      description: REST surface for v1-storagepolicies-inspect-name.
      operations:
      - method: GET
        name: openstoragepolicyinspect
        description: Inspect returns information about a specified storage policy
        call: portworx-openstoragepolicy.openstoragepolicyinspect
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/storagepolicies/release
      name: v1-storagepolicies-release
      description: REST surface for v1-storagepolicies-release.
      operations:
      - method: POST
        name: openstoragepolicyrelease
        description: Release specified storage policy constraint for volume
        call: portworx-openstoragepolicy.openstoragepolicyrelease
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/storagepolicies/{name}
      name: v1-storagepolicies-name
      description: REST surface for v1-storagepolicies-name.
      operations:
      - method: DELETE
        name: openstoragepolicydelete
        description: Deletes specified storage policy
        call: portworx-openstoragepolicy.openstoragepolicydelete
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: portworx-openstoragepolicy-mcp
    port: 9090
    transport: http
    description: MCP adapter for OpenStorage SDK — OpenStoragePolicy. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: enumerate-returns-list-storage-policies
      description: Enumerate returns a list of storage policies
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portworx-openstoragepolicy.openstoragepolicyenumerate
      outputParameters:
      - type: object
        mapping: $.
    - name: creates-storage-policy
      description: Creates a storage policy
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portworx-openstoragepolicy.openstoragepolicycreate
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: updates-specified-storage-policy
      description: Updates specified storage policy
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: portworx-openstoragepolicy.openstoragepolicyupdate
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: defaultinspect-return-default-storage-policy
      description: DefaultInspect return default storage policy if any, otherwise
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portworx-openstoragepolicy.openstoragepolicydefaultinspect
      outputParameters:
      - type: object
        mapping: $.
    - name: set-specified-storage-policy-default
      description: Set specified storage policy as default policy
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portworx-openstoragepolicy.openstoragepolicysetdefault
      with:
        name: tools.name
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: inspect-returns-information-about-specified
      description: Inspect returns information about a specified storage policy
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: portworx-openstoragepolicy.openstoragepolicyinspect
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: release-specified-storage-policy-constraint
      description: Release specified storage policy constraint for volume
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: portworx-openstoragepolicy.openstoragepolicyrelease
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: deletes-specified-storage-policy
      description: Deletes specified storage policy
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: portworx-openstoragepolicy.openstoragepolicydelete
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.