Versions Compared

Key

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

...

Command to POST Connectivity Info

Code Block
languagejs
{
	“name”“cloud-region” : “<name>”,   // Must be unique across 
   	“cloud-owner” :  “<owner>”,
   	“cloud-region-id” : “<region>”,
   	“kubeconfig” :  “<contents of Kubeconfig>”
    “other-connectivity-list” : {
        //Extendible list of name value pairs
    	“connectivity-record” : [
			{
                “connectivity-record-name” : “<name>”,   // example: OVN
                “FQDN-or-ip” : “<fqdn>”,
                “ca-cert-to-verify-server” : “<contents of CA certificate to validate the OVN server>”,
                “ssl-initiator” : “<true/false”>,
                “user-name”:  “<user name>”,   //valid if ssl-initator is false
                “password” : “<password>”,      // valid if ssl-initiator is false
                “private-key” :  “<contents of private key in PEM>”, // valid if ssl-initiator is true
                “cert-to-present” :  “<contents of certificate to present to server>” , //valid if ssl-initiator is true
			},
         ]
	}
}

This is a multipart upload and here is how you do the POST for this.

#Using a json file containing content as above;

curl -i -

d @connect.json

F "metadata=<jsonfile;type=application/json" -F file=@/home/ad_kkkamine/.kube/config -X POST http://localhost:8081/v1/connectivity-info

Command to GET Connectivity Info

curl -i -X GET http://localhost:8081/v1/connectivity-info/{name}

Command to DELETE Connectivity Info

curl -i -X DELETE http://localhost:8081/v1/connectivity-info/{name}

Command to UPDATE/PUT Connectivity Info

curl -i -d @update.json -X PUT http://localhost:8081/v1/connectivity-info/{name}