Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Command to POST (create) Template:

{name}/

curl -i -d @create_config_template.json -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/

profile/

config-template/

With the following JSON content (create_config_template.json )

1
2
3
4

{
    "name""kafka_token"
    "description""testing Kafka Day 2 config configuration",
}

Command to UPLOAD Template:

curl -i --data-binary @kafka-config.tar.gz -X POST http://localhost:8081/v1/rb/definition/{name}/{version

}/profile/{name

}/config-template/{name}

Command to GET  Templates:

{name}/

# Get all Templates
curl -i http://localhost:8081/v1/rb/definition/{name}/{version}/

profile/{name}/

config-template
 
# Get one Template
curl -i http://localhost:8081/v1/rb/definition/{name}/{version}/

profile/

config-template/{name}

Command to DELETE Templates:

curl -i -X DELETE http://localhost:8081/rb/definition/{name}/{version}

/profile

/

{name}/

config-template/{name}

Example 

Example Contents of Tar File 

cd demo/vnfs/DAaaS
find kafka-config
kafka-config/values.yaml
kafka-config/Chart.yaml
kafka-config/templates
kafka-config/templates/topic.yaml
 
#Create a tar.gz for upload
tar -cf kafka-config.tar kafka-config
gzip kafka-config.tar

Configuration Values API's

...

Command to POST (create) Configuration Values

curl -i -d @values.json -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config

With the following JSON content (values.json )

{
  "template-name""kafka_token"
  "config-name""kafka_token_1"
  "description":"testing Kafka Day 2 config configuration",
   "values":{
      "namespace":"kafka",
      "topic":{
         "name":"orders",
         "cluster":"my-cluster",
         "partitions":10,
         "replicas":2
      }
   }
}


This command returns the following JSON which contains config-version id.

{
   "rb-name":"kafka",
   "rb-version":"kafka-config-1",
   "profile-name":"1234567890",
   "template-name""kafka-token"
   "config-name""kafka_token_1"
   "config-version":"1"
   }
}

Command to GET Configuration Values

# Get all Values
curl -i http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config
 
# Get one Value with config name
curl -i http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/{name}

Command to DELETE Configuration Values

curl -i -X DELETE http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/{name}

Command to PUT (Modify) Configuration Values 

curl -i -d @values.json -X PUT http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/config/{name}

With the following JSON content (values.json )

{
  "template-name""kafka_token"
  "config-name""kafka_token_1"
  "description":"testing Kafka Day 2 config configuration",
   "values":{
      "namespace":"kafka",
      "topic":{
         "name":"orders",
         "cluster":"my-cluster",
         "partitions":20,
         "replicas":2
      }
   }
}


This command returns the following JSON which contains config-version.

{
   "rb-name":"kafka",
   "rb-version":"kafka-config-1",
   "profile-name":"1234567890",
   "template-name""kafka-token"
   "config-name""kafka_token_1"
   "config-version":"3"
   }
}

Command to TAG  configuration Values 

This will add the tag name to the current config version

curl -i  -d @values.json -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/tagit

With the following JSON content (values.json )

{
  "tag-name""my-tag"
}


Command to ROLLBACK   configuration Values 

Rollbacks configuration to a config version or a tag. 

curl -i -d @values.json -X POST http://localhost:8081/v1/rb/definition/{name}/{version}/profile/{name}/rollback

With the following JSON content (values.json )

{
  "anyOf": [
    {
      "config-version""<value>"
    },
    {
      "config-tag""<tag name>"
    }
  ]
}


Reachability/Connectivity Info API's

API to support Reachability for Kubernetes Cloud

/v1/connectivity