...
Code Block |
---|
|
{
"cloud-region": "krd",
"profile-name": "p1",
"rb-name":"test-rbdef",
"rb-version":"v1",
"override-parameters": {
"optionalDictOfParameters": "andTheirValues, like",
"global.name": "dummy-name"
},
"labels": {
"optionalLabelForInternalK8spluginInstancesMetadata": "dummy-value"
}
} |
NOTE: Make sure that the namespace is already created before instantiation.
See
Jira |
---|
server | ONAP JIRA |
---|
serverId | 425b2b0a-557c-3c0c-b515-579789cceedb |
---|
key | MULTICLOUD-462 |
---|
|
for more details.Instantiate the profile with the ID provided above
Instantiate the profile with the ID provided above
Code Block |
---|
language | bash |
---|
title | Command to Instantiate a Profile |
---|
|
curl -d @create_ |
Code Block |
---|
language | bash |
---|
title | Command to Instantiate a Profile |
---|
|
curl -d @create_rbinstance.json http://NODE_IP:30280/api/multicloud-k8s/v1/v1/instance |
...
Code Block |
---|
|
{
"id": "ZKMTSaxv",
ID_GENERATED_BY_K8SPLUGIN",
"namespace": "NAMESPACE_WHERE_INSTANCE_HAS_BEEN_DEPLOYED_AS_DERIVED_FROM_PROFILE",
"request": {
"rb-name": "mongotest-rbdef",
"rb-version": "v1",
"profile-name": "profile1",
"cloud-region": "kud",
"namespace": "testns",
"resources": [
{
"GVK": {
p1",
"cloud-region": "krd",
"override-parameters": {
"optionalDictOfParameters": "andTheirValues, like",
"global.name": "dummy-name"
},
"labels": {
"optionalLabelForInternalK8spluginInstancesMetadata": "dummy-value"
},
}
"resources": [
{
"GVK": {
"Group": "",
"Kind": "ConfigMap",
"Version": "v1"
},
"Name": "test-cm"
},
{
"GVK": {
"Group": "",
"Kind": "Service",
"Version": "v1"
},
"Name": "test-svc"
}, "Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo"
},
{
"GVK": {
"Group": "",
"Version": "v1",
"Kind": "Service"
},
"Name": "mongo-read" {
},
{
"GVK": {
"Group": "apps",
"VersionKind": "v1beta1Deployment",
"Kind "Version": "StatefulSetv1"
},
"Name": "profile1test-mongodep"
}
]
} |
Delete Instantiated Kubernetes resources
...
The id field from the returned JSON can be used to GET the resources created in the previous step
This executes a Delete operation using the Kubernetes API.
Code Block |
---|
language | bash |
---|
title | Command to GET a resource |
---|
|
curl -X GET http://NODE_IP:30280/api/multicloud-k8s/v1/v1/instance/ZKMTSaxv |
Output of this call conforms to the same schema and contains (currently) same information as instantiation response (described above)
LIST all Instantiated Kubernetes resources
...