[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Gear links and REST API documentation

>From the PUT /container/:id endpoint, use:

  "NetworkLinks": [
      "FromHost": "<in_container_ip>",
      "FromPost": <in_container_port_number>,
      "ToHost": "<remote_server_ip_or_dns>",
      "ToPort": <remote_container_port_number>
    // ...

You can use lowercase for all key names.

----- Original Message -----
> Hello,
> I'm trying to find out how to add "links" to a geard unit via the REST
> API, either when creating the unit or as a reconfiguration of the
> links for an existing unit.
> Something equivalent to the following command line:
> sudo gear install --net-links= --start
> examples/nc_xxx_to_80 example_unit
> There are some examples in the README file showing the JSON required
> to set up port forwarding to a server inside the container, eg
> $ curl -X PUT "http://localhost:43273/container/my-sample-service"; -H
> "Content-Type: application/json" -d '{"Image":
> "openshift/busybox-http-app", "Started":true,
> "Ports":[{"Internal":8080}]}'
> But I can't find any examples of the JSON keys and values required for
> setting up links.
> Can anyone point me to such an example or to some documentation of all
> the keys that can be used in the REST API.
> Thanks in advance.
> -RichardW.
> _______________________________________________
> users mailing list
> users lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]