Configuration Framework Service v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The Configuration Framework Service (CFS) manages the launch of Ansible Execution Environments for image customization, node personalization, and node reconfiguration. CFS manages the Ansible staging container that pulls Ansible play/role content and inventory (optional) from the git server and launches the Ansible Execution Environment.

CFS includes the following components:

  • CFS REST API
  • A Kubernetes operator running on the management services infrastructure to handle the lifecycle and reporting of configuration sessions.
  • Pre-packaged Ansible Execution Environment(s) (AEE) with values tuned for performant configuration for executing Ansible playbooks against Cray compute and user access nodes.

CFS uses a Git version control server running in the management services infrastructure for management of the configuration manifest lifecycle.

The CFS API allows an administrator to customize the compute and user access nodes in the following ways:

  • Customize the bootable images prior to their use on the system. This process is called

    image customization. CFS uses IMS to stage images in an ssh container and then modifies one or more images using Ansible.

  • Customize live nodes during boot or post-boot. This process is called node personalization.

    Node personalization involves applying software and/or configuration that differentiates a node or a group of nodes from all other groups of nodes. This should be used in scenarios where configuration cannot be applied prior to booting a node. It is typically best to make changes pre-boot via image customization. This ensures Ansible only has to run once against an image, rather than against every individual booted node. The BOS and IMS APIs support CFS to customize live nodes during boot time.

Resources

/healthz - Check service health

/options - Updates service options.

/sessions - Create, retrieve, or delete configuration sessions.

/components - Add, update, retrieve, or delete component information.

/configurations - Add, update, retrieve or delete desired configuration states.

/sources - Add, update, retrieve, or delete playbook source information. (v3 api only)

Workflows

Image Customization

GET /images

Identify the IMS image that you want to customize. Note the id of the image that you want to customize.

POST /sessions

Create a configuration session and push the configuration to the specific image in IMS. You must specify the target definition as image and provide id of the image that you want to customize. This step customizes the image as per Ansible playbook and saves the image in the IMS.

Node Personalization

POST /sessions

Create a configuration framework session to push configuration to nodes that have already been booted, specifying the target (optional), the git repository location, inventory (optional), and gives the session a unique name.

GET /sessions/{session_name}

View details and status for the specific session_name.

DELETE /sessions/{session_name}

Delete all session history for session_name (as needed).

The default content type for the CFS API is application/json. Unsuccessful API calls return a content type of application/problem+json as per RFC 7807.

Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer

version

get_version

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/ HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /

Get CFS service version

Return the CFS service version that is currently running.

Example responses

200 Response

{
  "major": "1",
  "minor": "0",
  "patch": "10"
}

Responses

Status Meaning Description Schema
200 OK Version information for the service Version
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_versions

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/versions HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/versions \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/versions', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/versions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /versions

Get CFS service version

Return the CFS service version that is currently running.

Example responses

200 Response

{
  "major": "1",
  "minor": "0",
  "patch": "10"
}

Responses

Status Meaning Description Schema
200 OK Version information for the service Version
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_versions_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2 HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2

Get CFS service version

Return the CFS service version that is currently running.

Example responses

200 Response

{
  "major": "1",
  "minor": "0",
  "patch": "10"
}

Responses

Status Meaning Description Schema
200 OK Version information for the service Version
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_versions_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3 HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3

Get CFS service version

Return the CFS service version that is currently running.

Example responses

200 Response

{
  "major": "1",
  "minor": "0",
  "patch": "10"
}

Responses

Status Meaning Description Schema
200 OK Version information for the service Version
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

healthz

get_healthz

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/healthz HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/healthz \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/healthz', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/healthz", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /healthz

Get service health details

Get cfs-api health details.

Example responses

200 Response

{
  "db_status": "string",
  "kafka_status": "string"
}

Responses

Status Meaning Description Schema
200 OK Status information for the service Healthz
503 Service Unavailable Status information for the service Healthz
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

options

get_options_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2/options HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2/options \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2/options', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2/options", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2/options

Retrieve the configuration service options

Retrieve the list of configuration service options.

Example responses

200 Response

{
  "hardwareSyncInterval": 5,
  "batcherCheckInterval": 5,
  "batchSize": 120,
  "batchWindow": 120,
  "defaultBatcherRetryPolicy": 1,
  "defaultPlaybook": "site.yml",
  "defaultAnsibleConfig": "cfs-default-ansible-cfg",
  "sessionTTL": "24h",
  "additionalInventoryUrl": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "batcherMaxBackoff": 3600,
  "batcherDisable": true,
  "batcherPendingTimeout": 0,
  "loggingLevel": "string"
}

Responses

Status Meaning Description Schema
200 OK A collection of service-wide configuration options V2Options
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_options_v2

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v2/options HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v2/options \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v2/options', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v2/options", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v2/options

Update configuration service options

Update one or more of the configuration service options.

Body parameter

{
  "hardwareSyncInterval": 5,
  "batcherCheckInterval": 5,
  "batchSize": 120,
  "batchWindow": 120,
  "defaultBatcherRetryPolicy": 1,
  "defaultPlaybook": "site.yml",
  "defaultAnsibleConfig": "cfs-default-ansible-cfg",
  "sessionTTL": "24h",
  "additionalInventoryUrl": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "batcherMaxBackoff": 3600,
  "batcherDisable": true,
  "batcherPendingTimeout": 0,
  "loggingLevel": "string"
}

Parameters

Name In Type Required Description
body body V2Options true Service-wide configuration options

Example responses

200 Response

{
  "hardwareSyncInterval": 5,
  "batcherCheckInterval": 5,
  "batchSize": 120,
  "batchWindow": 120,
  "defaultBatcherRetryPolicy": 1,
  "defaultPlaybook": "site.yml",
  "defaultAnsibleConfig": "cfs-default-ansible-cfg",
  "sessionTTL": "24h",
  "additionalInventoryUrl": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "batcherMaxBackoff": 3600,
  "batcherDisable": true,
  "batcherPendingTimeout": 0,
  "loggingLevel": "string"
}

Responses

Status Meaning Description Schema
200 OK A collection of service-wide configuration options V2Options
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_options_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/options HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/options \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/options', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/options", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/options

Retrieve the configuration service options

Retrieve the list of configuration service options.

Example responses

200 Response

{
  "hardware_sync_interval": 5,
  "batcher_check_interval": 5,
  "batch_size": 120,
  "batch_window": 120,
  "default_batcher_retry_policy": 1,
  "default_playbook": "site.yml",
  "default_ansible_config": "cfs-default-ansible-cfg",
  "session_ttl": "24h",
  "additional_inventory_url": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "additional_inventory_source": "example-source",
  "batcher_max_backoff": 3600,
  "batcher_disable": true,
  "batcher_pending_timeout": 1,
  "logging_level": "DEBUG",
  "default_page_size": 1,
  "debug_wait_time": 0,
  "include_ara_links": true
}

Responses

Status Meaning Description Schema
200 OK A collection of service-wide configuration options V3Options
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_options_v3

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v3/options HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v3/options \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v3/options', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v3/options", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v3/options

Update configuration service options

Update one or more of the configuration service options.

Body parameter

{
  "hardware_sync_interval": 5,
  "batcher_check_interval": 5,
  "batch_size": 120,
  "batch_window": 120,
  "default_batcher_retry_policy": 1,
  "default_ansible_config": "cfs-default-ansible-cfg",
  "session_ttl": "24h",
  "additional_inventory_url": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "additional_inventory_source": "example-source",
  "batcher_max_backoff": 3600,
  "batcher_disable": true,
  "batcher_pending_timeout": 1,
  "logging_level": "DEBUG",
  "default_page_size": 1,
  "debug_wait_time": 0,
  "include_ara_links": true
}

Parameters

Name In Type Required Description
body body V3Options true Service-wide configuration options

Example responses

200 Response

{
  "hardware_sync_interval": 5,
  "batcher_check_interval": 5,
  "batch_size": 120,
  "batch_window": 120,
  "default_batcher_retry_policy": 1,
  "default_playbook": "site.yml",
  "default_ansible_config": "cfs-default-ansible-cfg",
  "session_ttl": "24h",
  "additional_inventory_url": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "additional_inventory_source": "example-source",
  "batcher_max_backoff": 3600,
  "batcher_disable": true,
  "batcher_pending_timeout": 1,
  "logging_level": "DEBUG",
  "default_page_size": 1,
  "debug_wait_time": 0,
  "include_ara_links": true
}

Responses

Status Meaning Description Schema
200 OK A collection of service-wide configuration options V3Options
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

sessions

get_sessions_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2/sessions HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2/sessions \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2/sessions', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2/sessions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2/sessions

Retrieve configuration framework sessions

Retrieve all the configuration framework sessions on the system.

Parameters

Name In Type Required Description
age query string false Return only sessions older than the given age. Age is given in the format “1d” or “6h” DEPRECATED: This field has been replaced by min_age and max_age
min_age query string false Return only sessions older than the given age. Age is given in the format “1d” or “6h”
max_age query string false Return only sessions younger than the given age. Age is given in the format “1d” or “6h”
status query string false Return only sessions with the given status.
name_contains query string false Return only sessions whose session name contains the given string.
succeeded query string false Return only sessions that have succeeded/failed.
tags query string false Return only sessions whose have the matching tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only sessions that match all tags will be returned.

Enumerated Values

Parameter Value
status pending
status running
status complete
succeeded none
succeeded true
succeeded false
succeeded unknown

Example responses

200 Response

[
  {
    "name": "session-20190728032600",
    "configuration": {
      "name": "example-config",
      "limit": "layer1,layer3"
    },
    "ansible": {
      "config": "cfs-default-ansible-cfg",
      "limit": "host1",
      "verbosity": 0,
      "passthrough": "string"
    },
    "target": {
      "definition": "spec",
      "groups": [
        {
          "name": "test-computes",
          "members": [
            "nid000001",
            "nid000002",
            "nid000003"
          ]
        }
      ],
      "image_map": [
        {
          "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
          "result_name": "new-test-image"
        }
      ]
    },
    "status": {
      "artifacts": [
        {
          "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
          "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
          "type": "ims_customized_image"
        }
      ],
      "session": {
        "job": "cray-cfs-job-session-20190728032600",
        "completionTime": "2019-07-28T03:26:00Z",
        "startTime": "2019-07-28T03:26:00Z",
        "status": "pending",
        "succeeded": "none"
      }
    },
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of configuration sessions V2SessionArray
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

create_session_v2

Code samples

POST https://api-gw-service-nmn.local/apis/cfs/v2/sessions HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X POST https://api-gw-service-nmn.local/apis/cfs/v2/sessions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gw-service-nmn.local/apis/cfs/v2/sessions', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gw-service-nmn.local/apis/cfs/v2/sessions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v2/sessions

Create a configuration framework session

Create a new configuration session. A configuration session stages Ansible inventory, launches one or more Ansible Execution Environments (AEE) as containers in the management services infrastructure, and tears down the environments as required. When a session is targeted for image customization, the inventory staging involves using IMS to expose the requested image roots, tearing down the image roots, and generating new boot artifacts afterwards. The session will checkout the prescribed branch or commit of the configuration repository and populate the configuration manifest to the AEE. The Ansible execution begins with an inventory prescribed by the user through CFS. A configuration session also tracks the status of the different stages of the operation and reports information on the success of its execution.

Body parameter

{
  "name": "session-20190728032600",
  "configurationName": "example-config",
  "configurationLimit": "layer1,layer3",
  "ansibleLimit": "host1",
  "ansibleConfig": "cfs-default-ansible-cfg",
  "ansibleVerbosity": 0,
  "ansiblePassthrough": "string",
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Parameters

Name In Type Required Description
body body V2SessionCreate true A JSON object for creating Config Framework Sessions

Example responses

200 Response

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "completionTime": "2019-07-28T03:26:00Z",
      "startTime": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration session V2Session
400 Bad Request Bad Request ProblemDetails
409 Conflict A session with the same name already exists. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_sessions_v2

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v2/sessions HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v2/sessions \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v2/sessions', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v2/sessions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v2/sessions

Delete multiple configuration framework sessions

Delete multiple configuration sessions. If filters are provided, only sessions matching all filters will be deleted. By default only completed sessions will be deleted.

Parameters

Name In Type Required Description
age query string false Deletes only sessions older than the given age. Age is given in the format “1d” or “6h” DEPRECATED: This field has been replaced by min_age and max_age
min_age query string false Return only sessions older than the given age. Age is given in the format “1d” or “6h”
max_age query string false Return only sessions younger than the given age. Age is given in the format “1d” or “6h”
status query string false Deletes only sessions with the given status.
name_contains query string false Delete only sessions whose session name contains the given string.
succeeded query string false Delete only sessions that have succeeded/failed.
tags query string false Return only sessions whose have the matching tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only sessions that match all tags will be deleted.

Enumerated Values

Parameter Value
status pending
status running
status complete
succeeded none
succeeded true
succeeded false
succeeded unknown

Example responses

400 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_session_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2/sessions/{session_name}

Retrieve a configuration framework session by session_name

View details about a specific configuration session. This allows you to track the status of the session and the Ansible execution through the session.

Parameters

Name In Type Required Description
session_name path string true Config Framework Session name

Example responses

200 Response

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "completionTime": "2019-07-28T03:26:00Z",
      "startTime": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration session V2Session
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_session_v2

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v2/sessions/{session_name}

Update a configuration framework session

Update the status of an existing configuration framework session

Parameters

Name In Type Required Description
session_name path string true Config Framework Session name

Example responses

200 Response

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "completionTime": "2019-07-28T03:26:00Z",
      "startTime": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration session V2Session
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_session_v2

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name} \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v2/sessions/{session_name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v2/sessions/{session_name}

Delete a configuration framework session

Deleting a configuration session deletes the Kubernetes objects associated with the session and also deletes the session history. The operation cannot be undone.

Parameters

Name In Type Required Description
session_name path string true Config Framework Session name

Example responses

404 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_sessions_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/sessions HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/sessions \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/sessions', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/sessions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/sessions

Retrieve configuration framework sessions

Retrieve all the configuration framework sessions on the system.

Parameters

Name In Type Required Description
limit query integer false When set, CFS will only return a number of sessions up to this limit. Combined with after_id, this enables paging across results
after_id query string false When set, CFS will only return the sessions after the session specified. Combined with limit, this enables paging across results.
min_age query string false Return only sessions older than the given age. Age is given in the format “1d” or “6h”
max_age query string false Return only sessions younger than the given age. Age is given in the format “1d” or “6h”
status query string false Return only sessions with the given status.
name_contains query string false Return only sessions whose session name contains the given string.
succeeded query string false Return only sessions that have succeeded/failed.
tags query string false Return only sessions whose have the matching tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only sessions that match all tags will be returned.

Enumerated Values

Parameter Value
status pending
status running
status complete
status
succeeded none
succeeded true
succeeded false
succeeded unknown
succeeded

Example responses

200 Response

{
  "sessions": [
    {
      "name": "session-20190728032600",
      "configuration": {
        "name": "example-config",
        "limit": "layer1,layer3"
      },
      "ansible": {
        "config": "cfs-default-ansible-cfg",
        "limit": "host1",
        "verbosity": 0,
        "passthrough": "string"
      },
      "target": {
        "definition": "spec",
        "groups": [
          {
            "name": "test-computes",
            "members": [
              "nid000001",
              "nid000002",
              "nid000003"
            ]
          }
        ],
        "image_map": [
          {
            "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
            "result_name": "new-test-image"
          }
        ]
      },
      "status": {
        "artifacts": [
          {
            "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
            "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
            "type": "ims_customized_image"
          }
        ],
        "session": {
          "job": "cray-cfs-job-session-20190728032600",
          "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
          "completion_time": "2019-07-28T03:26:00Z",
          "start_time": "2019-07-28T03:26:00Z",
          "status": "pending",
          "succeeded": "none"
        }
      },
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "debug_on_failure": false,
      "logs": "string"
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A collection of configuration sessions V3SessionDataCollection
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

create_session_v3

Code samples

POST https://api-gw-service-nmn.local/apis/cfs/v3/sessions HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X POST https://api-gw-service-nmn.local/apis/cfs/v3/sessions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gw-service-nmn.local/apis/cfs/v3/sessions', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gw-service-nmn.local/apis/cfs/v3/sessions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v3/sessions

Create a configuration framework session

Create a new configuration session. A configuration session stages Ansible inventory, launches one or more Ansible Execution Environments (AEE) as containers in the management services infrastructure, and tears down the environments as required. When a session is targeted for image customization, the inventory staging involves using IMS to expose the requested image roots, tearing down the image roots, and generating new boot artifacts afterwards. The session will checkout the prescribed branch or commit of the configuration repository and populate the configuration manifest to the AEE. The Ansible execution begins with an inventory prescribed by the user through CFS. A configuration session also tracks the status of the different stages of the operation and reports information on the success of its execution.

Body parameter

{
  "name": "session-20190728032600",
  "configuration_name": "example-config",
  "configuration_limit": "layer1,layer3",
  "ansible_limit": "host1",
  "ansible_config": "cfs-default-ansible-cfg",
  "ansible_verbosity": 0,
  "ansible_passthrough": "",
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "debug_on_failure": false
}

Parameters

Name In Type Required Description
body body V3SessionCreate true A JSON object for creating Config Framework Sessions

Example responses

201 Response

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
      "completion_time": "2019-07-28T03:26:00Z",
      "start_time": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "debug_on_failure": false,
  "logs": "string"
}

Responses

Status Meaning Description Schema
201 Created A single configuration session V3SessionData
400 Bad Request Bad Request ProblemDetails
409 Conflict A session with the same name already exists. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_sessions_v3

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v3/sessions HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v3/sessions \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v3/sessions', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v3/sessions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v3/sessions

Delete multiple configuration framework sessions

Delete multiple configuration sessions. If filters are provided, only sessions matching all filters will be deleted. By default only completed sessions will be deleted.

Parameters

Name In Type Required Description
min_age query string false Return only sessions older than the given age. Age is given in the format “1d” or “6h”
max_age query string false Return only sessions younger than the given age. Age is given in the format “1d” or “6h”
status query string false Deletes only sessions with the given status.
name_contains query string false Delete only sessions whose session name contains the given string.
succeeded query string false Delete only sessions that have succeeded/failed.
tags query string false Return only sessions whose have the matching tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only sessions that match all tags will be deleted.

Enumerated Values

Parameter Value
status pending
status running
status complete
status
succeeded none
succeeded true
succeeded false
succeeded unknown
succeeded

Example responses

200 Response

{
  "session_ids": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK A collection of configuration session IDs V3SessionIdCollection
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_session_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/sessions/{session_name}

Retrieve a configuration framework session by session_name

View details about a specific configuration session. This allows you to track the status of the session and the Ansible execution through the session.

Parameters

Name In Type Required Description
session_name path string true Config Framework Session name

Example responses

200 Response

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
      "completion_time": "2019-07-28T03:26:00Z",
      "start_time": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "debug_on_failure": false,
  "logs": "string"
}

Responses

Status Meaning Description Schema
200 OK A single configuration session V3SessionData
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_session_v3

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v3/sessions/{session_name}

Update a configuration framework session

Update the status of an existing configuration framework session

Parameters

Name In Type Required Description
session_name path string true Config Framework Session name

Example responses

200 Response

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
      "completion_time": "2019-07-28T03:26:00Z",
      "start_time": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "debug_on_failure": false,
  "logs": "string"
}

Responses

Status Meaning Description Schema
200 OK A single configuration session V3SessionData
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_session_v3

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name} \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v3/sessions/{session_name}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v3/sessions/{session_name}

Delete a configuration framework session

Deleting a configuration session deletes the Kubernetes objects associated with the session and also deletes the session history. The operation cannot be undone.

Parameters

Name In Type Required Description
session_name path string true Config Framework Session name

Example responses

404 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

components

get_components_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2/components HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2/components \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2/components', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2/components", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2/components

Retrieve the state of a collection of components

Retrieve the full collection of components in the form of a ComponentArray. Full results can also be filtered by query parameters. Only the first filter parameter of each type is used and the parameters are applied in an AND fashion. If the collection is empty or the filters have no match, an empty array is returned.

Parameters

Name In Type Required Description
ids query string false Retrieve the components with the given id (e.g. xname for hardware components). Can be chained for selecting groups of components.
status query string false Retrieve the components with the status. Multiple statuses can be specified in a comma-separated list.
enabled query boolean false Retrieve the components with the “enabled” state.
configName query string false Retrieve the components with the given configuration set as the desired state.
configDetails query boolean false Include the configuration and config status in the response
tags query string false Return only components whose have the matching tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only components that match all tags will be returned.

Enumerated Values

Parameter Value
status unconfigured
status failed
status pending
status configured

Example responses

200 Response

[
  {
    "id": "string",
    "state": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "desiredConfig": "string",
    "desiredState": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "errorCount": 0,
    "retryPolicy": 0,
    "enabled": true,
    "configurationStatus": "unconfigured",
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of component states V2ComponentStateArray
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

put_components_v2

Code samples

PUT https://api-gw-service-nmn.local/apis/cfs/v2/components HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/cfs/v2/components \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/cfs/v2/components', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/cfs/v2/components", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v2/components

Add or Replace a collection of components

Update the state for a collection of components in the cfs database

Body parameter

{
  "patch": {
    "id": "string",
    "state": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "sessionName": "string"
      }
    ],
    "stateAppend": {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "sessionName": "string"
    },
    "desiredConfig": "string",
    "errorCount": 0,
    "retryPolicy": 0,
    "enabled": true,
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  },
  "filters": {
    "ids": "string",
    "status": "unconfigured",
    "enabled": true,
    "configName": "string",
    "tags": "string"
  }
}

Parameters

Name In Type Required Description
body body any true The configuration/state for an array of components

Example responses

200 Response

[
  {
    "id": "string",
    "state": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "desiredConfig": "string",
    "desiredState": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "errorCount": 0,
    "retryPolicy": 0,
    "enabled": true,
    "configurationStatus": "unconfigured",
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of component states V2ComponentStateArray
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_components_v2

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v2/components HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v2/components \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v2/components', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v2/components", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v2/components

Update a collection of components

Update the state for a collection of components in the cfs database

Body parameter

{
  "patch": {
    "id": "string",
    "state": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "sessionName": "string"
      }
    ],
    "stateAppend": {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "sessionName": "string"
    },
    "desiredConfig": "string",
    "errorCount": 0,
    "retryPolicy": 0,
    "enabled": true,
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  },
  "filters": {
    "ids": "string",
    "status": "unconfigured",
    "enabled": true,
    "configName": "string",
    "tags": "string"
  }
}

Parameters

Name In Type Required Description
body body any true The configuration/state for an array of components

Example responses

200 Response

[
  {
    "id": "string",
    "state": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "desiredConfig": "string",
    "desiredState": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "errorCount": 0,
    "retryPolicy": 0,
    "enabled": true,
    "configurationStatus": "unconfigured",
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of component states V2ComponentStateArray
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_component_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2/components/{component_id}

Retrieve the state of a single component

Retrieve the configuration and current state of a single component

Parameters

Name In Type Required Description
configDetails query boolean false Include the configuration and config status in the response
component_id path string true Component id. e.g. xname for hardware components

Example responses

200 Response

{
  "id": "string",
  "state": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "desiredConfig": "string",
  "desiredState": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "errorCount": 0,
  "retryPolicy": 0,
  "enabled": true,
  "configurationStatus": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single component state V2ComponentState
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

put_component_v2

Code samples

PUT https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v2/components/{component_id}

Add or Replace a single component

Update the state for a given component in the cfs database

Body parameter

{
  "id": "string",
  "state": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "sessionName": "string"
    }
  ],
  "stateAppend": {
    "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
    "playbook": "site.yml",
    "commit": "string",
    "sessionName": "string"
  },
  "desiredConfig": "string",
  "errorCount": 0,
  "retryPolicy": 0,
  "enabled": true,
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Parameters

Name In Type Required Description
body body V2ComponentState true The configuration/state for a single component
component_id path string true Component id. e.g. xname for hardware components

Example responses

200 Response

{
  "id": "string",
  "state": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "desiredConfig": "string",
  "desiredState": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "errorCount": 0,
  "retryPolicy": 0,
  "enabled": true,
  "configurationStatus": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single component state V2ComponentState
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_component_v2

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v2/components/{component_id}

Update a single component

Update the state for a given component in the cfs database

Body parameter

{
  "id": "string",
  "state": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "sessionName": "string"
    }
  ],
  "stateAppend": {
    "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
    "playbook": "site.yml",
    "commit": "string",
    "sessionName": "string"
  },
  "desiredConfig": "string",
  "errorCount": 0,
  "retryPolicy": 0,
  "enabled": true,
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Parameters

Name In Type Required Description
body body V2ComponentState true The configuration/state for a single component
component_id path string true Component id. e.g. xname for hardware components

Example responses

200 Response

{
  "id": "string",
  "state": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "desiredConfig": "string",
  "desiredState": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "errorCount": 0,
  "retryPolicy": 0,
  "enabled": true,
  "configurationStatus": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single component state V2ComponentState
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_component_v2

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id} \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v2/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v2/components/{component_id}

Delete a single component

Delete the given component

Parameters

Name In Type Required Description
component_id path string true Component id. e.g. xname for hardware components

Example responses

404 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_components_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/components HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/components \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/components', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/components", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/components

Retrieve the state of a collection of components

Retrieve the full collection of components in the form of a ComponentArray. Full results can also be filtered by query parameters. Only the first filter parameter of each type is used and the parameters are applied in an AND fashion. If the collection is empty or the filters have no match, an empty array is returned.

Parameters

Name In Type Required Description
limit query integer false When set, CFS will only return a number of components up to this limit. Combined with after_id, this enables paging across results
after_id query string false When set, CFS will only return the components after the component specified. Combined with limit, this enables paging across results.
ids query string false Retrieve the components with the given id (e.g. xname for hardware components). Can be chained for selecting groups of components.
status query string false Retrieve the components with the status. Multiple statuses can be specified in a comma-separated list.
enabled query boolean false Retrieve the components with the “enabled” state.
config_name query string false Retrieve the components with the given configuration set as the desired state.
state_details query boolean false Include the details on the currently applied layers
config_details query boolean false Include the configuration and config status in the response
tags query string false Return only components whose have the matching tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only components that match all tags will be returned.

Enumerated Values

Parameter Value
status unconfigured
status failed
status pending
status configured
status

Example responses

200 Response

{
  "components": [
    {
      "id": "string",
      "state": [
        {
          "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
          "playbook": "site.yml",
          "commit": "string",
          "status": "applied",
          "last_updated": "2019-07-28T03:26:00Z",
          "session_name": "string"
        }
      ],
      "desired_state": [
        {
          "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
          "playbook": "site.yml",
          "commit": "string",
          "status": "applied",
          "last_updated": "2019-07-28T03:26:00Z",
          "session_name": "string"
        }
      ],
      "desired_config": "string",
      "error_count": 0,
      "retry_policy": 0,
      "enabled": true,
      "configuration_status": "unconfigured",
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "logs": "string"
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A collection of component states V3ComponentDataCollection
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

put_components_v3

Code samples

PUT https://api-gw-service-nmn.local/apis/cfs/v3/components HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/cfs/v3/components \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/cfs/v3/components', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/cfs/v3/components", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v3/components

Add or Replace a collection of components

Update the state for a collection of components in the cfs database

Body parameter

{
  "patch": {
    "id": "string",
    "state": [
      {
        "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "status": "applied",
        "session_name": "string"
      }
    ],
    "state_append": {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "session_name": "string"
    },
    "desired_config": "string",
    "error_count": 0,
    "retry_policy": 0,
    "enabled": true,
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  },
  "filters": {
    "ids": "string",
    "status": "unconfigured",
    "enabled": true,
    "config_name": "string",
    "tags": "string"
  }
}

Parameters

Name In Type Required Description
body body any true The configuration/state for an array of components

Example responses

200 Response

{
  "component_ids": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK A collection of component ids V3ComponentIdCollection
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_components_v3

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v3/components HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v3/components \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v3/components', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v3/components", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v3/components

Update a collection of components

Update the state for a collection of components in the cfs database

Body parameter

{
  "patch": {
    "id": "string",
    "state": [
      {
        "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "status": "applied",
        "session_name": "string"
      }
    ],
    "state_append": {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "session_name": "string"
    },
    "desired_config": "string",
    "error_count": 0,
    "retry_policy": 0,
    "enabled": true,
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  },
  "filters": {
    "ids": "string",
    "status": "unconfigured",
    "enabled": true,
    "config_name": "string",
    "tags": "string"
  }
}

Parameters

Name In Type Required Description
body body any true The configuration/state for an array of components

Example responses

200 Response

{
  "component_ids": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK A collection of component ids V3ComponentIdCollection
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_component_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/components/{component_id}

Retrieve the state of a single component

Retrieve the configuration and current state of a single component

Parameters

Name In Type Required Description
state_details query boolean false Include the details on the currently applied layers
config_details query boolean false Include the configuration and config status in the response
component_id path string true Component id. e.g. xname for hardware components

Example responses

200 Response

{
  "id": "string",
  "state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "desired_state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "desired_config": "string",
  "error_count": 0,
  "retry_policy": 0,
  "enabled": true,
  "configuration_status": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "logs": "string"
}

Responses

Status Meaning Description Schema
200 OK A single component state V3ComponentData
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

put_component_v3

Code samples

PUT https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v3/components/{component_id}

Add or Replace a single component

Update the state for a given component in the cfs database

Body parameter

{
  "id": "string",
  "state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "session_name": "string"
    }
  ],
  "state_append": {
    "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
    "playbook": "site.yml",
    "commit": "string",
    "status": "applied",
    "session_name": "string"
  },
  "desired_config": "string",
  "error_count": 0,
  "retry_policy": 0,
  "enabled": true,
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Parameters

Name In Type Required Description
body body V3ComponentData true The configuration/state for a single component
component_id path string true Component id. e.g. xname for hardware components

Example responses

200 Response

{
  "id": "string",
  "state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "desired_state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "desired_config": "string",
  "error_count": 0,
  "retry_policy": 0,
  "enabled": true,
  "configuration_status": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "logs": "string"
}

Responses

Status Meaning Description Schema
200 OK A single component state V3ComponentData
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_component_v3

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v3/components/{component_id}

Update a single component

Update the state for a given component in the cfs database

Body parameter

{
  "id": "string",
  "state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "session_name": "string"
    }
  ],
  "state_append": {
    "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
    "playbook": "site.yml",
    "commit": "string",
    "status": "applied",
    "session_name": "string"
  },
  "desired_config": "string",
  "error_count": 0,
  "retry_policy": 0,
  "enabled": true,
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

Parameters

Name In Type Required Description
body body V3ComponentData true The configuration/state for a single component
component_id path string true Component id. e.g. xname for hardware components

Example responses

200 Response

{
  "id": "string",
  "state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "desired_state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "desired_config": "string",
  "error_count": 0,
  "retry_policy": 0,
  "enabled": true,
  "configuration_status": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "logs": "string"
}

Responses

Status Meaning Description Schema
200 OK A single component state V3ComponentData
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_component_v3

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id} \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v3/components/{component_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v3/components/{component_id}

Delete a single component

Delete the given component

Parameters

Name In Type Required Description
component_id path string true Component id. e.g. xname for hardware components

Example responses

404 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

configurations

get_configurations_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2/configurations HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2/configurations \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2/configurations', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2/configurations", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2/configurations

Retrieve a collection of configurations

Retrieve the full collection of configurations in the form of a ConfigurationArray.

Parameters

Name In Type Required Description
in_use query boolean false Query for only configurations that are currently referenced by components.

Example responses

200 Response

[
  {
    "name": "sample-config",
    "description": "string",
    "lastUpdated": "2019-07-28T03:26:00Z",
    "layers": [
      {
        "name": "sample-config",
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "branch": "string",
        "specialParameters": {
          "imsRequireDkms": true
        }
      }
    ],
    "additional_inventory": {
      "name": "sample-inventory",
      "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
      "commit": "string",
      "branch": "string"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of configurations V2ConfigurationArray
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_configuration_v2

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v2/configurations/{configuration_id}

Retrieve a single configuration

Retrieve the given configuration

Parameters

Name In Type Required Description
configuration_id path string true Name of the target configuration

Example responses

200 Response

{
  "name": "sample-config",
  "description": "string",
  "lastUpdated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "specialParameters": {
        "imsRequireDkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
    "commit": "string",
    "branch": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration V2Configuration
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

put_configuration_v2

Code samples

PUT https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v2/configurations/{configuration_id}

Add or Replace a single configuration

Add a configuration to CFS or replace an existing configuration.

Body parameter

{
  "description": "string",
  "layers": [
    {
      "name": "sample-config",
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "specialParameters": {
        "imsRequireDkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
    "commit": "string",
    "branch": "string"
  }
}

Parameters

Name In Type Required Description
body body V2Configuration true A desired configuration state
configuration_id path string true Name of the target configuration

Example responses

200 Response

{
  "name": "sample-config",
  "description": "string",
  "lastUpdated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "specialParameters": {
        "imsRequireDkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
    "commit": "string",
    "branch": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration V2Configuration
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_configuration_v2

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v2/configurations/{configuration_id}

Update the commits for a configuration

Updates the commits for all layers that specify a branch

Parameters

Name In Type Required Description
configuration_id path string true Name of the target configuration

Example responses

200 Response

{
  "name": "sample-config",
  "description": "string",
  "lastUpdated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "specialParameters": {
        "imsRequireDkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
    "commit": "string",
    "branch": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration V2Configuration
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_configuration_v2

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id} \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v2/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v2/configurations/{configuration_id}

Delete a single configuration

Delete the given configuration. This will fail in any components are using the specified configuration.

Parameters

Name In Type Required Description
configuration_id path string true Name of the target configuration

Example responses

400 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_configurations_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/configurations HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/configurations \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/configurations', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/configurations", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/configurations

Retrieve a collection of configurations

Retrieve the full collection of configurations in the form of a ConfigurationArray.

Parameters

Name In Type Required Description
limit query integer false When set, CFS will only return a number of configurations up to this limit. Combined with after_id, this enables paging across results
after_id query string false When set, CFS will only return the configurations after the configuration specified. Combined with limit, this enables paging across results.
in_use query boolean false Query for only configurations that are currently referenced by components.

Example responses

200 Response

{
  "configurations": [
    {
      "name": "sample-config",
      "description": "string",
      "last_updated": "2019-07-28T03:26:00Z",
      "layers": [
        {
          "name": "sample-config",
          "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
          "source": "string",
          "playbook": "site.yml",
          "commit": "string",
          "branch": "string",
          "special_parameters": {
            "ims_require_dkms": true
          }
        }
      ],
      "additional_inventory": {
        "name": "sample-inventory",
        "clone_url": "https://vcs.domain/vcs/org/inventory.git",
        "source": "string",
        "commit": "string",
        "branch": "string"
      }
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A collection of configurations V3ConfigurationDataCollection
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_configuration_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/configurations/{configuration_id}

Retrieve a single configuration

Retrieve the given configuration

Parameters

Name In Type Required Description
configuration_id path string true Name of the target configuration

Example responses

200 Response

{
  "name": "sample-config",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "source": "string",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "special_parameters": {
        "ims_require_dkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "clone_url": "https://vcs.domain/vcs/org/inventory.git",
    "source": "string",
    "commit": "string",
    "branch": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration V3ConfigurationData
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

put_configuration_v3

Code samples

PUT https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /v3/configurations/{configuration_id}

Add or Replace a single configuration

Add a configuration to CFS or replace an existing configuration.

Body parameter

{
  "description": "string",
  "layers": [
    {
      "name": "sample-config",
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "source": "string",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "special_parameters": {
        "ims_require_dkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "clone_url": "https://vcs.domain/vcs/org/inventory.git",
    "source": "string",
    "commit": "string",
    "branch": "string"
  }
}

Parameters

Name In Type Required Description
drop_branches query boolean false Don’t store the branches after converting each branch to a commit.
body body V3ConfigurationData true A desired configuration state
configuration_id path string true Name of the target configuration

Example responses

200 Response

{
  "name": "sample-config",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "source": "string",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "special_parameters": {
        "ims_require_dkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "clone_url": "https://vcs.domain/vcs/org/inventory.git",
    "source": "string",
    "commit": "string",
    "branch": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration V3ConfigurationData
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_configuration_v3

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v3/configurations/{configuration_id}

Update the commits for a configuration

Updates the commits for all layers that specify a branch

Parameters

Name In Type Required Description
configuration_id path string true Name of the target configuration

Example responses

200 Response

{
  "name": "sample-config",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "source": "string",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "special_parameters": {
        "ims_require_dkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "clone_url": "https://vcs.domain/vcs/org/inventory.git",
    "source": "string",
    "commit": "string",
    "branch": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single configuration V3ConfigurationData
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_configuration_v3

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id} \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v3/configurations/{configuration_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v3/configurations/{configuration_id}

Delete a single configuration

Delete the given configuration. This will fail in any components are using the specified configuration.

Parameters

Name In Type Required Description
configuration_id path string true Name of the target configuration

Example responses

400 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

sources

get_sources_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/sources HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/sources \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/sources', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/sources", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/sources

Retrieve a collection of sources

Retrieve the full collection of sources in the form of a SourceArray.

Parameters

Name In Type Required Description
limit query integer false When set, CFS will only return a number of sources up to this limit. Combined with after_id, this enables paging across results
after_id query string false When set, CFS will only return the configurations after the source specified. Combined with limit, this enables paging across results.
in_use query boolean false Query for only sources that are currently referenced by configurations.

Example responses

200 Response

{
  "sources": [
    {
      "name": "sample-source",
      "description": "string",
      "last_updated": "2019-07-28T03:26:00Z",
      "clone_url": "string",
      "credentials": {
        "authentication_method": "password",
        "secret_name": "string"
      },
      "ca_cert": {
        "configmap_name": "string",
        "configmap_namespace": "string"
      }
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A collection of sources V3SourceDataCollection
400 Bad Request Bad Request ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_source_v3

Code samples

POST https://api-gw-service-nmn.local/apis/cfs/v3/sources HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X POST https://api-gw-service-nmn.local/apis/cfs/v3/sources \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api-gw-service-nmn.local/apis/cfs/v3/sources', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api-gw-service-nmn.local/apis/cfs/v3/sources", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v3/sources

Add a single source

Add a source to CFS

Body parameter

{
  "name": "sample-source",
  "description": "string",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "username": "string",
    "password": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Parameters

Name In Type Required Description
body body V3SourceCreateData true A source

Example responses

201 Response

{
  "name": "sample-source",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "secret_name": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Responses

Status Meaning Description Schema
201 Created A single source V3SourceData
400 Bad Request Bad Request ProblemDetails
409 Conflict A source with the same name already exists ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_source_v3

Code samples

GET https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v3/sources/{source_id}

Retrieve a single source

Retrieve the given source

Parameters

Name In Type Required Description
source_id path string true Name of the target source

Example responses

200 Response

{
  "name": "sample-source",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "secret_name": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single source V3SourceData
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_source_v3

Code samples

PATCH https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v3/sources/{source_id}

Update the commits for a source

Updates a CFS source

Body parameter

{
  "description": "string",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "username": "string",
    "password": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Parameters

Name In Type Required Description
body body V3SourceUpdateData true A source
source_id path string true Name of the target source

Example responses

200 Response

{
  "name": "sample-source",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "secret_name": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK A single source V3SourceData
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_source_v3

Code samples

DELETE https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/problem+json
# You can also use wget
curl -X DELETE https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id} \
  -H 'Accept: application/problem+json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/problem+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/problem+json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api-gw-service-nmn.local/apis/cfs/v3/sources/{source_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v3/sources/{source_id}

Delete a single source

Delete the given source. This will fail in any components are using the specified source.

Parameters

Name In Type Required Description
source_id path string true Name of the target source

Example responses

400 Response

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

Responses

Status Meaning Description Schema
204 No Content The resource was deleted. None
400 Bad Request Bad Request ProblemDetails
404 Not Found The resource was not found. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

Schemas

Version

{
  "major": "1",
  "minor": "0",
  "patch": "10"
}

Version data

Properties

Name Type Required Restrictions Description
major string false none none
minor string false none none
patch string false none none

Healthz

{
  "db_status": "string",
  "kafka_status": "string"
}

Service health status

Properties

Name Type Required Restrictions Description
db_status string false none none
kafka_status string false none none

V3NextData

{
  "limit": 0,
  "after_id": "string"
}

Information for requesting the next page of data

Properties

Name Type Required Restrictions Description
limit integer false none none
after_id string false none none

V2Options

{
  "hardwareSyncInterval": 5,
  "batcherCheckInterval": 5,
  "batchSize": 120,
  "batchWindow": 120,
  "defaultBatcherRetryPolicy": 1,
  "defaultPlaybook": "site.yml",
  "defaultAnsibleConfig": "cfs-default-ansible-cfg",
  "sessionTTL": "24h",
  "additionalInventoryUrl": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "batcherMaxBackoff": 3600,
  "batcherDisable": true,
  "batcherPendingTimeout": 0,
  "loggingLevel": "string"
}

Configuration options for the configuration service.

Properties

Name Type Required Restrictions Description
hardwareSyncInterval integer false none How frequently the CFS hardware-sync-agent checks with the Hardware State Manager to update its known hardware (in seconds)
batcherCheckInterval integer false none How frequently the batcher checks the configuration states to see if work needs to be done (in seconds)
batchSize integer false none The maximum number of nodes the batcher will run a single CFS session against.
batchWindow integer false none The maximum number of seconds the batcher will wait to run a CFS session once a node has been detected that needs configuration.
defaultBatcherRetryPolicy integer false none The default maximum number retries per node when configuration fails.
defaultPlaybook string false none The default playbook to be used if not specified in a node’s desired state.
defaultAnsibleConfig string false none The Kubernetes ConfigMap which holds the default ansible.cfg for a given CFS session. This ConfigMap must be present in the same Kubernetes namespace as the CFS service.
sessionTTL string false none A time-to-live applied to all completed CFS sessions. Specified in hours or days. e.g. 3d or 24h. Set to an empty string to disable.
additionalInventoryUrl string false none The git clone URL of a repo with additional inventory files. All files in the repo will be copied into the hosts directory of CFS.
batcherMaxBackoff integer false none The maximum number of seconds that batcher will backoff from session creation if problems are detected.
batcherDisable boolean false none Disables cfs-batcher’s automatic session creation if set to True.
batcherPendingTimeout integer false none How long cfs-batcher will wait on a pending session before deleting and recreating it (in seconds).
loggingLevel string false none The logging level for core CFS services. This does not affect the Ansible logging level.

V3Options

{
  "hardware_sync_interval": 5,
  "batcher_check_interval": 5,
  "batch_size": 120,
  "batch_window": 120,
  "default_batcher_retry_policy": 1,
  "default_playbook": "site.yml",
  "default_ansible_config": "cfs-default-ansible-cfg",
  "session_ttl": "24h",
  "additional_inventory_url": "https://api-gw-service-nmn.local/vcs/cray/inventory.git",
  "additional_inventory_source": "example-source",
  "batcher_max_backoff": 3600,
  "batcher_disable": true,
  "batcher_pending_timeout": 1,
  "logging_level": "DEBUG",
  "default_page_size": 1,
  "debug_wait_time": 0,
  "include_ara_links": true
}

Configuration options for the configuration service.

Properties

Name Type Required Restrictions Description
hardware_sync_interval integer false none How frequently the CFS hardware-sync-agent checks with the Hardware State Manager to update its known hardware (in seconds)
batcher_check_interval integer false none How frequently the batcher checks the configuration states to see if work needs to be done (in seconds)
batch_size integer false none The maximum number of nodes the batcher will run a single CFS session against.
batch_window integer false none The maximum number of seconds the batcher will wait to run a CFS session once a node has been detected that needs configuration.
default_batcher_retry_policy integer false none The default maximum number retries per node when configuration fails.
default_playbook string false read-only [DEPRECATED] The default playbook to be used if not specified in a node’s desired state. This option is read-only via the v3 API and remains only for compatibility with the v2 API. This option will be removed from v3 when the v2 API is removed.
default_ansible_config string false none The Kubernetes ConfigMap which holds the default ansible.cfg for a given CFS session. This ConfigMap must be present in the same Kubernetes namespace as the CFS service.
session_ttl string false none A time-to-live applied to all completed CFS sessions. Specified in hours or days. e.g. 3d or 24h. Set to an empty string to disable.
additional_inventory_url string false none The git clone URL of a repo with additional inventory files. All files in the repo will be copied into the hosts directory of CFS. This is mutually exclusive with the additional_inventory_source option and only one can be set.
additional_inventory_source string false none A CFS source with additional inventory files. All files in the repo will be copied into the hosts directory of CFS. This is mutually exclusive with the additional_source_url option and only one can be set.
batcher_max_backoff integer false none The maximum number of seconds that batcher will backoff from session creation if problems are detected.
batcher_disable boolean false none Disables cfs-batcher’s automatic session creation if set to True.
batcher_pending_timeout integer false none How long cfs-batcher will wait on a pending session before deleting and recreating it (in seconds).
logging_level string false none The logging level for core CFS services. This does not affect the Ansible logging level.
default_page_size integer false none The maximum number of results that a query will return if the limit parameter is not specified.
debug_wait_time integer false none The number of seconds CFS sessions will wait after failure for debugging when debug_on_failure is true.
include_ara_links boolean false none If true, session and component records will include links to ARA dashboards for the logs

Enumerated Values

Property Value
logging_level DEBUG
logging_level INFO
logging_level WARNING
logging_level ERROR

SessionTargetSection

{
  "definition": "spec",
  "groups": [
    {
      "name": "test-computes",
      "members": [
        "nid000001",
        "nid000002",
        "nid000003"
      ]
    }
  ],
  "image_map": [
    {
      "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
      "result_name": "new-test-image"
    }
  ]
}

A target lets you define the nodes or images that you want to customize and consists of two sub-parameters - Definition and groups. By default, Configuration Framework Sessions use dynamic inventory definition to target hosts. When using a session to customize an image, or if a static inventory is required, use this optional section to specify entities (whether images or nodes) for the session to target.

Properties

Name Type Required Restrictions Description
definition string false none Source of inventory definition to be used in the configuration session.

‘image’ denotes that the session will target an image root through the Image
Management Service (IMS). Group members should be a single image identifier known by IMS.

‘spec’ denotes inventory that is specified directly via CFS in the target
groups/members of this object. You can include a node name (a DNS resolvable name),
or a group name and a list of nodes. The command line inventory can be a quick
and simple way to run Ansible against a small subset of nodes. However, if more
customization of the inventory is needed, specifically customization of host and
groups variables, the repo target definition should be used.

‘repo’ denotes the inventory will be used from the git repository
specified for this session (via cloneUrl, and branch or commit). The inventory
must be located in the “hosts” file at the root of the repository.

‘dynamic’ (default) will use the CFS-provided dynamic inventory plugin to define
the inventory. The hosts file is automatically generated by CFS with data from
the Hardware State Manager (HSM), which includes groups and hardware roles.
groups [object] false none Specification of the groups and group members per the inventory definition. This list is not valid for the ‘repo’ and ‘dynamic’ inventory definition types. Multiple groups can be specified for ‘image’ and ‘spec’ inventory definition types.
» name string true none Group name
» members [string] true none Group members for the inventory.
image_map [object] false none Mapping of image IDs to resultant image names. This is only valid for ‘image’ inventory definition types.
Only images that are defined in ‘groups’ will result in a new image.
If images in ‘groups’ are not specified here, CFS will generate a name for the resultant image.
» source_id string true none Source image id. This is the image id that is used in ‘groups’.
» result_name string true none Resultant image name.

Enumerated Values

Property Value
definition image
definition spec
definition repo
definition dynamic

SessionConfigurationSection

{
  "name": "example-config",
  "limit": "layer1,layer3"
}

The configuration information which the session will apply

Properties

Name Type Required Restrictions Description
name string false none The name of the CFS configuration to be applied
limit string false none A comma separated list of layers in the configuration to limit the session to. This can be either a list of named layers, or a list of indices.

SessionAnsibleSection

{
  "config": "cfs-default-ansible-cfg",
  "limit": "host1",
  "verbosity": 0,
  "passthrough": "string"
}

Additional options that will be used when invoking Ansible.

Properties

Name Type Required Restrictions Description
config string false none The Kubernetes ConfigMap which holds the ansible.cfg for a given CFS session. This ConfigMap must be present in the same Kubernetes namespace as the CFS service. If no value is given, the value of the defaultAnsibleConfig field in the /options endpoint will be used.
limit string¦null false none Additional filtering of hosts or groups from the inventory to run against. This is especially useful when running with dynamic inventory and when you want to run on a subset of nodes or groups. This option corresponds to ansible-playbook’s –limit and can be used to specify nodes or groups.
verbosity integer false none The verbose mode to use in the call to the ansible-playbook command. 1 = -v, 2 = -vv, etc. Valid values range from 0 to 4. See the ansible-playbook help for more information.
passthrough string¦null false none Additional parameters that are added to all Ansible calls for the session. This field is currently limited to the following Ansible parameters: “–extra-vars”, “–forks”, “–skip-tags”, “–start-at-task”, and “–tags”. WARNING: Parameters passed to Ansible in this way should be used with caution. State will not be recorded for components when using these flags to avoid incorrect reporting of partial playbook runs.

SessionStatusArtifactsSection

[
  {
    "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
    "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
    "type": "ims_customized_image"
  }
]

Status of artifacts

Properties

Name Type Required Restrictions Description
image_id string(uuid) false none The IMS id of the original image to be customized via a configuration session.
result_id string(uuid) false none The IMS id of the image that was customized via a configuration session. This is the resultant image of the customization.
type string false none none

Enumerated Values

Property Value
type ims_customized_image

V2SessionStatusSessionSection

{
  "job": "cray-cfs-job-session-20190728032600",
  "completionTime": "2019-07-28T03:26:00Z",
  "startTime": "2019-07-28T03:26:00Z",
  "status": "pending",
  "succeeded": "none"
}

Status of session

Properties

Name Type Required Restrictions Description
job string false read-only The name of the configuration execution environment associated with this session.
completionTime string(date-time)¦null false read-only The date/time when the session completed execution in RFC 3339 format. This has a null value when the session has not yet completed.
startTime string(date-time) false read-only The date/time when the session started execution in RFC 3339 format.
status string false read-only The execution status of the session.
succeeded string false read-only Whether the session executed successfully or not. A ’none’
value denotes that the execution has not completed. This
field has context when the status field is ‘complete’.
A session may successfully execute even if the underlying
tasks do not.

Enumerated Values

Property Value
status pending
status running
status complete
succeeded none
succeeded true
succeeded false
succeeded unknown

V3SessionStatusSessionSection

{
  "job": "cray-cfs-job-session-20190728032600",
  "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
  "completion_time": "2019-07-28T03:26:00Z",
  "start_time": "2019-07-28T03:26:00Z",
  "status": "pending",
  "succeeded": "none"
}

Status of session

Properties

Name Type Required Restrictions Description
job string false none The name of the configuration execution environment associated with this session.
ims_job string false none The name os the IMS job associated with the session when running against an image.
completion_time string(date-time) false read-only The date/time when the session completed execution in RFC 3339 format.
start_time string(date-time) false read-only The date/time when the session started execution in RFC 3339 format.
status string false read-only The execution status of the session.
succeeded string false read-only Whether the session executed successfully or not. A ’none’
value denotes that the execution has not completed. This
field has context when the status field is ‘complete’.
A session may successfully execute even if the underlying
tasks do not.

Enumerated Values

Property Value
status pending
status running
status complete
succeeded none
succeeded true
succeeded false
succeeded unknown

V2SessionStatusSection

{
  "artifacts": [
    {
      "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
      "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
      "type": "ims_customized_image"
    }
  ],
  "session": {
    "job": "cray-cfs-job-session-20190728032600",
    "completionTime": "2019-07-28T03:26:00Z",
    "startTime": "2019-07-28T03:26:00Z",
    "status": "pending",
    "succeeded": "none"
  }
}

Status of artifacts, session, and targets. Lists details like session status, session start and completion time, number of successful, failed, or running targets. If the target definition is an image, it also lists the image_id, result_id, and type of image under Artifacts.

Properties

Name Type Required Restrictions Description
artifacts SessionStatusArtifactsSection false none Status of artifacts
session V2SessionStatusSessionSection false none Status of session

V3SessionStatusSection

{
  "artifacts": [
    {
      "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
      "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
      "type": "ims_customized_image"
    }
  ],
  "session": {
    "job": "cray-cfs-job-session-20190728032600",
    "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
    "completion_time": "2019-07-28T03:26:00Z",
    "start_time": "2019-07-28T03:26:00Z",
    "status": "pending",
    "succeeded": "none"
  }
}

Status of artifacts, session, and targets. Lists details like session status, session start and completion time, number of successful, failed, or running targets. If the target definition is an image, it also lists the image_id, result_id, and type of image under Artifacts.

Properties

Name Type Required Restrictions Description
artifacts SessionStatusArtifactsSection false none Status of artifacts
session V3SessionStatusSessionSection false none Status of session

V2Session

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "completionTime": "2019-07-28T03:26:00Z",
      "startTime": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

An execution session for the Configuration Framework.

Properties

Name Type Required Restrictions Description
name string false none Name of the session. The length of the name is restricted to 45 characters.
configuration SessionConfigurationSection false none The configuration information which the session will apply
ansible SessionAnsibleSection false none Additional options that will be used when invoking Ansible.
target SessionTargetSection false none A target lets you define the nodes or images that you want to customize and consists of two sub-parameters - Definition and groups. By default, Configuration Framework Sessions use dynamic inventory definition to target hosts. When using a session to customize an image, or if a static inventory is required, use this optional section to specify entities (whether images or nodes) for the session to target.
status V2SessionStatusSection false none Status of artifacts, session, and targets. Lists details like session status, session start and completion time, number of successful, failed, or running targets. If the target definition is an image, it also lists the image_id, result_id, and type of image under Artifacts.
tags object false none A collection of key-value pairs containing descriptive information for the session, such as information about the session creator.
» additionalProperties string false none none

V3SessionData

{
  "name": "session-20190728032600",
  "configuration": {
    "name": "example-config",
    "limit": "layer1,layer3"
  },
  "ansible": {
    "config": "cfs-default-ansible-cfg",
    "limit": "host1",
    "verbosity": 0,
    "passthrough": "string"
  },
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "status": {
    "artifacts": [
      {
        "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
        "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
        "type": "ims_customized_image"
      }
    ],
    "session": {
      "job": "cray-cfs-job-session-20190728032600",
      "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
      "completion_time": "2019-07-28T03:26:00Z",
      "start_time": "2019-07-28T03:26:00Z",
      "status": "pending",
      "succeeded": "none"
    }
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "debug_on_failure": false,
  "logs": "string"
}

An execution session for the Configuration Framework.

Properties

Name Type Required Restrictions Description
name string false none Name of the session. The length of the name is restricted to 45 characters.
configuration SessionConfigurationSection false none The configuration information which the session will apply
ansible SessionAnsibleSection false none Additional options that will be used when invoking Ansible.
target SessionTargetSection false none A target lets you define the nodes or images that you want to customize and consists of two sub-parameters - Definition and groups. By default, Configuration Framework Sessions use dynamic inventory definition to target hosts. When using a session to customize an image, or if a static inventory is required, use this optional section to specify entities (whether images or nodes) for the session to target.
status V3SessionStatusSection false none Status of artifacts, session, and targets. Lists details like session status, session start and completion time, number of successful, failed, or running targets. If the target definition is an image, it also lists the image_id, result_id, and type of image under Artifacts.
tags object false none A collection of key-value pairs containing descriptive information for the session, such as information about the session creator.
» additionalProperties string false none none
debug_on_failure boolean false none When true, the ansible container for the session will remain running after an Ansible failure. The container will remain running for a number of seconds specified by the debug_wait_time options, or until complete flag is touched.
logs string false read-only The link to the ARA UI with logs for this component

V2SessionCreate

{
  "name": "session-20190728032600",
  "configurationName": "example-config",
  "configurationLimit": "layer1,layer3",
  "ansibleLimit": "host1",
  "ansibleConfig": "cfs-default-ansible-cfg",
  "ansibleVerbosity": 0,
  "ansiblePassthrough": "string",
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

The information required to create a Config Framework Session.

Properties

Name Type Required Restrictions Description
name string true none Name of the session. The length of the name is restricted to 45 characters.
configurationName string true none The name of a CFS configuration to apply
configurationLimit string false none A comma separated list of layers in the configuration to limit the session to. This can be either a list of named layers, or a list of indices.
ansibleLimit string false none Additional filtering of hosts or groups from the inventory to run against. This is especially useful when running with dynamic inventory and when you want to run on a subset of nodes or groups. This option corresponds to ansible-playbook’s –limit and can be used to specify nodes or groups.
ansibleConfig string false none The Kubernetes ConfigMap which holds the ansible.cfg for a given CFS session. This ConfigMap must be present in the same Kubernetes namespace as the CFS service. If no value is given, the value of the defaultAnsibleConfig field in the /options endpoint will be used.
ansibleVerbosity integer false none The verbose mode to use in the call to the ansible-playbook command. 1 = -v, 2 = -vv, etc. Valid values range from 0 to 4. See the ansible-playbook help for more information.
ansiblePassthrough string false none Additional parameters that are added to all Ansible calls for the session. This field is currently limited to the following Ansible parameters: “–extra-vars”, “–forks”, “–skip-tags”, “–start-at-task”, and “–tags”. WARNING: Parameters passed to Ansible in this way should be used with caution. State will not be recorded for components when using these flags to avoid incorrect reporting of partial playbook runs.
target SessionTargetSection false none A target lets you define the nodes or images that you want to customize and consists of two sub-parameters - Definition and groups. By default, Configuration Framework Sessions use dynamic inventory definition to target hosts. When using a session to customize an image, or if a static inventory is required, use this optional section to specify entities (whether images or nodes) for the session to target.
tags object false none A collection of key-value pairs containing descriptive information for the session, such as information about the session creator.
» additionalProperties string false none none

V3SessionCreate

{
  "name": "session-20190728032600",
  "configuration_name": "example-config",
  "configuration_limit": "layer1,layer3",
  "ansible_limit": "host1",
  "ansible_config": "cfs-default-ansible-cfg",
  "ansible_verbosity": 0,
  "ansible_passthrough": "",
  "target": {
    "definition": "spec",
    "groups": [
      {
        "name": "test-computes",
        "members": [
          "nid000001",
          "nid000002",
          "nid000003"
        ]
      }
    ],
    "image_map": [
      {
        "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
        "result_name": "new-test-image"
      }
    ]
  },
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "debug_on_failure": false
}

The information required to create a Config Framework Session.

Properties

Name Type Required Restrictions Description
name string true none Name of the session. The length of the name is restricted to 45 characters.
configuration_name string true none The name of a CFS configuration to apply
configuration_limit string false none A comma separated list of layers in the configuration to limit the session to. This can be either a list of named layers, or a list of indices.
ansible_limit string false none Additional filtering of hosts or groups from the inventory to run against. This is especially useful when running with dynamic inventory and when you want to run on a subset of nodes or groups. This option corresponds to ansible-playbook’s –limit and can be used to specify nodes or groups.
ansible_config string false none The Kubernetes ConfigMap which holds the ansible.cfg for a given CFS session. This ConfigMap must be present in the same Kubernetes namespace as the CFS service. If no value is given, the value of the defaultAnsibleConfig field in the /options endpoint will be used.
ansible_verbosity integer false none The verbose mode to use in the call to the ansible-playbook command. 1 = -v, 2 = -vv, etc. Valid values range from 0 to 4. See the ansible-playbook help for more information.
ansible_passthrough string false none Additional parameters that are added to all Ansible calls for the session. This field is currently limited to the following Ansible parameters: “–extra-vars”, “–forks”, “–skip-tags”, “–start-at-task”, and “–tags”. WARNING: Parameters passed to Ansible in this way should be used with caution. State will not be recorded for components when using these flags to avoid incorrect reporting of partial playbook runs.
target SessionTargetSection false none A target lets you define the nodes or images that you want to customize and consists of two sub-parameters - Definition and groups. By default, Configuration Framework Sessions use dynamic inventory definition to target hosts. When using a session to customize an image, or if a static inventory is required, use this optional section to specify entities (whether images or nodes) for the session to target.
tags object false none A collection of key-value pairs containing descriptive information for the session, such as information about the session creator.
» additionalProperties string false none none
debug_on_failure boolean false none When true, the ansible container for the session will remain running after an Ansible failure. The container will remain running for a number of seconds specified by the debug_wait_time options, or until complete flag is touched.

V2SessionArray

[
  {
    "name": "session-20190728032600",
    "configuration": {
      "name": "example-config",
      "limit": "layer1,layer3"
    },
    "ansible": {
      "config": "cfs-default-ansible-cfg",
      "limit": "host1",
      "verbosity": 0,
      "passthrough": "string"
    },
    "target": {
      "definition": "spec",
      "groups": [
        {
          "name": "test-computes",
          "members": [
            "nid000001",
            "nid000002",
            "nid000003"
          ]
        }
      ],
      "image_map": [
        {
          "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
          "result_name": "new-test-image"
        }
      ]
    },
    "status": {
      "artifacts": [
        {
          "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
          "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
          "type": "ims_customized_image"
        }
      ],
      "session": {
        "job": "cray-cfs-job-session-20190728032600",
        "completionTime": "2019-07-28T03:26:00Z",
        "startTime": "2019-07-28T03:26:00Z",
        "status": "pending",
        "succeeded": "none"
      }
    },
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
]

An array of sessions.

Properties

Name Type Required Restrictions Description
anonymous [V2Session] false none An array of sessions.

V3SessionDataCollection

{
  "sessions": [
    {
      "name": "session-20190728032600",
      "configuration": {
        "name": "example-config",
        "limit": "layer1,layer3"
      },
      "ansible": {
        "config": "cfs-default-ansible-cfg",
        "limit": "host1",
        "verbosity": 0,
        "passthrough": "string"
      },
      "target": {
        "definition": "spec",
        "groups": [
          {
            "name": "test-computes",
            "members": [
              "nid000001",
              "nid000002",
              "nid000003"
            ]
          }
        ],
        "image_map": [
          {
            "source_id": "ff287206-6ff7-4659-92ad-6e732821c6b4",
            "result_name": "new-test-image"
          }
        ]
      },
      "status": {
        "artifacts": [
          {
            "image_id": "f34ff35e-d782-4a65-a1b8-243a3cd740af",
            "result_id": "8b782ccd-8706-4145-a6a1-724e29ed5522",
            "type": "ims_customized_image"
          }
        ],
        "session": {
          "job": "cray-cfs-job-session-20190728032600",
          "ims_job": "5037edd8-e9c5-437d-b54b-db4a8ad2cb15",
          "completion_time": "2019-07-28T03:26:00Z",
          "start_time": "2019-07-28T03:26:00Z",
          "status": "pending",
          "succeeded": "none"
        }
      },
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "debug_on_failure": false,
      "logs": "string"
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

A collection of session data.

Properties

Name Type Required Restrictions Description
sessions [V3SessionData] false none [An execution session for the Configuration Framework.
]
next V3NextData false none Information for requesting the next page of data

V3SessionIdCollection

{
  "session_ids": [
    "string"
  ]
}

A collection of session data.

Properties

Name Type Required Restrictions Description
session_ids [string] false none none

V2AdditionalInventoryLayer

{
  "name": "sample-inventory",
  "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
  "commit": "string",
  "branch": "string"
}

An inventory reference to include in a set of configurations.

Properties

Name Type Required Restrictions Description
name string false none The name of the inventory layer.
cloneUrl string true none The clone URL of the configuration content repository.
commit string false none The commit hash of the configuration repository when the state is set.
branch string false none The repository branch to use. This will automatically set commit to master on the branch
when the configuration is added.

V3AdditionalInventoryLayer

{
  "name": "sample-inventory",
  "clone_url": "https://vcs.domain/vcs/org/inventory.git",
  "source": "string",
  "commit": "string",
  "branch": "string"
}

An inventory reference to include in a set of configurations.

Properties

Name Type Required Restrictions Description
name string false none The name of the inventory layer.
clone_url string true none The clone URL of the configuration content repository.
source string false none A CFS source with directions to the configuration content repository
commit string false none The commit hash of the configuration repository when the state is set.
branch string false none The repository branch to use. This will automatically set commit to master on the branch
when the configuration is added.

V2ConfigurationLayer

{
  "name": "sample-config",
  "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
  "playbook": "site.yml",
  "commit": "string",
  "branch": "string",
  "specialParameters": {
    "imsRequireDkms": true
  }
}

A single desired configuration state for a component.

Properties

Name Type Required Restrictions Description
name string false none The name of the configuration layer.
cloneUrl string true none The clone URL of the configuration content repository.
playbook string false none The Ansible playbook to run.
commit string false none The commit hash of the configuration repository when the state is set.
branch string false none The configuration branch to use. This will automatically set commit to master on the branch
when the configuration is added.
specialParameters object false none Optional parameters that do not affect the configuration content or are only used in
special circumstances.
» imsRequireDkms boolean false none If true, any image customization sessions that use this configuration will enable DKMS in IMS.

V3ConfigurationLayer

{
  "name": "sample-config",
  "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
  "source": "string",
  "playbook": "site.yml",
  "commit": "string",
  "branch": "string",
  "special_parameters": {
    "ims_require_dkms": true
  }
}

A single desired configuration state for a component.

Properties

Name Type Required Restrictions Description
name string false none The name of the configuration layer.
clone_url string false none The clone URL of the configuration content repository.
source string false none A CFS source with directions to the configuration content repository
playbook string true none The Ansible playbook to run.
commit string false none The commit hash of the configuration repository when the state is set.
branch string false none The configuration branch to use. This will automatically set commit to master on the branch
when the configuration is added.
special_parameters object false none Optional parameters that do not affect the configuration content or are only used in
special circumstances.
» ims_require_dkms boolean false none If true, any image customization sessions that use this configuration will enable DKMS in IMS.

V2Configuration

{
  "name": "sample-config",
  "description": "string",
  "lastUpdated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "specialParameters": {
        "imsRequireDkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
    "commit": "string",
    "branch": "string"
  }
}

A collection of ConfigurationLayers.

Properties

Name Type Required Restrictions Description
name string false read-only The name of the configuration.
description string false none A user-defined description. This field is not used by CFS.
lastUpdated string(date-time) false read-only The date/time when the state was last updated in RFC 3339 format.
layers [V2ConfigurationLayer] false none A list of ConfigurationLayer(s).
additional_inventory V2AdditionalInventoryLayer false none An inventory reference to include in a set of configurations.

V3ConfigurationData

{
  "name": "sample-config",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "layers": [
    {
      "name": "sample-config",
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "source": "string",
      "playbook": "site.yml",
      "commit": "string",
      "branch": "string",
      "special_parameters": {
        "ims_require_dkms": true
      }
    }
  ],
  "additional_inventory": {
    "name": "sample-inventory",
    "clone_url": "https://vcs.domain/vcs/org/inventory.git",
    "source": "string",
    "commit": "string",
    "branch": "string"
  }
}

A collection of ConfigurationLayers.

Properties

Name Type Required Restrictions Description
name string false read-only The name of the configuration.
description string false none A user-defined description. This field is not used by CFS.
last_updated string(date-time) false read-only The date/time when the state was last updated in RFC 3339 format.
layers [V3ConfigurationLayer] false none A list of ConfigurationLayer(s).
additional_inventory V3AdditionalInventoryLayer false none An inventory reference to include in a set of configurations.

V2ConfigurationArray

[
  {
    "name": "sample-config",
    "description": "string",
    "lastUpdated": "2019-07-28T03:26:00Z",
    "layers": [
      {
        "name": "sample-config",
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "branch": "string",
        "specialParameters": {
          "imsRequireDkms": true
        }
      }
    ],
    "additional_inventory": {
      "name": "sample-inventory",
      "cloneUrl": "https://vcs.domain/vcs/org/inventory.git",
      "commit": "string",
      "branch": "string"
    }
  }
]

An array of configurations.

Properties

Name Type Required Restrictions Description
anonymous [V2Configuration] false none An array of configurations.

V3ConfigurationDataCollection

{
  "configurations": [
    {
      "name": "sample-config",
      "description": "string",
      "last_updated": "2019-07-28T03:26:00Z",
      "layers": [
        {
          "name": "sample-config",
          "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
          "source": "string",
          "playbook": "site.yml",
          "commit": "string",
          "branch": "string",
          "special_parameters": {
            "ims_require_dkms": true
          }
        }
      ],
      "additional_inventory": {
        "name": "sample-inventory",
        "clone_url": "https://vcs.domain/vcs/org/inventory.git",
        "source": "string",
        "commit": "string",
        "branch": "string"
      }
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

A collection of configuration data.

Properties

Name Type Required Restrictions Description
configurations [V3ConfigurationData] false none [A collection of ConfigurationLayers.]
next V3NextData false none Information for requesting the next page of data

V2ComponentsFilter

{
  "ids": "string",
  "status": "unconfigured",
  "enabled": true,
  "configName": "string",
  "tags": "string"
}

Information for patching multiple components.

Properties

Name Type Required Restrictions Description
ids string false none A comma-separated list of component IDs
status string false none All components with this status will be patched.
enabled boolean false none Patches all components with the given “enabled” state.
configName string false none A configuration name. All components with this configuration set will be patched.
tags string false none Patches all components with the given tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only components that match all tags will be patched.

Enumerated Values

Property Value
status unconfigured
status pending
status failed
status configured

V3ComponentsFilter

{
  "ids": "string",
  "status": "unconfigured",
  "enabled": true,
  "config_name": "string",
  "tags": "string"
}

Information for patching multiple components.

Properties

Name Type Required Restrictions Description
ids string false none A comma-separated list of component IDs
status string false none All components with this status will be patched.
enabled boolean false none Patches all components with the given “enabled” state.
config_name string false none A configuration name. All components with this configuration set will be patched.
tags string false none Patches all components with the given tags. Key-value pairs should be separated using =, and tags can be a comma-separated list. Only components that match all tags will be patched.

Enumerated Values

Property Value
status unconfigured
status pending
status failed
status configured
status

V2ConfigurationStateLayer

{
  "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
  "playbook": "site.yml",
  "commit": "string",
  "lastUpdated": "2019-07-28T03:26:00Z",
  "sessionName": "string"
}

The current configuration state for a component.

Properties

Name Type Required Restrictions Description
cloneUrl string false none The clone URL of the configuration content repository.
playbook string false none The Ansible playbook to run.
commit string false none The commit hash of the configuration repository when the state is set.
lastUpdated string(date-time) false read-only The date/time when the state was last updated in RFC 3339 format.
sessionName string false none The name of the CFS session that last configured the component.

V3ConfigurationStateLayer

{
  "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
  "playbook": "site.yml",
  "commit": "string",
  "status": "applied",
  "last_updated": "2019-07-28T03:26:00Z",
  "session_name": "string"
}

The current configuration state for a component.

Properties

Name Type Required Restrictions Description
clone_url string false none The clone URL of the configuration content repository.
playbook string false none The Ansible playbook to run.
commit string false none The commit hash of the configuration repository when the state is set.
status string false none The status of the configuration layer.
last_updated string(date-time) false read-only The date/time when the state was last updated in RFC 3339 format.
session_name string false none The name of the CFS session that last configured the component.

Enumerated Values

Property Value
status applied
status failed
status skipped

V2ComponentState

{
  "id": "string",
  "state": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "stateAppend": {
    "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
    "playbook": "site.yml",
    "commit": "string",
    "sessionName": "string"
  },
  "desiredConfig": "string",
  "desiredState": [
    {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "lastUpdated": "2019-07-28T03:26:00Z",
      "sessionName": "string"
    }
  ],
  "errorCount": 0,
  "retryPolicy": 0,
  "enabled": true,
  "configurationStatus": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  }
}

The configuration state and desired state for a component.

Properties

Name Type Required Restrictions Description
id string false none The component’s id. e.g. xname for hardware components
state [V2ConfigurationStateLayer] false none Information about the desired config and status of the layers
stateAppend object false write-only A single state that will be appended to the list of current states.
» cloneUrl string false none The clone URL of the configuration content repository.
» playbook string false none The Ansible playbook to run.
» commit string false none The commit hash of the configuration repository when the state is set.
» sessionName string false none The name of the CFS session that last configured the component.
desiredConfig string false none A reference to a configuration
desiredState [V2ConfigurationStateLayer] false read-only Information about the desired config and status of the layers
errorCount integer false none The count of failed configuration attempts.
retryPolicy integer false none The maximum number retries per component when configuration fails.
enabled boolean false none A flag indicating if the component should be scheduled for configuration.
configurationStatus string false read-only A summary of the component’s configuration state.
tags object false none A collection of key-value pairs containing descriptive information for the component, such as information about the component owner.
» additionalProperties string false none none

Enumerated Values

Property Value
configurationStatus unconfigured
configurationStatus pending
configurationStatus failed
configurationStatus configured

V3ComponentData

{
  "id": "string",
  "state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "state_append": {
    "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
    "playbook": "site.yml",
    "commit": "string",
    "status": "applied",
    "session_name": "string"
  },
  "desired_state": [
    {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "last_updated": "2019-07-28T03:26:00Z",
      "session_name": "string"
    }
  ],
  "desired_config": "string",
  "error_count": 0,
  "retry_policy": 0,
  "enabled": true,
  "configuration_status": "unconfigured",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "logs": "string"
}

The configuration state and desired state for a component.

Properties

Name Type Required Restrictions Description
id string false none The component’s id. e.g. xname for hardware components
state [V3ConfigurationStateLayer] false none Information about the desired config and status of the layers
state_append object false write-only A single state that will be appended to the list of current states.
» clone_url string false none The clone URL of the configuration content repository.
» playbook string false none The Ansible playbook to run.
» commit string false none The commit hash of the configuration repository when the state is set.
» status string false none The status of the configuration layer.
» session_name string false none The name of the CFS session that last configured the component.
desired_state [V3ConfigurationStateLayer] false read-only Information about the desired config and status of the layers
desired_config string false none A reference to a configuration
error_count integer false none The count of failed configuration attempts.
retry_policy integer false none The maximum number retries per component when configuration fails.
enabled boolean false none A flag indicating if the component should be scheduled for configuration.
configuration_status string false read-only A summary of the component’s configuration state.
tags object false none A collection of key-value pairs containing descriptive information for the component, such as information about the component owner.
» additionalProperties string false none none
logs string false read-only The link to the ARA UI with logs for this component

Enumerated Values

Property Value
status applied
status failed
status skipped
configuration_status unconfigured
configuration_status pending
configuration_status failed
configuration_status configured

V2ComponentStateArray

[
  {
    "id": "string",
    "state": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "stateAppend": {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "sessionName": "string"
    },
    "desiredConfig": "string",
    "desiredState": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "errorCount": 0,
    "retryPolicy": 0,
    "enabled": true,
    "configurationStatus": "unconfigured",
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  }
]

An array of component configurations.

Properties

Name Type Required Restrictions Description
anonymous [V2ComponentState] false none An array of component configurations.

V3ComponentDataArray

[
  {
    "id": "string",
    "state": [
      {
        "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "status": "applied",
        "last_updated": "2019-07-28T03:26:00Z",
        "session_name": "string"
      }
    ],
    "state_append": {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "session_name": "string"
    },
    "desired_state": [
      {
        "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "status": "applied",
        "last_updated": "2019-07-28T03:26:00Z",
        "session_name": "string"
      }
    ],
    "desired_config": "string",
    "error_count": 0,
    "retry_policy": 0,
    "enabled": true,
    "configuration_status": "unconfigured",
    "tags": {
      "property1": "string",
      "property2": "string"
    },
    "logs": "string"
  }
]

An array of component configurations.

Properties

Name Type Required Restrictions Description
anonymous [V3ComponentData] false none An array of component configurations.

V3ComponentDataCollection

{
  "components": [
    {
      "id": "string",
      "state": [
        {
          "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
          "playbook": "site.yml",
          "commit": "string",
          "status": "applied",
          "last_updated": "2019-07-28T03:26:00Z",
          "session_name": "string"
        }
      ],
      "state_append": {
        "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "status": "applied",
        "session_name": "string"
      },
      "desired_state": [
        {
          "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
          "playbook": "site.yml",
          "commit": "string",
          "status": "applied",
          "last_updated": "2019-07-28T03:26:00Z",
          "session_name": "string"
        }
      ],
      "desired_config": "string",
      "error_count": 0,
      "retry_policy": 0,
      "enabled": true,
      "configuration_status": "unconfigured",
      "tags": {
        "property1": "string",
        "property2": "string"
      },
      "logs": "string"
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

A collection of component data.

Properties

Name Type Required Restrictions Description
components [V3ComponentData] false none [The configuration state and desired state for a component.
]
next V3NextData false none Information for requesting the next page of data

V3ComponentIdCollection

{
  "component_ids": [
    "string"
  ]
}

A collection of component ids.

Properties

Name Type Required Restrictions Description
component_ids [string] false none none

V2ComponentsUpdate

{
  "patch": {
    "id": "string",
    "state": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "stateAppend": {
      "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "sessionName": "string"
    },
    "desiredConfig": "string",
    "desiredState": [
      {
        "cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "lastUpdated": "2019-07-28T03:26:00Z",
        "sessionName": "string"
      }
    ],
    "errorCount": 0,
    "retryPolicy": 0,
    "enabled": true,
    "configurationStatus": "unconfigured",
    "tags": {
      "property1": "string",
      "property2": "string"
    }
  },
  "filters": {
    "ids": "string",
    "status": "unconfigured",
    "enabled": true,
    "configName": "string",
    "tags": "string"
  }
}

Information for patching multiple components.

Properties

Name Type Required Restrictions Description
patch V2ComponentState true none The configuration state and desired state for a component.
filters V2ComponentsFilter true none Information for patching multiple components.

V3ComponentsUpdate

{
  "patch": {
    "id": "string",
    "state": [
      {
        "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "status": "applied",
        "last_updated": "2019-07-28T03:26:00Z",
        "session_name": "string"
      }
    ],
    "state_append": {
      "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
      "playbook": "site.yml",
      "commit": "string",
      "status": "applied",
      "session_name": "string"
    },
    "desired_state": [
      {
        "clone_url": "https://api-gw-service-nmn.local/vcs/cray/config-management.git",
        "playbook": "site.yml",
        "commit": "string",
        "status": "applied",
        "last_updated": "2019-07-28T03:26:00Z",
        "session_name": "string"
      }
    ],
    "desired_config": "string",
    "error_count": 0,
    "retry_policy": 0,
    "enabled": true,
    "configuration_status": "unconfigured",
    "tags": {
      "property1": "string",
      "property2": "string"
    },
    "logs": "string"
  },
  "filters": {
    "ids": "string",
    "status": "unconfigured",
    "enabled": true,
    "config_name": "string",
    "tags": "string"
  }
}

Information for patching multiple components.

Properties

Name Type Required Restrictions Description
patch V3ComponentData true none The configuration state and desired state for a component.
filters V3ComponentsFilter true none Information for patching multiple components.

V3SourceCredentials

{
  "authentication_method": "password",
  "secret_name": "string",
  "username": "string",
  "password": "string"
}

Information on a secret containing the username and password for accessing the git content

Properties

Name Type Required Restrictions Description
authentication_method string false none The git authentication method used.
secret_name string false read-only The name of the credentials vault secret.
username string false write-only The username for authenticating to git
password string false write-only The password for authenticating to git

Enumerated Values

Property Value
authentication_method password

V3SourceCert

{
  "configmap_name": "string",
  "configmap_namespace": "string"
}

Information on a configmap containing a CA certificate for authenticating to git

Properties

Name Type Required Restrictions Description
configmap_name string true none The name of the configmap containing a necessary CA cert.
configmap_namespace string false none The namespace of the CA cert configmap in kubernetes.

V3SourceData

{
  "name": "sample-source",
  "description": "string",
  "last_updated": "2019-07-28T03:26:00Z",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "secret_name": "string",
    "username": "string",
    "password": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Information for retrieving git content from a source.

Properties

Name Type Required Restrictions Description
name string false none The name of the source. This field is optional and will default to the clone_url if not specified.
description string false none A user-defined description. This field is not used by CFS.
last_updated string(date-time) false read-only The date/time when the state was last updated in RFC 3339 format.
clone_url string false none The url to access the git content
credentials V3SourceCredentials false none Information on a secret containing the username and password for accessing the git content
ca_cert V3SourceCert false none Information on a configmap containing a CA certificate for authenticating to git

V3SourceDataCollection

{
  "sources": [
    {
      "name": "sample-source",
      "description": "string",
      "last_updated": "2019-07-28T03:26:00Z",
      "clone_url": "string",
      "credentials": {
        "authentication_method": "password",
        "secret_name": "string",
        "username": "string",
        "password": "string"
      },
      "ca_cert": {
        "configmap_name": "string",
        "configmap_namespace": "string"
      }
    }
  ],
  "next": {
    "limit": 0,
    "after_id": "string"
  }
}

A collection of source data.

Properties

Name Type Required Restrictions Description
sources [V3SourceData] false none [Information for retrieving git content from a source.]
next V3NextData false none Information for requesting the next page of data

V3SourceCreateCredentials

{
  "authentication_method": "password",
  "username": "string",
  "password": "string"
}

Information for retrieving the git credentials

Properties

Name Type Required Restrictions Description
authentication_method string false none The git authentication method used.
username string true write-only The username for authenticating to git
password string true write-only The password for authenticating to git

Enumerated Values

Property Value
authentication_method password

V3SourceCreateData

{
  "name": "sample-source",
  "description": "string",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "username": "string",
    "password": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Information for retrieving git content from a source.

Properties

Name Type Required Restrictions Description
name string false none The name of the source. This field is optional and will default to the clone_url if not specified.
description string false none A user-defined description. This field is not used by CFS.
clone_url string true none The url to access the git content
credentials V3SourceCreateCredentials true none Information for retrieving the git credentials
ca_cert V3SourceCert false none Information on a configmap containing a CA certificate for authenticating to git

V3SourceUpdateData

{
  "description": "string",
  "clone_url": "string",
  "credentials": {
    "authentication_method": "password",
    "secret_name": "string",
    "username": "string",
    "password": "string"
  },
  "ca_cert": {
    "configmap_name": "string",
    "configmap_namespace": "string"
  }
}

Information for retrieving git content from a source.

Properties

Name Type Required Restrictions Description
description string false none A user-defined description. This field is not used by CFS.
clone_url string false none The url to access the git content
credentials V3SourceCredentials false none Information on a secret containing the username and password for accessing the git content
ca_cert V3SourceCert false none Information on a configmap containing a CA certificate for authenticating to git

ProblemDetails

{
  "type": "about:blank",
  "title": "string",
  "status": 400,
  "instance": "http://example.com",
  "detail": "string"
}

An error response for RFC 7807 problem details.

Properties

Name Type Required Restrictions Description
type string(uri) false none Relative URI reference to the type of problem which includes human readable documentation.
title string false none Short, human-readable summary of the problem, should not change by occurrence.
status integer false none HTTP status code
instance string(uri) false none A relative URI reference that identifies the specific occurrence of the problem
detail string false none A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.