Skip to content

Commit

Permalink
Merge pull request #29 from klag/master
Browse files Browse the repository at this point in the history
Fixes related to network calls
  • Loading branch information
klag authored Jul 28, 2023
2 parents c1ba909 + b690152 commit 2777a41
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
33 changes: 29 additions & 4 deletions InterfaceAPI.iol
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,29 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

type EndpointSettings: void {
.IPAMConfig?: void {
.IPv4Address?: string
.IPv6Address?: string
.LinkLocalIPs*: string
}
.Links*: string
.Aliases*: string
.NetworkID?: string
.EndpointID?: string
.Gateway?: string
.IPAddress?: string
.IPPrefixLen?: int
.IPv6Gateway?: string
.GlobalIPv6Address?: string
.GlobalIPv6PrefixLen?: long
.MacAddress?: string
}

type AttachContainerToNetworkRequest: void {
.id: string // network Id
.Container: string // container id
.EndpointConfig?: EndpointSettings
}

type AttachContainerToNetworkResponse: void
Expand Down Expand Up @@ -209,6 +229,7 @@ type NetworkType: void {
.Driver?: string
.EnableIPv6?: bool
.Internal?: bool
.Ingress?: bool
.Labels?: undefined
.Attachable?: bool
.IPAM?: void {
Expand All @@ -219,10 +240,14 @@ type NetworkType: void {
}
.Options?: undefined
}
.ConfigFrom?: undefined
.Containers?: undefined
.ConfigOnly?: bool
.Options?: undefined
}



type Port: void {
.PrivatePort?: int
.PublicPort?: int
Expand Down Expand Up @@ -478,11 +503,11 @@ type ImagesResponse: void {
.images[0, *]: void {
.Id?: string
.ParentId?: string
.RepoTags[0, *]: string
.RepoTags[0, *]: string | void
.RepoDigests*: undefined
.Created?: int
.Size?: int
.VirtualSize?: int
.Size?: long
.VirtualSize?: long
.SharedSize?: int
.Labels?: undefined
.Containers?: int
Expand Down Expand Up @@ -642,7 +667,7 @@ type LogsResponse: void {
}

type NetworksRequest: void {
.filters?: string {
.filters?: void {
.driver?: string
.id?: string
.label?: undefined
Expand Down
9 changes: 7 additions & 2 deletions dockerAPI.ol
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ outputPort DockerD {
.osc.waitContainer.method.queryFormat = "json"
}
RequestResponse:
attachContainerToNetwork,
attachContainerToNetwork( AttachContainerToNetworkRequest )( undefined ),
build,
changesOnCtn,
containers,
Expand Down Expand Up @@ -846,7 +846,12 @@ main {
scope( networks )
{
install( serverError => println@Console("Internal server error")() );
networks@DockerD( request )( responseByDocker );
if ( !( request instanceof void ) ) {
if ( !( request.filters instanceof void )) {
getJsonString@JsonUtils( request.filters )( req.filters )
}
}
networks@DockerD( req )( responseByDocker );
if( responseByDocker.("@header").statusCode == 500 )
{
fault.status = 500;
Expand Down

0 comments on commit 2777a41

Please sign in to comment.