diff --git a/Dockerfile.dev b/Dockerfile.dev index 76c540e..fe14009 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,8 +1,4 @@ -FROM golang:1.6 - -RUN apt-get update && apt-get install -y --no-install-recommends \ - zip \ - && rm -rf /var/lib/apt/lists/* +FROM golang:1.7 ENV GLIDE_VERSION v0.12.3 @@ -16,7 +12,4 @@ RUN go get -u github.com/jteeuwen/go-bindata/... \ && rm /tmp/glide.tgz ENV CGO_ENABLED 0 -ENV GO15VENDOREXPERIMENT 1 -ENV GOEXPERIMENT framepointer ENV GOPATH /go:/toscalib - diff --git a/Makefile b/Makefile index a184b78..a55dec0 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ SHELL := /bin/bash .PHONY: clean test cover lint format -PROJECT = toscalib +export PROJECT = toscalib IMPORT_PATH := github.com/CiscoCloud/${PROJECT} @@ -25,14 +25,17 @@ DOCKERNOVENDOR := docker run --rm -i \ ${DEV_IMAGE} clean: - @rm -rf cover *.txt + @rm -rf cover + +veryclean: clean + @rm -rf .glide vendor # ---------------------------------------------- -# docker build +# build # builds the builder container build/image_build: - docker build -t ${DEV_IMAGE} -f Dockerfile.dev . + @docker build --quiet -t ${DEV_IMAGE} -f Dockerfile.dev . # top-level target for vendoring our packages: glide install requires # being in the package directory so we have to run this for each package @@ -41,9 +44,12 @@ vendor: build/image_build # fetch a dependency via go get, vendor it, and then save into the parent # package's glide.yml -# usage DEP=github.com/owner/package make add-dep +# usage: DEP=github.com/owner/package make add-dep add-dep: build/image_build - ${DOCKERNOVENDOR} bash -c "DEP=$(DEP) ./scripts/add_dep.sh" +ifeq ($(strip $(DEP)),) + $(error "No dependency provided. Expected: DEP=") +endif + ${DOCKERNOVENDOR} glide get ${DEP} # ---------------------------------------------- # develop and test @@ -67,3 +73,8 @@ cover: check # ------ Generator generate: build/image_build NormativeTypes/* ${DOCKERRUN} go-bindata -pkg=toscalib -prefix=NormativeTypes/ -o normative_definitions.go NormativeTypes/ + +# ------ Minishift / Docker Machine Helpers +.PHONY: setup +setup: + @bash ./scripts/setup.sh diff --git a/NormativeTypes/capability_types b/NormativeTypes/capability_types index 3aa0f5e..296d897 100644 --- a/NormativeTypes/capability_types +++ b/NormativeTypes/capability_types @@ -119,6 +119,9 @@ capability_types: tosca.capabilities.network.Bindable: derived_from: tosca.capabilities.Node + tosca.capabilities.network.Linkable: + derived_from: tosca.capabilities.Node + tosca.capabilities.Node: derived_from: tosca.capabilities.Root diff --git a/NormativeTypes/node_types b/NormativeTypes/node_types index f85bbd8..24e23b0 100644 --- a/NormativeTypes/node_types +++ b/NormativeTypes/node_types @@ -133,6 +133,76 @@ node_types: occurrences: [0, UNBOUNDED] description: Connection to one or more load balanced applications + tosca.nodes.network.Network: + derived_from: tosca.nodes.Root + properties: + ip_version: + type: integer + required: false + default: 4 + constraints: + - valid_values: [ 4, 6 ] + cidr: + type: string + required: false + start_ip: + type: string + required: false + end_ip: + type: string + required: false + gateway_ip: + type: string + required: false + network_name: + type: string + required: false + network_id: + type: string + required: false + segmentation_id: + type: string + required: false + network_type: + type: string + required: false + physical_network: + type: string + required: false + capabilities: + link: + type: tosca.capabilities.network.Linkable + + tosca.nodes.network.Port: + derived_from: tosca.nodes.Root + properties: + ip_address: + type: string + required: false + order: + type: integer + required: true + default: 0 + constraints: + - greater_or_equal: 0 + is_default: + type: boolean + required: false + default: false + ip_range_start: + type: string + required: false + ip_range_end: + type: string + required: false + requirements: + - link: + capability: tosca.capabilities.network.Linkable + relationship: tosca.relationships.network.LinksTo + - binding: + capability: tosca.capabilities.network.Bindable + relationship: tosca.relationships.network.BindsTo + tosca.nodes.Storage.ObjectStorage: derived_from: tosca.nodes.Root properties: diff --git a/NormativeTypes/relationship_types b/NormativeTypes/relationship_types index cc06630..03c1553 100644 --- a/NormativeTypes/relationship_types +++ b/NormativeTypes/relationship_types @@ -29,6 +29,14 @@ relationship_types: derived_from: tosca.relationships.Root valid_target_types: [ tosca.capabilities.Container ] + tosca.relationships.network.BindsTo: + derived_from: tosca.relationships.DependsOn + valid_target_types: [ tosca.capabilities.network.Bindable ] + + tosca.relationships.network.LinksTo: + derived_from: tosca.relationships.DependsOn + valid_target_types: [ tosca.capabilities.network.Linkable ] + tosca.relationships.Root: description: The TOSCA root Relationship Type all other TOSCA base Relationship Types derive from attributes: diff --git a/README.md b/README.md index 47c60aa..6c8a308 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Abstract This library is an implementation of the TOSCA definition as described in the document written in pure GO -[TOSCA Simple Profile in YAML Version 1.0](http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html) +[TOSCA Simple Profile in YAML Version 1.1](http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/TOSCA-Simple-Profile-YAML-v1.1.html) ## Status diff --git a/flattener.go b/flattener.go index 99df81a..9c16315 100644 --- a/flattener.go +++ b/flattener.go @@ -11,24 +11,27 @@ type flatTypes struct { Policies map[string]PolicyType } -// TODO(kenjones): Switch to reflect if possible in the future (if simple) - func flattenCapType(name string, s ServiceTemplateDefinition) CapabilityType { if ct, ok := s.CapabilityTypes[name]; ok { if ct.DerivedFrom != "" { parent := flattenCapType(ct.DerivedFrom, s) + + // clone the parent first before applying any changes + tmp := clone(parent) + ctm, _ := tmp.(CapabilityType) + // mergo does not handle merging Slices so the rt items // will wipe away, capture the values here. - sources := parent.ValidSources + sources := ctm.ValidSources - _ = mergo.MergeWithOverwrite(&parent, ct) + _ = mergo.MergeWithOverwrite(&ctm, ct) // now copy them back in using append, if the child type had // any previously, otherwise it will duplicate the parents. if len(ct.ValidSources) > 0 { - parent.ValidSources = append(parent.ValidSources, sources...) + ctm.ValidSources = append(ctm.ValidSources, sources...) } - return parent + return ctm } return ct } @@ -39,8 +42,13 @@ func flattenIntfType(name string, s ServiceTemplateDefinition) InterfaceType { if it, ok := s.InterfaceTypes[name]; ok { if it.DerivedFrom != "" { parent := flattenIntfType(it.DerivedFrom, s) - _ = mergo.MergeWithOverwrite(&parent, it) - return parent + + // clone the parent first before applying any changes + tmp := clone(parent) + itm, _ := tmp.(InterfaceType) + + _ = mergo.MergeWithOverwrite(&itm, it) + return itm } return it } @@ -51,18 +59,23 @@ func flattenRelType(name string, s ServiceTemplateDefinition) RelationshipType { if rt, ok := s.RelationshipTypes[name]; ok { if rt.DerivedFrom != "" { parent := flattenRelType(rt.DerivedFrom, s) + + // clone the parent first before applying any changes + tmp := clone(parent) + rtm, _ := tmp.(RelationshipType) + // mergo does not handle merging Slices so the rt items // will wipe away, capture the values here. - targets := parent.ValidTarget + targets := rtm.ValidTarget - _ = mergo.MergeWithOverwrite(&parent, rt) + _ = mergo.MergeWithOverwrite(&rtm, rt) // now copy them back in using append, if the child type had // any previously, otherwise it will duplicate the parents. if len(rt.ValidTarget) > 0 { - parent.ValidTarget = append(parent.ValidTarget, targets...) + rtm.ValidTarget = append(rtm.ValidTarget, targets...) } - return parent + return rtm } return rt } @@ -73,18 +86,23 @@ func flattenNodeType(name string, s ServiceTemplateDefinition) NodeType { if nt, ok := s.NodeTypes[name]; ok { if nt.DerivedFrom != "" { parent := flattenNodeType(nt.DerivedFrom, s) + + // clone the parent first before applying any changes + tmp := clone(parent) + ntm, _ := tmp.(NodeType) + // mergo does not handle merging Slices so the nt items // will wipe away, capture the values here. - reqs := parent.Requirements + reqs := ntm.Requirements - _ = mergo.MergeWithOverwrite(&parent, nt) + _ = mergo.MergeWithOverwrite(&ntm, nt) // now copy them back in using append, if the child node type had // any previously, otherwise it will duplicate the parents. if len(nt.Requirements) > 0 { - parent.Requirements = append(parent.Requirements, reqs...) + ntm.Requirements = append(ntm.Requirements, reqs...) } - return parent + return ntm } return nt } @@ -95,22 +113,27 @@ func flattenGroupType(name string, s ServiceTemplateDefinition) GroupType { if gt, ok := s.GroupTypes[name]; ok { if gt.DerivedFrom != "" { parent := flattenGroupType(gt.DerivedFrom, s) + + // clone the parent first before applying any changes + tmp := clone(parent) + gtm, _ := tmp.(GroupType) + // mergo does not handle merging Slices so the nt items // will wipe away, capture the values here. - reqs := parent.Requirements - members := parent.Members + reqs := gtm.Requirements + members := gtm.Members - _ = mergo.MergeWithOverwrite(&parent, gt) + _ = mergo.MergeWithOverwrite(>m, gt) // now copy them back in using append, if the child type had // any previously, otherwise it will duplicate the parents. if len(gt.Requirements) > 0 { - parent.Requirements = append(parent.Requirements, reqs...) + gtm.Requirements = append(gtm.Requirements, reqs...) } if len(gt.Members) > 0 { - parent.Members = append(parent.Members, members...) + gtm.Members = append(gtm.Members, members...) } - return parent + return gtm } return gt } @@ -121,18 +144,23 @@ func flattenPolicyType(name string, s ServiceTemplateDefinition) PolicyType { if pt, ok := s.PolicyTypes[name]; ok { if pt.DerivedFrom != "" { parent := flattenPolicyType(pt.DerivedFrom, s) + + // clone the parent first before applying any changes + tmp := clone(parent) + ptm, _ := tmp.(PolicyType) + // mergo does not handle merging Slices so the items // will wipe away, capture the values here. - targets := parent.Targets + targets := ptm.Targets - _ = mergo.MergeWithOverwrite(&parent, pt) + _ = mergo.MergeWithOverwrite(&ptm, pt) // now copy them back in using append, if the child type had // any previously, otherwise it will duplicate the parents. if len(pt.Targets) > 0 { - parent.Targets = append(parent.Targets, targets...) + ptm.Targets = append(ptm.Targets, targets...) } - return parent + return ptm } return pt } @@ -157,6 +185,19 @@ func flattenHierarchy(s ServiceTemplateDefinition) flatTypes { flats.Relationships[name] = flattenRelType(name, s) } + for k, v := range flats.Relationships { + for name, iDef := range v.Interfaces { + // during merge the Type is not always properly inherited, so set it + // from the parent. + if iDef.Type == "" { + iDef.Type = flats.Relationships[v.DerivedFrom].Interfaces[name].Type + } + iDef.extendFrom(flats.Interfaces[iDef.Type]) + v.Interfaces[name] = iDef + } + flats.Relationships[k] = v + } + flats.Nodes = make(map[string]NodeType) for name := range s.NodeTypes { flats.Nodes[name] = flattenNodeType(name, s) diff --git a/normative_definitions.go b/normative_definitions.go index 5b34f48..c729444 100644 --- a/normative_definitions.go +++ b/normative_definitions.go @@ -75,7 +75,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _artifact_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x93\x4f\x4f\xc3\x30\x0c\xc5\xef\xfd\x14\x3e\xc2\x81\x32\xae\xbd\x0d\x10\xd2\x0e\x13\x88\x8d\x5d\x10\x8a\x42\xeb\xae\x96\xd2\x24\x4a\xbc\x69\xfd\xf6\xa4\xe9\xfe\x68\x28\x68\x9d\x44\x4f\x91\xfc\xfc\xf3\x7b\x96\xcb\xc6\x97\x52\x54\x58\x93\x26\x26\xa3\xbd\xd8\xa2\xf3\xe1\x51\xc0\x50\xf2\xd4\x5a\x85\xa2\x93\xad\x12\x0f\x62\x22\x26\x59\x26\x1d\x53\x2d\x4b\x16\xdc\x59\xf4\x45\x06\xe1\x8b\xe2\xfc\x50\xf1\xf9\xbb\x31\x3c\x54\x00\x2a\xf4\xa5\x23\xcb\x91\xba\x6c\x10\x96\xaf\x8b\xa7\x29\x4c\xf7\x62\x58\x06\x0c\x48\xa5\xc0\x70\x83\x2e\x55\xf5\x81\xe1\x68\x8b\x50\x3b\xd3\x66\xc9\x81\x2f\xa4\xf0\x34\xb0\x17\x57\xa2\x57\x17\x49\x6b\x69\xc6\x33\x5a\x65\xba\x16\x35\x5f\x41\x4a\x65\x8c\x09\xbe\xa5\x47\xe8\x57\x04\xb5\x71\x41\x70\x60\xc3\x11\x70\xc9\x45\x3e\x6b\xe5\x7a\x64\xaa\x53\xd7\x38\x6a\xbe\x9a\x5f\x0b\x1e\x1a\x53\x81\x57\xe4\x78\x23\x15\xcc\x65\xd9\x90\x46\xb8\x59\xcd\x6f\x61\x50\x27\xcd\xcc\xfa\x9b\xea\x91\x32\xf6\xff\xfb\xb2\xe9\x8c\x7f\x69\xe1\xe7\x6e\xf2\x47\xe9\x9b\x71\x96\xce\x1b\x53\xe6\x16\xf1\x79\x34\x10\xcd\x85\x23\x87\x0f\x4d\x3b\xe8\x07\x81\x6f\x50\xa9\x7d\x6b\x4b\x2d\xc6\x9f\xaa\x00\x69\xad\xa2\x32\x72\xef\x77\x77\xbe\xd9\x2b\xea\x70\xe5\x02\x77\x5c\xc0\x67\xe8\x84\xaf\x51\x81\xde\x3a\x6e\xc6\x6e\xf9\x72\xa4\xe9\xef\x2c\xa4\x19\x9d\x75\xc8\x58\xc1\x30\x0a\x94\xd4\xeb\xcd\xe9\x56\xfe\xcc\x65\xa3\x3c\x91\xcd\x76\x21\xdb\x4f\x00\x00\x00\xff\xff\x67\x2b\xbe\x8b\x9c\x04\x00\x00") +var _artifact_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x93\x41\x6b\xe3\x30\x10\x85\xef\xfe\x15\xef\xb8\x7b\x58\x6f\xf6\xea\x5b\x76\x97\x42\x0e\xa1\xa5\x49\x73\x29\x41\xa8\xf6\x38\x1a\x90\x25\x21\x29\x21\xfe\xf7\xc5\x72\x9a\x90\xa2\x12\x07\x7a\x33\xcc\x7b\xdf\xbc\x37\xc8\xd1\x86\x5a\x8a\x86\x5a\x36\x1c\xd9\x9a\x20\x0e\xe4\x03\x5b\x53\x61\x1c\x05\xee\x9c\x26\xd1\xcb\x4e\x8b\x3f\x62\x26\x66\x45\x21\x7d\xe4\x56\xd6\x51\xc4\xde\x51\xa8\x0a\x00\xa3\xb8\xfc\x98\x84\xf2\xd9\xda\x38\x4e\x80\x86\x42\xed\xd9\xc5\x44\x5d\x2b\xc2\xfa\x71\xf5\x6f\x8e\xf9\x49\x8c\x75\xef\x08\x52\x6b\xd8\xa8\xc8\xe7\xa6\x01\x0d\x79\x3e\x10\x5a\x6f\xbb\x22\xbb\xf0\x81\x35\x5d\x16\x0e\xe2\x46\x0c\xea\x2a\x1b\x2d\xcf\xf8\x4f\x4e\xdb\xbe\x23\x13\xef\x20\xe5\x3a\xa6\x06\x6f\x32\x10\x86\x13\xa1\xb5\x1e\xcd\x99\x8d\x33\xe0\x56\x8a\x72\xd1\xc9\xdd\xc4\x56\x17\xd7\x34\x6a\xb9\x59\xde\x0b\x1e\x8d\xb9\xc2\x1b\xf6\x71\x2f\x35\x96\xb2\x56\x6c\x08\x3f\x36\xcb\x9f\x18\xd5\xd9\x30\x8b\xe1\x4d\x0d\x48\x99\xfc\xdf\x7e\x6c\xbe\xe2\xdf\x3a\xf8\x75\x9a\xf2\xaf\x0c\x6a\x5a\xa4\x6b\x63\x2e\xdc\x2a\x7d\x9e\x03\xa4\x70\x51\x11\x5e\x0c\x1f\x31\x2c\x42\x50\xa4\xf5\xc9\xda\x71\x47\xe9\xa7\xaa\x20\x9d\xd3\x5c\x27\xee\xef\xe3\xaf\xa0\x4e\x8a\x96\x35\x09\x3a\xc6\x0a\xaf\x08\x0a\xdb\x49\x85\x9e\xfa\xa8\xa6\x5e\xf9\x76\xa5\xf9\xe7\x2e\x6c\x22\x79\xe7\x29\x52\x83\x71\x15\xb4\x34\xbb\xfd\xe5\xad\x7c\xd9\xcb\x25\x79\xa6\x9b\xeb\xb1\x2d\xde\x03\x00\x00\xff\xff\x67\x2b\xbe\x8b\x9c\x04\x00\x00") func artifact_typesBytes() ([]byte, error) { return bindataRead( @@ -90,12 +90,12 @@ func artifact_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "artifact_types", size: 1180, mode: os.FileMode(511), modTime: time.Unix(1476596385, 0)} + info := bindataFileInfo{name: "artifact_types", size: 1180, mode: os.FileMode(511), modTime: time.Unix(1476627076, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _capability_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x57\x4d\x6f\x23\x37\x0c\xbd\xe7\x57\x10\xe8\x75\xd7\x48\xae\x3e\x14\x48\x9c\x45\x1b\xa0\xcd\x06\xeb\xb4\x97\xa2\x10\x68\x0d\x6d\x0b\xab\x19\xa9\x12\x27\xbb\xde\x5f\x5f\x6a\x46\x33\x99\xf8\x63\x3d\xb1\x03\xe4\x62\x18\x12\xf9\x44\x3d\x3e\x52\x1c\x76\x51\xa3\x2a\x68\x69\x2a\xc3\xc6\x55\x51\x3d\x51\x88\xf2\x67\x0a\xed\x56\x34\xa5\xb7\xa4\x36\x58\x5a\x75\xa5\x2e\xd5\xe5\xc5\x85\x46\x8f\x0b\x63\x0d\x6f\x14\x6f\x3c\xc5\xe9\x05\xb4\xc6\x93\x7e\xc7\x50\x9c\x5c\x33\xa3\x5e\x97\x54\x71\x32\x00\x28\x28\x98\x27\x2a\xd4\x32\xb8\x72\xba\xcf\xe1\x8b\x73\x7c\xb1\x1f\x6b\xe6\x4a\x5f\x33\xbd\x06\x28\x59\xfa\xe0\x3c\x85\xb4\xd6\x7a\x02\x54\x58\x52\xf7\x5f\x4e\x92\xf0\xa7\x10\x39\x98\x6a\xd5\x2f\x06\xfa\xaf\x36\x81\x8a\x29\x2c\xd1\x46\xea\x1c\xeb\x52\x69\x5f\xc7\x6d\x67\x53\x31\xad\x28\x1c\xf1\x06\xd0\xc2\x2d\x07\x14\xf3\x01\x04\xc0\x47\x58\x05\x42\xa6\xa0\x5c\x50\xe2\x8a\x76\x0a\x57\x79\x5f\x8e\x93\x3b\xca\x22\x55\x7a\xb3\x13\xb4\x46\x8b\xe1\x63\x2d\x69\x9b\xf4\x46\x6f\x19\xc5\xe5\xe4\x0a\x7e\xfb\xfd\x47\xb6\x2a\x4c\xfc\x2a\x5a\xf8\xb1\x4b\xde\x20\x8e\xb4\xff\xa6\x21\xc0\x9f\x37\xd9\xa4\xa4\xf2\x7d\x8e\xdf\xaf\x47\xdd\xea\x51\x74\x59\xb1\x60\x51\x18\xa9\xcc\xac\xe3\x03\xa8\x9f\xaa\xc2\x3b\xf3\xba\x7a\x49\x96\xbb\x32\x97\x15\x76\xda\xd9\xd1\x52\xe7\x50\x3f\x73\x24\xed\x00\x6b\xcb\xb2\xaa\x7d\x07\xe8\x02\x6f\x83\x3d\xc8\xda\x2d\x2d\x8f\x50\x1e\x49\xd7\x61\x27\x6f\x0b\xe7\x2c\x61\x75\x34\x5d\x7d\x28\xc3\xe5\x3a\x58\xe5\x91\xd7\x27\x15\x72\xba\x89\x3a\xbd\x0d\x10\x7f\x73\xe1\xeb\xe9\x00\x83\x2b\x3d\x7c\xb9\xfb\xfb\xfa\xf1\x53\xde\x68\x1a\x30\xb2\x0b\xe7\xc2\x46\x57\x07\x3d\x42\xf0\x4f\x68\x4d\xa1\xe4\xb7\x16\xdd\xc0\x3f\xd9\xef\x03\x30\x86\x15\xf1\x07\xf0\x44\x01\xfe\x1d\xb0\xb6\xd3\xfb\x4a\xf4\xa7\xd7\x5b\x69\x2a\x65\xa9\x5a\x49\x1a\xfb\x8e\x07\x20\xaf\x45\xd8\xa8\xa8\xd7\x54\xe2\xd0\xfe\x59\x71\x73\x4f\xba\xd9\x40\x16\x62\x16\x52\x4d\x3d\xb0\xf1\x0a\x8b\x22\x50\xdc\x89\x34\x73\xf8\xf3\xb2\x9b\x5c\x17\x12\xd4\xc8\xe2\xeb\x9c\x1a\xeb\x5f\x60\xb6\xc6\x6a\x45\xd0\xad\x66\xd5\x4b\x52\x0b\xa3\x53\x52\x05\xa2\xa9\x31\x48\x80\x60\x38\x76\xf9\x02\xb7\x1c\x30\xb6\x5b\xc9\xe3\xca\xe7\xb9\x62\x87\x75\x7c\x90\xfb\xdc\xe0\x1a\xe3\x23\x9c\xdc\x22\xe3\x02\xe3\xd8\xa7\xb7\xa7\xe5\x08\xec\x43\xbd\xb0\x46\x9f\xc2\xf5\x2e\x45\x3d\xfb\xbc\xa6\x9e\xd6\x61\xa1\x26\xf2\xeb\xd8\xee\x2f\x4d\x88\x0c\xbe\x39\xbe\x33\x82\xa5\xab\xab\xe2\xf5\x15\xfe\x5c\xc9\x7f\xdd\xfc\x71\x37\x1b\xcd\xfb\x0b\xf3\xa5\x75\xc8\x82\x3a\x1d\xc0\x46\x1d\x8c\xe7\x66\x0a\xfb\x75\x00\x90\xd5\x44\x51\x6e\x82\xdc\x5c\x27\x5f\x24\xcb\x1e\xe2\xda\xd5\xb6\x80\x05\x01\x5a\xeb\x92\x6d\xd1\x2a\x0e\xa5\x82\x9d\x6d\xc4\x96\xcf\x83\xbb\x87\x8c\x83\x22\x54\x8c\xd1\x69\xd3\xd8\x7f\x33\xbc\x6e\xb0\x33\x13\x93\xb1\xda\x7b\x59\xf8\x91\x91\x65\x5c\x02\xfa\x2e\xe9\x32\x69\x0c\x44\xdb\x0d\x13\x32\x66\xbe\xa4\xf7\xc5\x95\x1f\xe5\x6c\xd7\xfc\x47\x0b\x5d\xfe\x02\xad\x4c\x94\xf7\xb9\x0d\xef\xf6\x7e\x7e\x5a\x97\xdc\x1b\xd5\x7e\xad\xde\xb7\xd7\x7f\x97\x99\x73\x7f\x44\x5d\x42\x6e\x44\x08\xb8\xb0\x63\x6b\xf2\xde\x15\x87\x10\xd3\xd6\xf9\xd3\xf9\x67\xb9\x70\xa3\xa9\xf9\x46\x52\x54\x9e\xcf\x18\x06\xbd\x36\x4c\x9a\xf7\xb4\xbe\x51\x89\x6e\x4c\x4f\x71\x94\x39\xb7\x7d\x55\x92\x12\x4f\x01\xe8\x3e\x9f\xb6\x7c\xf3\xf2\x2b\x13\x9e\x28\xea\xd8\xdc\x2a\x90\xc7\xcf\xf3\xd9\x35\x04\x31\x80\x59\xff\x3d\x06\x8f\x72\x58\x2a\x7d\x70\x52\xc0\x21\x1b\xa5\xf6\xbd\x6d\x14\x73\x7e\x9a\xee\x70\xe0\xf4\x79\x9a\xad\xc7\xcb\xec\x27\xf9\x4c\x6f\xbd\x91\x9e\x88\x95\xa6\xa3\x5f\x50\x7d\x3f\xe9\xa6\x82\x12\xbf\x9f\xe1\x9d\x17\x8e\x23\x1c\x20\x41\x1e\x6f\x5c\xbd\xcf\x97\xe7\xff\x01\x00\x00\xff\xff\xb0\x3e\x66\xe9\x9d\x0f\x00\x00") +var _capability_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x57\xc1\x6e\xdb\x38\x10\xbd\xe7\x2b\x06\xd8\x6b\x6b\x24\x57\x1f\x16\x48\x9c\x62\x37\x40\x37\x0d\xea\xec\x5e\x16\x0b\x61\x4c\x8d\xac\x41\x28\x92\x1d\x0e\xd3\xba\x5f\xbf\x90\x4c\xd9\x8a\xed\xd4\x8a\x13\x20\x37\x81\x9c\x79\x1a\xbe\x79\x6f\x44\xa9\x8f\x06\x8b\x92\x2a\x76\xac\xec\x5d\x2c\x1e\x49\x22\x7b\x37\x85\xf5\x56\xe4\x26\x58\x2a\x56\xd8\xd8\xe2\xa2\x38\x2f\xce\xcf\xce\x0c\x06\x5c\xb0\x65\x5d\x15\xba\x0a\x14\xa7\x67\xb0\x0e\x9e\x6c\x76\x98\xe2\xe4\x52\x15\x4d\xdd\x90\xd3\x36\x00\xa0\x24\xe1\x47\x2a\x8b\x4a\x7c\x33\x3d\x94\xf0\xd5\x7b\x3d\x3b\x8c\x35\xf3\x4d\x48\x4a\x2f\x01\x6a\x23\x83\xf8\x40\xd2\xae\xad\x33\x01\x1c\x36\xd4\x3f\x03\xb4\xe5\x4f\x21\xaa\xb0\x5b\x6e\x16\x85\xbe\x25\x16\x2a\xa7\x50\xa1\x8d\xd4\x27\xa6\xa6\x30\x21\xc5\xdd\x64\x76\x4a\x4b\x92\x23\xd9\x00\xc6\xbb\xa8\x82\xec\x74\x00\x01\xf0\x11\x96\x42\xa8\x24\x85\x97\x82\xbe\x25\xb4\x53\xb8\xc8\xfb\x26\xa4\xa2\x6a\xf1\xc8\x99\xd5\x5e\xd1\x06\x2d\xca\xc7\xe4\x58\x27\x9b\xa0\xb7\xac\xe2\x7c\x72\x01\x7f\xfc\xf9\x33\x47\x95\x1c\x1f\x8a\xc8\x3f\xf7\xc9\x1b\xd4\xd1\xee\xbf\x69\x09\xf0\xd7\x55\x0e\x69\xa8\x79\x9f\xd7\x1f\xd6\xa3\x59\xeb\x71\x32\xf3\x4e\x91\x1d\xc9\x48\x65\x66\x1d\x3f\x83\xfa\xc9\x95\xc1\xf3\xcb\xfc\x72\x58\xe6\x41\xbc\x7a\xe3\xed\x68\xa9\xab\xa4\x2d\x47\x25\x55\x98\xac\x4e\x41\x4d\xe8\x01\xbd\xe8\x2e\xd8\x9d\x17\xbd\xa6\xea\x08\xe5\x91\x4c\x92\xbd\xbe\x2d\xbc\xb7\x84\xee\x68\xbb\x36\xa5\x0c\x97\x93\xd8\x22\xa0\xd6\x27\x19\xb9\x3d\x49\x71\xfa\x18\x20\xfd\xee\xe5\xe1\x74\x80\xc1\x91\xee\xbe\xde\xfc\x73\x79\xff\x29\x6f\x74\x03\x18\xd5\xcb\x6b\x61\xa3\x4f\x62\x46\x08\xfe\x11\x2d\x97\xc5\x23\xda\x44\x71\x0a\xff\xe6\xbc\x0f\xa0\x28\x4b\xd2\x0f\x10\x88\x04\xfe\x1b\xb0\xb6\x37\xfb\x1a\x0c\xa7\xfb\xad\x61\x57\x58\x72\x4b\xad\xb7\x13\x0f\x80\x9c\xca\xaa\x88\xa6\xa6\x06\x87\xf1\x5b\xc5\xcd\x03\x99\x6e\x03\x55\x85\x17\x49\xb7\xaa\xe7\x50\x60\x59\x0a\xc5\xbd\x4a\x33\x87\xbf\xb6\xdd\xe4\xb2\x6c\xd8\x8d\x34\x5f\x9f\xd4\x45\xff\x06\xb3\x1a\xdd\x92\xa0\x5f\xcd\xaa\x07\x76\x25\x9b\xb6\xa9\xa0\xbe\xf3\x18\xb4\x80\xc0\x1a\xfb\x7e\x81\xaf\x06\x8c\xed\x3b\x79\x9c\x7d\xb6\x8e\x1d\xfa\xf8\x59\xee\xf3\x80\xeb\x82\x8f\x70\x72\x8d\x8a\x0b\x8c\x63\x3f\xbd\x1b\x5a\x8e\xc0\xde\xa5\x85\x65\x73\x0a\xd7\xfb\x14\x6d\xd8\xd7\x9a\x36\xb4\x0e\x8d\xda\x92\x9f\xe2\x7a\xbf\x62\x89\x0a\xa1\x7b\x7d\x1f\x04\x95\x4f\xae\x7c\xb9\xc3\xb7\x4e\xfe\xfb\xea\xf3\xcd\x6c\x34\xef\x4f\xc2\x2b\xeb\x51\xd9\x2d\xa7\x03\xd8\x68\x84\x83\x76\xb7\xb0\xdf\x07\x00\x59\x4d\x14\x41\x6b\xd4\xee\x38\xf9\x20\x59\xf6\x10\x6b\x9f\x6c\x09\x0b\x02\xb4\xd6\xb7\xb1\xe5\x5a\x71\x08\xc1\x7b\xdb\x89\x2d\xbf\x0f\x6e\xee\x32\x0e\x0a\x01\xc6\xe8\x0d\x77\xf1\xdf\x59\xeb\x0e\x3b\x33\x31\x19\xab\xbd\xa7\xc6\x8f\x8a\x9a\xe2\x14\xe8\x47\x20\xe1\xf6\x1a\x88\xb6\xbf\x4c\xb8\xb8\x43\xef\x93\x23\xdf\xd7\x04\xbe\x7b\x46\x0b\x7d\xff\x84\x96\x1c\x95\x64\x5d\xde\xf5\xed\xfc\xb4\x29\x79\xb0\xaa\xc3\x5a\xbd\x5d\x1f\xff\x5d\xee\x9c\x87\x2b\xea\x1b\x72\xc5\xae\xc4\x85\x1d\xeb\xc9\x5b\x5f\x1e\x43\xfc\xcc\xee\xe1\x6d\x10\xdb\xad\xd7\xdf\xf7\xbf\x04\x92\x4e\xa5\xf3\x55\x54\x6a\x5e\xdf\x03\x14\x53\xb3\x92\xd1\x03\xc3\x74\x94\x74\xba\xd0\x53\x12\x4b\x8e\xeb\xef\x54\xab\xed\x53\x00\xfa\x1f\xb2\x9d\xdc\xbc\xfc\x42\x09\xb5\x14\xf5\x6c\xee\x58\xee\xfe\xcb\x7c\x76\x09\xe2\xbd\xc2\x6c\xf3\x87\x07\xf7\xab\xd0\x0d\x13\xf0\x5a\x93\xe4\xa0\xf6\x83\xb0\x1b\x14\x73\x7f\xba\x79\xf3\xcc\xdb\xe7\xed\x6d\x7d\xbc\xcc\x7e\xd1\xcf\xf6\xf6\xc0\x2e\x2a\x3a\x43\x47\xff\xc9\x36\x13\xaa\xbf\x67\x34\xf8\xe3\x15\xd9\x79\xe1\x38\xc2\x33\x24\xa8\x17\x5c\xbe\xcf\xbf\xec\xff\x01\x00\x00\xff\xff\xf7\x7a\xaf\xf5\xef\x0f\x00\x00") func capability_typesBytes() ([]byte, error) { return bindataRead( @@ -110,12 +110,12 @@ func capability_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "capability_types", size: 3997, mode: os.FileMode(511), modTime: time.Unix(1476597229, 0)} + info := bindataFileInfo{name: "capability_types", size: 4079, mode: os.FileMode(511), modTime: time.Unix(1480694932, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _data_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xcc\x55\x4d\x6f\xdb\x30\x0c\xbd\xe7\x57\xf0\x07\x74\x41\x8b\x21\x3b\xf8\x36\xb4\x97\x5e\xb6\x61\xcd\x6d\x18\x04\xcd\x62\x12\x21\xb6\xa4\x91\x74\x86\xfc\xfb\xd1\x1f\x69\xdc\x45\x6d\xdc\x22\x40\x97\x43\x12\x90\x8f\x8f\x7c\x8f\x96\x2c\x91\x4b\x6b\x1c\xae\x7c\xf0\xe2\x63\x60\xb3\x43\x62\xfd\x53\x40\x9f\x62\x5f\xa7\x0a\xcd\xde\xd6\x95\xb9\x31\xd7\xe6\x7a\x36\x73\x56\xac\x91\x7d\x42\x2e\x66\xa0\x9f\x0e\x38\x6f\xa3\x5d\x70\xfe\x3d\x46\xe9\x33\x00\x0e\xb9\x24\x9f\xa4\x63\x5c\x6e\x10\x96\x5f\x1f\x6e\x3f\x03\x29\x04\xee\xb4\x02\x96\x5a\x02\xb6\xaa\x20\xca\x06\x69\x48\xff\xb2\x8c\xc7\x34\x2b\x0b\xf9\x1d\xc2\x8a\x62\x3d\xcb\xb6\xbc\x25\x74\x18\xc4\xdb\xea\xd8\xb8\x2d\x71\xa6\xad\x29\xb2\x23\x0e\xc0\x44\x31\x21\x89\x3f\xa8\x19\x62\x12\xcb\x58\x1d\x23\xda\x52\x0b\x0b\x60\x21\x1f\xd6\xa3\x30\xe1\xef\xc6\x6b\xf7\x02\x56\xb6\x62\x7c\xcc\x48\xdc\x62\xe8\x5c\x9a\x40\xa2\xfe\xdb\xa6\x92\x02\x92\x65\xfe\x13\xc9\x3d\xa5\x39\xcb\xb0\xc5\x3d\x9f\x82\x6a\x9b\x26\x0c\x0a\xa0\xc6\xd1\xde\x70\xb9\xc1\xda\x8e\x59\x9e\x69\xd6\x30\xd2\x1b\x8c\xc9\xee\x6d\xe9\x6b\xbc\x0f\x82\xb4\xbb\xd0\xe6\x58\x2c\x89\x11\xa5\x3d\x1d\xb1\x8d\x6a\xbe\xce\xbb\x22\xd4\x1c\x4d\xc1\xe0\xde\x4e\x92\x55\x1a\x50\x74\xb1\xdb\xf9\x97\xfe\xf7\x3e\xac\xe2\x45\x04\x0f\xbc\x26\xd8\xdc\xb4\xff\x6c\xe5\x00\xf6\xee\x2c\xd4\x3a\x47\xc8\x8c\x99\xe7\xaa\xf2\x2c\xaf\x7f\x7c\x5e\x74\xe5\x5b\x24\xb9\x98\x25\x49\xc9\xa6\xf9\xd1\x21\x27\x98\xf1\x0a\xdf\x6a\x5b\x9a\xc1\xbb\xff\xd0\xe3\x3b\x5c\xe5\x2d\xf6\x7a\x08\xd7\x48\x43\xae\xd4\x17\x81\x90\xd5\xe0\x68\xb4\x0f\x0a\x32\x64\xc3\x5a\xfb\xfd\x80\x9b\x2b\xf8\xb4\x58\x7c\x5c\xc0\xcf\xf3\x5d\x1f\x12\x96\xef\x77\x2f\x3f\x39\xd8\xa3\xbb\x56\xca\xf1\x19\xce\x4a\xee\x65\xeb\xdd\xe4\x9d\xd1\xef\x46\x67\x51\xe9\x8d\x4b\x57\x6d\xf5\x15\xf8\x75\x9d\xd4\x80\xc7\x51\x2c\xad\x51\x4e\x87\x1b\x9c\x9f\xf2\xd6\xe8\x18\x06\x97\x4f\x78\xba\xf0\xa4\x2b\xfd\x05\x35\xcf\x2c\xf1\x00\xe0\xd8\x50\x99\xe9\x3d\x5d\x43\xcf\xf0\x1e\x1a\xfe\x06\x00\x00\xff\xff\x2f\x6c\xda\xd7\xcd\x08\x00\x00") +var _data_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xcc\x95\xcf\x6e\xdb\x30\x0c\xc6\xef\x79\x0a\x3e\x40\x16\xb4\x18\xb2\x83\x6f\x43\x7b\xe9\x65\x1b\xd6\xdc\x86\x42\xe0\x2c\x3a\x11\x22\x4b\x1a\x49\xa7\xc8\xdb\x0f\xfe\x93\xc5\x5d\xd4\xc6\x2d\x02\xb4\xa7\x00\x24\xf5\x91\xdf\x4f\x16\xa3\x51\x4a\x34\x96\x2a\x17\x9c\xba\x18\xc4\xec\x88\xc5\xc5\x50\x40\x9f\x12\x57\x27\x4f\x66\x8f\xb5\x37\xd7\xe6\xca\x5c\xcd\x66\x16\x15\x8d\xee\x13\x49\x31\x03\x80\xbe\x70\xd1\x46\xbb\xe0\xe2\x67\x8c\xda\x67\x00\x2c\x49\xc9\x2e\x69\xa7\xb8\xda\x10\xac\xbe\xdf\xdf\x7c\x05\x8e\x51\xe1\x16\x15\x61\xb5\x4f\x04\xe8\x3d\x44\xdd\x10\x0f\xe9\xdf\x28\x74\x4c\x0b\x58\x62\xb7\x23\xa8\x38\xd6\xb3\x6c\xcb\x1b\x26\x4b\x41\x1d\xfa\x63\xe3\xf6\x88\x35\xed\x99\x22\x3b\xe2\x50\x98\x38\x26\x62\x75\x07\x37\x43\x4c\x63\x19\xfd\x31\x02\xd0\x1e\x2c\x40\x94\x5d\x58\x8f\xc2\x4c\x7f\x1a\xc7\x64\x0b\xa8\xd0\x0b\xfd\xcb\x68\xdc\x52\xe8\x28\x4d\x10\xb1\x54\x61\xe3\xb5\x80\x84\x22\x8f\x91\xed\x53\x99\xb3\x0a\x5b\xda\xcb\x69\x51\x8d\x69\xc2\xa0\x00\x14\x94\xf7\x46\xca\x0d\xd5\x38\x56\x79\xa6\x59\x23\xc4\x6f\x00\x93\xbd\xb7\x95\xab\xe9\x2e\x28\xf1\xee\x42\x37\x27\x8a\xac\x46\x5d\x9d\xc1\xde\x46\x45\xb1\xce\x53\x51\x6e\x8e\x50\x28\xd8\xb7\x8b\x64\x9d\x06\xd2\xc7\xc8\xdb\xc5\xb7\xfe\xf7\x2e\x54\xf1\x22\x86\x07\x5d\x13\x30\x37\xed\x7f\xb7\x72\x28\x76\xf6\x6c\x29\x5a\xcb\x24\x42\x99\xef\xca\x3b\xd1\xd7\x7f\x3e\x2f\x52\xf9\x11\x59\x2f\x86\x24\x45\xd6\x69\x3c\xba\xca\x09\x30\x5e\xc1\xad\xc6\xd2\x0c\xec\x3e\x20\xe3\x5b\xaa\xf2\x88\x5d\x50\x5a\x13\x0f\xb9\x32\x06\x51\x46\x17\x74\x34\xda\x27\x70\xc1\x30\x86\x35\x15\xf0\x0b\xae\xe7\xf0\x65\xb9\xfc\xbc\x84\x87\xf3\x5d\xef\x13\x95\xef\xb7\x97\x9f\x3c\xec\xd1\xae\xd5\x72\xfc\x86\xb3\x96\x7b\xdb\x3b\xf4\xce\x9a\x1d\xfa\x86\xa4\xb5\xde\xd8\x34\x6f\x4f\xcf\xc1\xad\xeb\x04\x0f\xc7\x65\x8d\xbc\x26\x3d\x1d\x6e\x20\x3f\xe5\x5f\xa3\x53\x18\x28\x9f\xe8\x74\xe1\x49\x2b\xfd\x05\x37\xcf\x5c\xe2\xa1\x40\x62\xc3\x65\xa6\xf7\x74\x0f\xbd\xc2\x7b\x78\xf8\x1b\x00\x00\xff\xff\x2f\x6c\xda\xd7\xcd\x08\x00\x00") func data_typesBytes() ([]byte, error) { return bindataRead( @@ -130,12 +130,12 @@ func data_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "data_types", size: 2253, mode: os.FileMode(511), modTime: time.Unix(1476596059, 0)} + info := bindataFileInfo{name: "data_types", size: 2253, mode: os.FileMode(511), modTime: time.Unix(1476627095, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _group_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x64\x8f\xbd\x6e\x04\x21\x0c\x84\x7b\x9e\xc2\x4f\x80\x2e\xed\x75\x51\x8a\x94\x91\x72\xdb\x23\x04\x26\x67\x89\xc5\xc8\x76\x4e\xda\xb7\x0f\xfb\xa7\x2d\x32\x15\x9a\x99\x6f\x00\x63\x4d\x31\x64\x2c\xd4\xc8\x88\x9b\x86\x17\x8a\x8e\xc3\x1d\xf6\x48\x69\xee\x15\xc3\x12\xe7\x1a\xde\xc2\x2d\xdc\x9c\xfb\x11\xfe\xed\xc1\x96\x8e\x7a\x77\x30\xb4\x35\xfd\x66\xab\xff\x66\xb6\xdd\x06\xc8\xa8\x49\xa8\xdb\xb6\x37\x3d\x11\xa6\xaf\xc7\xc7\x3b\x7c\xae\x4d\x98\xc6\x00\xc4\x5a\x81\xed\x89\xf2\x2f\xd2\x41\x0b\xbd\x10\x8a\xf0\x7c\xec\x51\x33\x94\x12\xd3\x79\xf1\xaa\x87\xc5\x96\xa3\xe4\xcb\x19\x0f\x1a\xfc\xf1\x01\x7f\x31\xbe\x71\x46\x5f\xa9\x60\x5a\x52\x45\x7f\x92\xee\x2f\x00\x00\xff\xff\xed\x2a\x99\xb7\x05\x01\x00\x00") +var _group_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x64\x8f\xbb\x6a\xc5\x30\x0c\x86\x77\x3f\x85\x9e\xc0\x9c\xae\x67\x2b\x1d\x3a\x16\x7a\xb2\x1b\x63\xcb\x8d\xc0\xb1\x8c\xa4\x06\xfc\xf6\x25\x37\x32\x54\xe3\xf7\x5f\x24\x19\x6b\x8a\x21\x63\xa1\x46\x46\xdc\x34\xac\x28\x4a\xdc\x9e\x70\x48\x4a\x4b\xaf\x18\x46\x5c\x6a\x78\x0b\x8f\xf0\x70\xee\x47\xf8\xb7\x07\x1b\x1d\xf5\xe9\x00\xe0\x70\xfa\x1d\xab\xff\x66\xb6\x03\x03\x64\xd4\x24\xd4\x6d\xef\x9b\x66\x84\xe9\xeb\xf5\xf1\x0e\x9f\x9b\x13\xa6\xd1\x11\x62\xad\xc0\x36\xa3\xfc\x93\x14\x32\x0a\xad\x08\x45\x78\x39\xfb\xa8\x19\x4a\x89\xe9\x5a\xbc\xcd\xcb\x62\xcb\x51\xf2\x4d\x00\xb6\xdb\xce\x07\xfc\x9d\xf1\x8d\x33\xfa\x4a\x05\xd3\x48\x15\xfd\x95\x74\x7f\x01\x00\x00\xff\xff\xed\x2a\x99\xb7\x05\x01\x00\x00") func group_typesBytes() ([]byte, error) { return bindataRead( @@ -150,12 +150,12 @@ func group_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "group_types", size: 261, mode: os.FileMode(511), modTime: time.Unix(1476598585, 0)} + info := bindataFileInfo{name: "group_types", size: 261, mode: os.FileMode(511), modTime: time.Unix(1476627106, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _interface_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x9c\x93\xcd\x6e\xa4\x4a\x0c\x85\xf7\x3c\x85\x5f\xe0\xa2\xdc\x6d\x76\xa3\xac\x66\x15\x69\xd2\xfb\x92\x9b\x32\x8d\x25\x28\x23\x97\x9b\x88\xb7\x9f\xe2\xaf\x87\x26\x44\x53\x9a\x5d\x37\x3e\xfe\xce\xc1\x36\x26\xb1\x42\xe7\xa9\xe6\xc0\xc6\x12\xa2\x1b\x48\x63\xfa\xf1\x0a\x4b\x29\x72\xd7\xb7\xe4\x46\xec\x5a\xf7\xbf\x7b\x71\x2f\x45\xc1\xc1\x48\x6b\xac\xc8\xd9\xd8\x53\x7c\x2d\x60\xd1\x96\x8f\x42\x2c\x7f\x89\xd8\x54\x00\xf0\xa4\x3c\x90\x77\xb5\x4a\xb7\x42\x4b\x0a\xc6\x36\xce\xa2\x55\x13\x2b\xe5\xde\x66\xdf\x4b\x43\x70\x79\xff\x78\xfb\x01\x9a\xea\xf0\x73\x83\xc2\x25\xb9\x01\xb6\x2d\x88\x35\xa4\xab\xe6\x8a\x91\x0e\x9a\xb8\x7a\xc2\x64\x59\x9c\xa5\x0b\xe2\xa9\x6c\xb9\xa6\x6a\xac\x5a\x2a\x3f\x0c\x83\x47\xf5\xdf\x07\x3e\xbc\xd9\xac\xab\x94\xd0\x68\xe9\x39\xbc\xc2\x06\x84\x87\xc7\xaa\x06\xe9\x49\x71\x12\x95\x0b\x43\x42\xcd\xb7\xbb\xe6\x63\xb6\x86\x23\x29\x1a\xaa\xe5\x52\x66\xf1\x57\x82\xf4\xf9\x00\xe9\x8f\xfd\x9e\x5a\xca\x9f\xc7\xa2\xde\x33\xce\x16\xa5\xd4\xce\xd5\xd8\x70\x5f\xbe\x3d\x0f\x2b\x77\x4f\xbd\x92\x7b\x8c\xcd\x45\xb9\x6b\x75\x9e\xf2\x7d\xcb\x92\x60\x53\xd7\x7f\x7f\x86\x9d\x0e\x0e\x96\x4e\xa0\xe0\x7b\x49\x3e\xe5\x09\x3c\x8d\xf5\x46\xe7\x5b\xf8\x0b\x7c\xe9\x3c\xc2\x25\xda\xbf\x44\x4f\x6d\x59\xd9\x9f\xf1\xd9\xe1\xbf\xe2\x4f\xd3\xa3\xf7\xd9\xcc\x20\xc6\xf5\xb8\x8f\x3a\x7d\xa2\x20\x35\xe0\x06\x9f\x1f\x5c\x89\xc3\x6d\x22\x93\x87\x81\x31\x55\x9f\x2e\xe4\xe1\x9b\x3b\xaa\x9d\xef\xde\x66\xf6\xdd\x07\xf9\x6c\xb8\x6a\x80\x63\xfa\xf7\x09\x38\x20\xb7\x78\x4d\x47\xfc\x5d\x84\x85\xe5\xaa\x06\xc3\x8d\x7c\x76\x8c\xd5\x31\x4a\x47\xe9\x44\xa6\x4f\xc3\x46\x10\x05\x34\x53\xbe\xde\x6d\x0e\xb6\xcb\xba\xf2\x67\xbc\x52\x27\x43\xfe\x12\x17\xf9\xf3\x74\xcb\xe2\x77\x00\x00\x00\xff\xff\xca\x8d\x54\x44\x0e\x06\x00\x00") +var _interface_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x9c\x93\xcd\x6e\xe3\x3a\x0c\x85\xf7\x7e\x0a\xbe\xc0\x35\x7a\xb7\xdd\x0d\xba\x9a\x55\x81\x69\xf6\x02\x63\xd1\x31\x01\x59\x14\x28\xc6\x85\xdf\x7e\xe0\xbf\x8c\xe3\xba\x18\x61\xb6\xd1\xe1\x77\x3e\x53\x91\x49\x6e\xd0\x79\x6a\x39\xb2\xb1\xc4\xec\x06\xd2\xcc\x12\x5f\x61\x39\xca\xdc\xa7\x40\x6e\xc4\x3e\xb8\xff\xdd\x8b\x7b\xa9\x2a\x8e\x46\xda\x62\x43\xce\xc6\x44\xf9\xb5\x82\x25\x5b\x3f\x0e\x72\xfd\x4b\xc4\xa6\x03\x00\x4f\xca\x03\x79\xd7\xaa\xf4\x2b\xb4\xa6\x68\x6c\xe3\x1c\x5a\x33\xb9\x51\x4e\x36\xf7\x5e\x3a\x82\xcb\xfb\xc7\xdb\x0f\x50\x11\x83\x9f\x1b\x14\x2e\x63\x22\xc0\x10\x40\xac\x23\x5d\x33\x57\xcc\x74\xc8\xe4\xb5\x13\xa6\xca\xea\xcc\x2e\x8a\xa7\x3a\x70\x4b\xcd\xd8\x04\xaa\x3f\x0c\xa3\x47\xf5\xdf\x0b\x1f\xbe\x6c\xce\x35\x4a\x68\xb4\xcc\x1c\x3e\x61\x03\xc2\xa3\x63\x4d\x83\x24\x52\x9c\x42\xf5\xc2\x90\xd8\xf2\xed\xae\xe5\x98\x6d\xe0\x48\xca\x86\x6a\xa5\x94\x39\xfc\x95\x20\xa9\x1c\x20\xe9\x38\xef\x29\x50\xf9\x3e\x96\xf4\x9e\x71\x76\x51\x4a\x61\x3e\xcd\x1d\xa7\xfa\xed\x79\x59\xa5\xf7\x94\x94\xdc\x63\x6d\x2e\xcb\x5d\x9b\x73\xcb\xf7\xcd\x05\x4c\xa6\xa9\xff\xfe\x2c\xdb\x3a\x82\x65\x12\x28\xfa\x24\x1c\xad\x3e\x81\x1b\xea\x8d\xce\x6f\xe1\x2f\xf0\x65\xf2\x08\x97\x6c\xff\xa2\x2e\xd9\x8a\xdc\x9f\xf1\xc5\xf2\x5f\xf1\xa7\xf6\xe8\x7d\x31\x33\x8a\x71\x3b\xee\x55\xa7\x27\x0a\xd2\x02\x6e\xf0\xf9\x87\x2b\x71\xbc\x4d\x64\xf2\x30\x30\x02\xc2\xd3\x3f\xe4\xd1\x5b\xba\xaa\x5d\xef\xbe\x66\xee\xdd\x8b\x7c\x76\xdc\x74\xc0\x19\xa2\x7c\x02\x0e\xc8\x01\xaf\x81\xbe\x55\x58\x58\xae\xe9\x30\xde\xc8\x17\x6b\xac\x8d\x59\x7a\x82\xa4\xd3\xd3\xb0\x11\x44\x01\xcd\x94\xaf\x77\x9b\xc5\x76\xae\x2b\x7f\xc6\x2b\xf5\x32\x94\x5f\xe2\x12\x7f\xde\x6e\x5d\xfd\x0e\x00\x00\xff\xff\xca\x8d\x54\x44\x0e\x06\x00\x00") func interface_typesBytes() ([]byte, error) { return bindataRead( @@ -170,12 +170,12 @@ func interface_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "interface_types", size: 1550, mode: os.FileMode(511), modTime: time.Unix(1476597686, 0)} + info := bindataFileInfo{name: "interface_types", size: 1550, mode: os.FileMode(511), modTime: time.Unix(1476627117, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _node_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xcc\x58\xcd\x6e\xe3\x36\x10\xbe\xe7\x29\x08\xec\xa5\x05\x36\x42\x16\xe8\xc9\xb7\x38\xde\xb6\x0b\x74\xe3\x60\x9d\x45\x0f\x8b\x85\x40\x93\x94\xcd\x2e\x45\xaa\x24\x95\xc4\x3d\xf5\x35\xfa\x7a\x7d\x92\x0e\x29\x8a\xd6\x9f\x2d\xd9\xd9\x04\xf5\x25\x8a\x34\x7f\x9c\xf9\xbe\xe1\x90\x56\x19\x82\x53\xca\x32\x2e\xb9\xe5\x4a\x9a\xf4\x81\x69\x03\x0f\x33\x54\x7d\x32\x3c\x2f\x04\x4b\x77\x38\x17\xe9\xbb\xf4\x2a\xbd\xba\xb8\x90\x8a\xb2\xd4\xee\x0a\x66\x66\x17\xa8\x12\x4b\xdc\x3b\x93\xac\xac\xd2\x78\xc3\x92\xb9\x50\xe4\x5b\xf8\xc7\xc9\x20\x44\x99\xe6\x0f\x8c\xa6\x99\x56\xf9\xac\xa5\xf3\x49\x29\xeb\x45\x0a\xad\x0a\xa6\x2d\xaf\xcc\xba\x9f\xe1\x7f\xb1\xfa\x19\x1c\x81\xc7\x19\x02\x45\x81\xf5\x65\x09\xe1\x26\xee\x7b\xfc\x4c\x20\x78\xab\x31\x97\xd6\xec\x75\x10\xba\x44\x1b\xcd\xb0\x65\x3a\x55\x3a\x65\x7f\x96\x58\xcc\xd0\x3b\xf4\x71\x1e\x44\x1e\x94\x28\x73\x96\x72\xda\xf3\x63\x35\x97\x9b\xf8\x52\x83\x2a\xd7\x8c\xce\x50\x86\x85\xa9\xbd\x1a\x89\x0b\xb3\x55\xf6\x3c\x7d\x82\x0b\xbc\xe6\x82\x37\x97\x8c\xad\xc5\x64\x9b\x33\x69\xbb\x06\xab\x9c\x35\x75\x92\xeb\x28\x7c\xd1\x29\xc4\x8d\xca\x8b\xd2\x4e\xcf\x3d\xb8\xd5\x7c\x0d\x1a\x31\x90\x02\x74\x20\x6d\x29\xa6\x54\x33\x63\x8e\x2e\xaf\x28\xd7\x82\x93\x49\xa2\x92\xd9\x47\xa5\xbf\xf5\x84\x72\x5c\xc4\x37\xb0\x1e\xbd\x4b\x0d\xd9\xb2\x1c\x37\x4b\xd9\xcc\x03\xc5\x16\x7b\x08\x26\xc1\x62\x72\x5b\xfd\xfd\x20\x33\x55\x87\xa5\xb4\x7d\x01\x47\x77\x60\x36\x7a\x09\x75\x75\x35\x88\xae\x2e\x11\xc0\x1f\x8b\xd4\x34\x09\x50\xfd\x62\xf9\x76\x63\x05\xdd\xeb\xb8\x52\xb5\xcb\xd6\xa4\x57\x43\x50\x33\x81\x3d\x87\xb7\xbc\xa8\x15\x9a\xef\x6a\xfb\xcc\xdc\xab\x86\x9a\x22\xa4\xd4\x9a\x49\x02\xc5\x47\x5f\xae\xde\xa2\xcf\xb7\xf3\xe5\xe7\xdb\xc5\xfb\xc5\xd7\x83\x30\xdd\x2a\x33\x05\xa0\x37\x4a\x5a\x60\x24\xd3\x51\xf4\x01\x0b\x4e\x53\xa3\x4a\x4d\xea\x1e\x82\xbe\xb4\x5a\x88\xca\xec\x23\xd6\xcc\x21\x58\x49\xc8\xc4\xd7\x8b\xba\x58\xb4\x50\x7c\x12\x2f\xde\x07\xd1\xe4\x9a\xe6\x5c\x06\x79\xd5\x83\xc2\x80\xe6\x12\x3a\x10\xe4\x4b\x6e\x56\x3b\x63\x59\x5e\xd3\xdc\xf5\x9c\xb5\xe8\xf5\xa2\x01\x03\xab\x20\x1a\x24\xd7\x5c\x52\xb0\x36\x41\xb1\x46\xd7\x1c\x34\xbc\x81\x1e\xa3\x43\x2a\x93\xeb\xa2\x00\xb6\xf9\xaa\x4e\xe6\xf7\x30\x4c\xdb\x55\x1c\x45\x67\xbf\x9a\x43\xe0\xdc\x07\xfa\xa9\x94\x96\xe7\xa7\x21\xf4\x57\x08\x89\xd1\xa5\x8c\x31\x9e\x4e\xa2\x36\x31\x2e\xeb\x96\x73\x82\x05\xc0\xcf\x9d\xc3\xcf\xe1\x1a\x84\xa5\x8d\xe5\xbf\x07\xe6\xef\x4d\xa8\x73\x90\xd9\x59\xd4\x02\x1a\xdc\x1a\x9b\xe7\xec\xd3\x12\xe7\xfd\x7d\xba\xbd\xff\x81\x05\xa2\x79\x61\xab\xc9\x62\xcb\xa0\x45\x6e\x00\xc4\xc2\xeb\x22\x95\xf9\x77\x34\x84\xd2\xe8\xdf\x5d\xb3\x50\x15\xb6\x69\x20\xb0\x67\xd7\x29\xf9\x87\x52\xc2\x5a\xc4\x0e\x82\x88\x76\x91\x61\xfa\x81\x13\x86\x1e\xb9\x10\x48\x70\x80\x9a\x84\x35\xa2\x4c\x69\x2f\x13\xac\x96\x20\x76\xea\x72\x94\x7f\x86\xf5\x38\x65\x84\x09\x51\x80\x90\x6a\x71\xce\xfa\x62\x8e\xb0\xeb\x45\xdc\x8d\x28\x4e\x72\x64\xb0\x28\xb0\x31\x00\xda\xb1\xa9\xe2\x70\x18\xb5\x01\xef\xdd\x7d\x81\x08\x9a\xa1\x1d\xf5\xff\x8a\xdd\x62\x31\xff\xb8\x3a\xbf\x41\x0c\x31\xa9\x2e\x76\x7a\xce\x86\x51\x93\xa1\x47\x12\x08\xf3\x3c\xb2\xf7\xd9\xa2\x81\x48\xe9\xc4\x02\x0f\xa3\xe3\x58\xe1\x9d\xf5\xa1\xea\x7f\x5c\xd5\xe8\x3f\x81\x5d\x93\xdd\x47\xd6\x35\x1d\x1d\xa2\x19\xc2\x92\x7a\xd3\xcc\x58\xf3\x4a\x23\xc6\x60\xcb\x43\x5f\xbb\x75\xfe\x4d\x61\x3a\x87\x3e\x09\xc3\x90\x7e\x46\x43\xc4\x62\xa3\x34\xb7\xdb\xfc\xcc\xf2\x1a\x98\x39\x4b\x08\x9b\x3d\x81\x61\xee\x78\x88\xc5\xc1\x44\x11\xc1\xa7\x1d\x17\x22\xca\xef\xfc\xbc\x1e\x15\xc6\x06\xc0\xc1\x8a\xff\x2c\x94\x1f\x94\xd0\x0f\x1f\xee\x7e\x0c\x31\xfc\xfb\xf7\x3f\x06\x29\x59\x21\xc2\xfb\xa8\x37\x5f\x08\x5c\xba\x13\x9a\x64\x04\x70\x72\x6c\x74\xc6\xdd\xe9\x26\x2c\x72\x74\xc7\xf6\x4b\x3b\xa9\x95\x7c\x52\xee\xc0\x73\xd2\x2c\x3c\x90\x8c\x9b\x6a\x55\x5c\x79\x8c\x03\xf1\x11\xc0\x3c\x57\xda\x6d\x71\x98\xa2\x75\x85\x26\xda\x5c\x98\xe9\xc2\xae\x3e\x37\x2f\xd7\x7f\x80\xa9\xe7\x1f\x9c\x47\x37\xe4\x97\x3a\x59\x5f\xa1\x5f\xea\x93\x75\x8e\x9f\x5e\xdc\xcb\x10\x1d\xc2\xc0\x78\x4e\xfb\xef\x96\xc5\x65\xf8\x70\x15\x00\xb7\x00\xc7\x7d\x19\x5a\xa8\xb8\x07\x0a\xdc\x2f\x57\x37\xd7\xe8\x16\x4c\xa1\x7b\x70\x0d\x5d\x41\x20\x05\xdc\xd0\xe1\x8b\x6f\x41\xf1\xb3\x09\x4e\x90\xf3\x71\xe0\x50\x5e\x5d\xc9\x8c\x5c\x36\x54\x42\xe3\x10\x80\x1e\x73\x4c\x62\x28\xb7\x19\x54\xa2\xd4\x53\xa6\x4d\xb7\xac\x23\x2c\xa7\xac\x80\xfa\x00\xcf\x76\x27\x90\x3c\xda\xac\x7e\xfd\x61\x22\x96\xa2\xfa\x8d\x77\x80\x85\x0f\xc3\x2c\xe5\xc1\x16\x80\x9a\x3d\x00\x55\x4d\xc0\xed\x92\x3a\xc3\x64\x9f\x97\x95\x85\x2d\x0d\xf7\x77\xf3\xca\xe7\x5e\xde\xc7\x99\x08\x9e\x31\xb2\x23\x82\x25\xb5\x5e\xaf\x1f\x74\x47\x89\x67\xf4\x82\x37\x88\xaa\x1c\x68\x75\x69\x0a\x46\x78\x06\x3d\xd9\x04\xeb\x40\xb9\x60\x1e\x85\x4b\xbf\x7a\x47\xa9\xdf\xc7\xcb\xc0\xce\xba\xda\xe2\x87\xf6\x31\x3f\xf1\xa6\x04\xde\x3b\xaa\x00\x71\x07\xb3\xb3\xbf\x60\xb9\x89\x92\xff\x97\xe9\x34\x5c\xa3\x9d\x37\xa0\x76\x6a\xfa\x3b\x5b\x9f\x73\x72\xef\x17\x14\x1a\xa5\x65\x4f\x36\xd5\xb1\x3b\xed\x53\x3a\xc2\x5f\xd8\x83\xce\xea\x8b\xaf\x9c\x76\x48\xd5\x0a\x46\xc8\x96\xd4\xb3\x12\x5f\x59\xfb\x7e\xa7\xf5\x37\xe8\xae\xba\x1e\x7d\x8b\x04\xde\x41\x43\xff\x29\x5e\x4f\x99\xc6\x31\x64\x9f\xeb\x09\x33\x4b\xc5\x96\x49\x1a\xad\x7b\xad\x17\x9c\x93\xdb\x90\x85\xee\xf7\x5f\x00\x00\x00\xff\xff\xee\xe2\x99\x7f\x2e\x18\x00\x00") +var _node_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x59\xcd\x8e\xdb\x38\x0c\xbe\xcf\x53\x08\xe8\x65\x17\xe8\x04\x53\xa0\xd8\x43\x6e\x93\x49\x77\xb7\x40\xe7\x07\xcd\x14\x3d\x14\x03\x83\x91\x98\x44\x5b\x59\x74\x25\x3a\xd3\xec\x69\x5f\x63\x5f\x6f\x9f\x64\x21\xff\xc5\x89\x9d\xd8\x71\x3a\xed\xa5\x19\x9b\xa4\x28\xf2\xfb\x28\x8a\x66\xf2\x12\x22\x85\x0b\x6d\x35\x6b\xb2\x3e\x5a\xa3\xf3\x9a\xec\x58\xe4\xaf\xbc\x8e\x13\x83\xd1\x06\x62\x13\xbd\x89\xae\xa2\xab\x8b\x0b\x4b\x0a\x23\xde\x24\xe8\xc7\x17\x22\x17\x1b\x85\x67\x7e\x34\x63\x72\xb0\xc4\xd1\xc4\x90\xfc\x5a\xfc\x11\x64\x84\x50\xe8\xf4\x1a\x55\xb4\x70\x14\x8f\x77\x74\x3e\x12\x71\x26\x92\x38\x4a\xd0\xb1\xce\xcd\x86\x7f\x5e\xff\x8d\xe5\x6f\x21\xc2\x8a\x63\xe1\x25\x18\x70\x97\xa9\xd5\x3c\x0a\xef\xab\xd7\x92\xac\x67\x07\xda\xb2\xdf\xea\x08\x71\x29\x96\x0e\x81\xd1\x45\xe4\x22\xfc\x96\x82\x19\x8b\x37\xe2\x76\x52\x88\xac\xc9\xa4\x31\x46\x5a\x35\xd6\x61\xa7\xed\xb2\x7a\xe8\xf0\x5b\xaa\x1d\xaa\xb1\x58\x80\xf1\xe5\xaa\xde\x42\xe2\x57\xc4\xc3\xf4\x25\x24\x30\xd7\x46\xd7\xb7\x0c\xcc\x20\x57\x31\x5a\xde\x37\x98\xc7\xac\xae\x33\xba\xae\x84\x2f\xf6\x12\x71\x43\x71\x92\x72\xff\xd8\x03\xb3\xd3\xf3\x94\xb7\x8e\x24\x4e\xaf\x81\x31\x02\xa5\x1c\x7a\x7f\x74\x7b\x49\x3a\x37\x5a\xf6\x12\xb5\xc8\xcf\xe4\xbe\x36\x84\x62\x48\xaa\x27\x68\xd9\x6d\x22\x2f\x57\x18\x43\x3d\x95\xf5\x38\x28\x60\xc8\x20\x38\x2a\x2c\x8e\xee\xf2\xff\xdf\xdb\x05\x95\x6e\x91\xe3\x17\x58\xe8\x81\x1c\x57\xab\x14\x79\x0d\x39\xa8\x96\xba\x14\x86\x24\x98\xc8\xd7\x09\x50\x80\xb4\x4c\xdf\xa6\x2b\xa1\x5b\x9d\x90\xaa\xdd\xb4\xd5\xe9\x55\x13\x74\x68\x20\xe3\xf0\x4a\x27\xa5\x42\xfd\x59\x69\x1f\xfd\x23\xd5\xd4\x48\xca\xd4\x39\xb4\x12\xfd\x58\x7c\xb9\x7a\x2d\x3e\xdd\x4d\xee\x3f\xdd\x4d\xdf\x4d\x9f\x0e\xc2\x74\x45\xbe\x0f\x40\x6f\xc8\x32\x68\x8b\xae\x12\x5d\x83\xd1\x2a\xf2\x94\x3a\x59\xd6\x10\xf1\x65\xa7\x84\xd0\x82\x9f\xc1\x61\x40\x30\x59\xb4\xfc\x74\x51\x26\x4b\x25\xa4\x7b\xf1\xe2\x5d\x21\x3a\xba\x56\xb1\xb6\x85\x3c\x35\xa0\xd0\xa2\x79\x9f\xa0\x03\xd6\x76\x39\xdb\x78\xc6\xb8\xa4\x79\xa8\x39\x73\xd3\xa8\x45\x2d\x06\x66\x85\x68\x21\x39\xd7\x56\x69\xbb\xec\xa1\x58\xa2\x6b\xa2\xad\xca\x0c\x34\x18\x5d\x84\x72\x74\x9d\x24\x46\xcb\x2c\xab\xbd\xf9\xdd\x0e\xd3\xdd\x2c\x76\xa2\xb3\x99\xcd\x36\x70\x6e\x1d\xfd\x98\x5a\xd6\xf1\x69\x08\xfd\x93\x3c\xa3\xba\xb7\x95\x8f\xa7\x93\x68\x97\x18\x97\x65\xc9\x39\xc1\xc2\x3b\xab\x1e\x02\x7e\x0e\xe7\xa0\xd8\x5a\x57\xfc\x1b\x60\xfe\xd1\x84\x1a\x82\xcc\xbd\x4d\x4d\x81\x61\x0e\xfe\x9c\x73\xda\x42\xdc\x3c\xa7\x77\xcf\x3f\x85\x5e\x3a\x9d\x70\xde\x59\xac\x50\x18\x5a\x6a\x09\x26\xd3\x15\xb4\xc8\x9e\xa9\xc2\x95\x5a\xfd\xde\x37\xab\x2d\xe3\xb2\x86\xc0\x86\xdd\xa0\x94\xfd\x48\xad\x42\x67\x36\xda\x2e\x2b\xbb\xc2\xa3\x5b\x6b\x89\xe2\x59\x1b\x23\x8c\xf6\x8c\x56\x30\x89\x05\xb9\x4c\xa6\xb0\x9a\x7a\x74\xa7\x6e\x87\xb2\xdf\x60\x32\x65\x01\x52\x52\x6a\x39\xdf\x5c\xb0\x3e\x9d\x08\x08\xb5\x48\x87\x16\x25\x48\x76\x34\x16\x09\x78\xff\x4c\xae\xab\xab\x38\xec\x46\x69\x20\x5b\x3d\xbc\x99\x4e\x76\x5c\x3b\xba\xfe\x4f\xac\x16\xd3\xc9\xed\x6c\x78\x81\x68\x63\x52\x99\xec\x68\xc8\x81\x51\x92\xa1\x41\x92\xc9\xed\x6c\x18\xd9\x9b\x6c\x71\x44\x1c\xf5\x4c\x70\x3b\x3a\x8e\x25\x3e\x58\x6f\xcb\xfe\xed\xac\x44\xff\x09\xec\xea\xbd\x7c\xc5\xba\xfa\x42\x87\x68\x26\xc0\xaa\xcc\x34\x7a\xf6\x3f\xa9\xc5\x68\x2d\x79\xe2\x69\x3f\xcf\x1f\x08\xd4\x04\x0c\x58\x59\x96\x80\x41\x05\x11\xcc\x92\x9c\xe6\x55\x3c\x30\xbd\x9e\x81\x53\x3f\x16\xf8\x3d\x41\xa7\x03\x0f\xc1\x1c\x0c\x94\x34\xba\xdf\x75\xa1\x42\xf9\x43\xd6\xaf\x57\x0a\x5d\x0d\x60\x6b\xc6\x7f\x37\x94\x35\x4a\xe2\x97\xf7\x0f\xbf\x16\x3e\xfc\xf7\xcf\xbf\x5e\x90\xcd\x11\x91\xad\x51\x1e\xbe\x42\x82\x0d\x37\x34\x8b\x92\x05\x1f\x6b\x9d\x61\xbf\xbb\xe9\x55\x6c\xca\xad\x9d\x54\x4a\x3e\x52\xb8\xf0\x9c\xd4\x0b\xb7\x04\xe3\x26\xdf\x95\xa6\x0c\xe3\x64\x51\x90\x13\x31\xb9\x70\xc4\x81\x12\xf3\x1c\x4d\xaa\xbe\x31\xbf\x0f\xbb\xbd\x3b\xcc\x19\xc8\xd3\x49\x75\x81\x1f\xcc\xed\x05\xa4\x86\xc7\xe2\x6d\xf7\xd5\x3a\xa7\xda\x1a\x4c\x9a\x93\xec\xed\x6b\xf1\x9b\x28\x23\x25\xb5\xea\x3a\x46\x0f\xdc\xaa\x19\x1c\x47\x3a\x19\xa4\x8c\x56\x0d\x55\x5d\x02\xe3\x33\x6c\x86\xaa\x17\x49\x8c\x7a\x74\x43\xc7\x0d\x0c\x1d\x46\xe0\x32\xab\x14\x01\x61\x43\x6d\x94\x2e\x64\x2a\x43\x0c\x24\xab\x8d\x0f\x7d\x5d\xd4\xe8\xba\xcf\x1a\x8b\x18\x6d\x1b\xa6\x8e\x5c\xa2\x3e\x68\xfb\xb5\xad\xd7\xad\x5f\xe1\xcf\x23\x59\x9f\x59\xc7\xa1\x18\x91\x53\xcd\x06\xf3\x30\x3d\xd9\xa5\x2d\xec\xbc\xea\x66\x67\x73\xf0\x55\x2a\x69\x1f\x95\x86\xf6\xdc\x98\x13\x19\x84\xae\xf6\xb4\xe6\x47\xfd\xb1\x4e\x22\x07\x76\x89\x51\xc6\xe0\x41\xb1\xa9\x4c\xa0\x1d\x82\xe0\x96\x33\xe5\x72\x0f\x3c\x1d\x27\x49\x03\x42\xdb\xe5\xba\xce\x93\xba\x6a\x75\xac\x5c\x36\x67\x00\x3d\x3d\xa8\x26\x01\xa7\x7b\x10\x54\x83\x07\x07\xc6\xb3\xf7\xf3\xbf\x50\xf2\xf9\xf3\xd9\xce\x4a\xf7\x52\x03\xdc\x2b\xf1\x47\x39\xc0\x8d\xe1\xfb\x8b\xaf\xd2\x56\x91\x8a\xb9\xc4\x90\x5b\xc6\x7e\x5a\x42\x84\x0f\x67\x01\x2d\x6b\xde\x6c\xd3\xb0\xd3\x7c\x3c\xae\x50\x3c\xde\xcf\x6e\xae\xc5\x1d\x29\x14\x8f\x9b\x04\x05\x18\x23\x88\x57\xe8\x8a\x37\x59\xa7\x5b\xbd\xf6\xc5\x22\x22\xac\x91\x19\x6c\xce\x7e\xf3\xc9\x7f\xc7\x11\x92\x0b\x75\x43\x80\x81\x8f\x49\xb4\xc5\x76\x81\xc0\xa9\xeb\x33\xd4\x08\xdb\x3a\xd2\x4c\x2a\x4c\xd0\x2a\xb4\x72\x73\x42\x2f\x59\xd9\x2c\x40\xde\xb8\xb3\x56\xa9\xe8\x4b\xcb\x69\xe6\x86\xbf\xb7\x07\x3b\x4d\x51\x6f\x35\x8b\x0e\x2a\x9c\x08\x6e\x01\x72\x1b\x97\x19\x83\x55\xd0\xbc\x34\xe6\x6b\x6e\xe5\x33\x3f\x47\x46\x2f\x50\x6e\xa4\xc1\x51\xa9\xd7\xa8\x07\xfb\x37\xd6\x33\x6a\xc1\x2b\xa1\x28\x06\x6d\x2f\x7d\x82\x52\x2f\xb4\x14\xbe\xb0\x2e\x64\x69\x5e\x14\xad\x69\xd9\x20\x96\xcf\x0f\xb5\xac\xbb\xe2\x87\x8e\x8c\x6c\xb0\x12\x49\x87\x2a\x50\x05\x4c\x7b\x74\xb6\x73\xfc\x9b\x4a\xf2\xd4\xa3\xe4\xe5\x46\xa6\xd9\xd7\x9a\x93\x30\x55\xcd\x41\xf6\x72\xfa\x19\xe7\x43\x06\xc4\xcd\x84\x4a\xb2\x8c\xdf\x39\x72\x55\x75\xea\xcd\x5f\x48\x92\x41\x75\xf1\x27\x87\xfd\x33\xce\x67\xe8\xd6\x3b\x52\x67\x05\x3e\xb7\xf6\xe3\x86\xc2\xaf\xc4\x43\xfe\x15\xee\xb5\x30\xb0\x41\x27\xde\x56\x5f\x41\x7c\x21\x12\x60\xbd\x8d\x75\x8f\xab\x71\xce\x96\x5e\x1a\x3b\x9f\x4f\x5e\x70\x1c\xb3\x0b\x59\xf1\x74\xf1\x7f\x00\x00\x00\xff\xff\x68\xd7\xc5\x36\x95\x1e\x00\x00") func node_typesBytes() ([]byte, error) { return bindataRead( @@ -190,12 +190,12 @@ func node_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "node_types", size: 6190, mode: os.FileMode(511), modTime: time.Unix(1476598515, 0)} + info := bindataFileInfo{name: "node_types", size: 7829, mode: os.FileMode(511), modTime: time.Unix(1480697558, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _policy_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x92\x41\x6a\xf4\x30\x0c\x85\xf7\x39\x85\x4e\x30\xcc\xbf\xcd\xee\xa7\x07\x68\xe8\xa4\x6b\x63\x6c\x25\x11\x38\x96\x2b\x39\x03\xb9\x7d\x1d\xa7\x65\x0a\x0d\xb4\xcc\xa2\x93\x55\xd0\xf3\x7b\xef\xb3\x70\x66\x75\xd6\x78\x1c\x28\x52\x26\x8e\x6a\xae\x28\x5a\x7e\x5a\xd8\x25\xa5\x39\x05\x34\xab\x9d\x83\xf9\x67\xce\xe6\xdc\x34\x89\x03\xb9\xd5\xe4\x35\xa1\xb6\x0d\x94\xaf\x1e\x3d\xd5\x39\xa1\x9e\x5e\x98\xf3\x2e\x00\x78\x54\x27\x94\x72\x8d\xec\x27\x84\xfe\xf9\xf2\xf4\x1f\xba\x9a\x01\x7d\xc9\x00\x1b\x02\x70\x9e\x50\xbe\x6b\x5a\xfc\x42\x57\x84\x41\x78\x6e\x8e\xba\xba\x60\x1d\xce\x18\xbf\x14\x6e\x06\x6f\x36\x47\x7b\x44\xf6\x7b\xb0\xdb\x5a\x20\x4f\x36\x03\x29\x2c\x8a\xbe\x84\xc2\xc8\x65\x4f\x11\xd2\x67\x3b\xf0\xf0\x11\x10\xb9\x24\x03\x0b\x8c\xc2\x4b\xd2\x4d\xa8\xa3\xd3\x21\xfe\xc5\xd9\x40\x71\x7c\x08\xbc\xee\xdd\xf7\xa2\xbf\x26\x6f\x33\x3e\x84\x7c\xa9\xd5\xf7\x82\x77\x28\x03\xcb\x6c\xa3\xfb\x63\x7a\x8f\x2e\x58\x41\x48\x37\x00\x10\x7c\x5b\x48\xea\x1b\x52\x28\xd3\x1f\x6f\xf4\x1e\x00\x00\xff\xff\x8b\xf6\x26\x41\xb2\x03\x00\x00") +var _policy_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x92\x41\x6a\xf3\x30\x10\x85\xf7\x3e\xc5\x3b\x41\xc8\xbf\xcd\xee\xa7\x07\x68\x68\xd2\xb5\x10\xd2\x38\x19\x90\x35\xea\x8c\x6c\xf0\xed\x8b\xe5\x96\x14\x6a\x68\xc9\xa2\xd9\xce\xd3\xbc\xef\x93\x50\x15\x0b\xde\x45\xea\x39\x73\x65\xc9\xe6\x26\x52\x63\xc9\x07\xac\x91\xf1\x50\x12\xb9\xd9\x0f\xc9\xfd\x73\x7b\xb7\xef\xba\x22\x89\xc3\xec\xea\x5c\xc8\x0e\x1d\x80\xf5\xe8\xae\xcd\x99\x6c\xf7\x22\x52\xd7\x00\x88\x64\x41\xb9\xd4\x56\x79\xbe\x12\xce\xcf\xa7\xa7\xff\x38\xb6\x0e\x9c\xe7\x42\xf0\x29\x41\xea\x95\xf4\x7b\x66\x88\xa4\x3c\x11\x7a\x95\xa1\xdb\x62\x1d\x93\x0f\x34\x50\xfe\x02\x5c\x16\xa2\x5b\x36\x0e\x5b\x66\xbf\x17\xbb\x3d\x0b\xea\xd5\x57\xb0\x61\x34\x8a\xa8\x82\x8b\x4c\xa4\x19\xe5\x93\x0e\xe9\x3f\x0a\xb2\x44\x32\x88\xe2\xa2\x32\x16\x5b\x82\x36\xda\x6d\xea\x9f\x82\x4f\x9c\x2f\x0f\x91\xb7\x95\x7d\xaf\xfa\x6b\x89\xbe\xd2\x43\xcc\xc7\x86\xbe\x57\xfc\x48\xda\x8b\x0e\x3e\x87\x3f\xb6\x8f\x14\x92\x57\x42\xb9\x09\x40\xe9\x6d\x64\x6d\x7f\xc8\xd0\x8b\xfe\x78\xa3\xf7\x00\x00\x00\xff\xff\x8b\xf6\x26\x41\xb2\x03\x00\x00") func policy_typesBytes() ([]byte, error) { return bindataRead( @@ -210,12 +210,12 @@ func policy_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "policy_types", size: 946, mode: os.FileMode(511), modTime: time.Unix(1476598789, 0)} + info := bindataFileInfo{name: "policy_types", size: 946, mode: os.FileMode(511), modTime: time.Unix(1476627148, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _relationship_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x53\xcd\x6e\xdb\x30\x0c\xbe\xe7\x29\xf8\x02\x0b\xda\xab\x6f\x45\x36\x60\xa7\x15\xe8\x72\x1b\x06\x81\x91\xe8\x98\x80\x2c\x69\x14\x13\xa0\x6f\x3f\xda\x4e\xe2\x6e\x99\xb3\xad\x40\x6e\x89\xf9\x91\xdf\x8f\x48\xcd\xd5\xa3\x0b\xd4\x72\x62\xe5\x9c\xaa\x3b\x92\x54\xfb\xd1\xc0\x54\xaa\xdc\x97\x48\xee\x15\xfb\xe8\x1e\xdd\x83\x7b\x58\xad\x84\x22\x8e\xd8\x8e\x8b\xd3\xd7\x42\xb5\x59\xc1\x04\x5f\xbf\xad\xd5\xf5\x93\x2a\xfa\x8e\xea\x36\x0f\x08\x80\x40\xc2\x47\x0a\xae\x95\xdc\x37\x7f\xec\x78\xc9\x59\x47\xe8\x11\x23\x07\xa7\x28\x7b\xd2\x13\x09\x7c\x3b\xb5\x78\x2c\xb8\xe3\x68\x82\xe9\xcc\xd1\x53\x52\xf8\x3e\x76\x16\xc9\x85\x64\xa8\x4d\xa4\x00\x31\xfb\x91\xe2\xfc\xdf\xc4\xda\xc0\x06\xaa\x0a\xa7\xfd\xe5\xa3\x37\x11\x2a\xc8\x49\xeb\x8c\x04\xf8\x00\x3d\x27\x17\x29\xed\xb5\x6b\xe0\xf1\x54\x09\x74\x64\x4f\x7f\x99\x28\xf4\xe3\xc0\x42\xa1\x81\x16\x63\xa5\xd5\x42\x4c\x9b\x9c\x12\x79\xbd\x6b\x4c\x9f\x52\x28\x99\x6f\x84\xe4\x4d\xa7\x85\xc8\x18\x7f\x37\x35\x4d\x0b\xa8\x38\x12\xac\x37\x17\xe4\xff\x1a\xfd\x48\x85\x52\xa8\xcf\xe9\x7e\x3e\xbf\xe4\x40\xe6\x71\x41\xc0\xe7\x5c\x95\xc2\x3d\xf9\xed\x2d\xd5\x56\x88\x64\x59\xc4\x30\xf4\x2c\xa0\x7a\xe1\x32\xee\x26\x6c\x3b\x82\xed\xf3\xd7\xcd\x13\x88\x01\xe0\xe5\x4d\x0f\x6c\x8d\x11\x30\x46\xc8\xda\xd9\xe8\x09\xb6\xc3\x4a\xd7\xb0\x7a\xb2\x05\x83\xab\x91\x05\xd5\xb6\x72\x77\xd0\xf9\xad\xa7\xd3\xe6\x70\x73\x7d\x27\x50\xc2\xfe\xd6\x96\xdb\x46\x91\xb4\xe8\xe7\xd9\x16\x40\xcb\xfb\x83\x5c\x75\x4d\x51\xcc\x0d\xbf\xa4\xb2\xbe\xb4\x2d\xa7\x36\x38\xf8\xf7\x13\x99\x8f\xea\xdd\x87\xf2\x33\x00\x00\xff\xff\xbd\xb7\xed\x14\x1d\x05\x00\x00") +var _relationship_types = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x54\x4d\x6f\x13\x41\x0c\xbd\xe7\x57\xf8\x0f\x10\xb5\xd7\xbd\x95\x80\xc4\x01\x51\xa9\xe4\x86\xaa\x91\x33\xe3\x24\x56\x67\xed\xc1\xe3\x04\xe5\xdf\xa3\xdd\xcd\x17\x94\x2c\x04\x29\x3d\xee\xfa\x3d\x3f\xbf\x37\xb2\x5d\x6b\xc4\x90\x68\xc9\xc2\xce\x2a\x35\x6c\xc9\x2a\xab\x34\x30\x94\x2a\xb7\x25\x53\xd8\x61\x9b\xc3\x7d\xb8\x0b\x77\x93\x89\x51\xc6\x1e\xbb\xe6\x12\x7c\x57\xa8\x36\x13\x18\xe0\xd3\xf3\x5a\x9d\x3e\xb8\x63\x5c\x53\x9d\x6b\x87\x00\x48\x64\xbc\xa5\x14\x96\xa6\x6d\xf3\x47\xc6\x93\xaa\xf7\xd0\x2d\x66\x4e\xc1\xd1\x56\xe4\x7b\x11\xf8\xb6\xa7\x44\x2c\xb8\xe0\xcc\xce\x74\xd0\x68\x49\x1c\x9e\x7b\x66\x31\x2d\x64\x5d\x6d\x10\x05\xc8\x1a\x7b\x89\xc3\x37\x40\xd7\xb0\x81\xea\xc6\xb2\x3a\xfe\x8c\x2a\xd5\x0d\x59\xbc\x9e\x90\x00\xef\xa0\x65\x09\x99\x64\xe5\xeb\x06\xee\xf7\x95\x44\x5b\x8e\xf4\x97\x8e\x46\xdf\x37\x6c\x94\x1a\x58\x62\xae\x34\xb9\x10\xd3\x4c\x45\x28\xfa\x4d\x63\xfa\x28\xa9\x28\x8f\x84\x14\x8d\x12\x89\x33\xe6\xdf\x4d\x0d\xdd\x12\x3a\xf6\x02\xd3\xd9\x11\x79\xad\xd1\x0f\x54\x48\x52\x7d\x94\xdb\xf9\xfc\xa2\x89\xe0\xf9\xd2\x00\x9f\xb4\x3a\xa5\x5b\xea\xcf\x54\x1c\x59\xc8\x2e\x0f\x21\xe4\x3f\xd4\x5e\xa6\xef\x59\xd2\x15\x6f\x7e\x0c\xef\xba\x81\xce\xd5\x70\x91\x47\xc2\x39\x20\x3f\xb3\xbc\xbc\xdd\x5c\x9d\xda\xf8\x5c\xdd\x23\x1c\x86\xa9\xd1\xb8\xf4\xbb\x0c\xf3\x35\xc1\xfc\xf1\xeb\xec\x01\x4c\xd5\xe1\xe9\x8c\x03\xf3\x5d\x21\xc0\x9c\x41\x7d\x4d\xb6\x87\x2d\xb0\xd2\x6b\x58\xdd\x5b\x84\xce\x61\xaf\x82\xee\xc6\x8b\x8d\x9f\x76\x63\x38\x85\x9c\x46\xd7\x7d\x00\x09\xb6\x63\x57\x81\xc5\xc9\x96\x18\x4f\xbd\x67\x2a\x4b\x5e\x6d\xec\x15\x6b\x88\xe2\x44\xf8\x25\x95\xe9\x91\x76\x39\xb5\xce\xc1\xbf\x3f\xe3\xe9\x08\xfd\xf7\x61\xf9\x19\x00\x00\xff\xff\xf9\x61\xcf\xc6\x4d\x06\x00\x00") func relationship_typesBytes() ([]byte, error) { return bindataRead( @@ -230,7 +230,7 @@ func relationship_types() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "relationship_types", size: 1309, mode: os.FileMode(511), modTime: time.Unix(1476597491, 0)} + info := bindataFileInfo{name: "relationship_types", size: 1613, mode: os.FileMode(511), modTime: time.Unix(1480697573, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/relationships.go b/relationships.go index 376ea15..d338103 100644 --- a/relationships.go +++ b/relationships.go @@ -76,7 +76,10 @@ func (r *RelationshipTemplate) extendFrom(relType RelationshipType) { if len(r.Interfaces) == 0 { r.Interfaces = make(map[string]InterfaceDefinition) } - if _, ok := r.Interfaces[k]; !ok { + if intf, ok := r.Interfaces[k]; ok { + intf.merge(v) + r.Interfaces[k] = intf + } else { r.Interfaces[k] = v } } diff --git a/requirements.go b/requirements.go index 4e8bddd..61d00b3 100644 --- a/requirements.go +++ b/requirements.go @@ -16,8 +16,6 @@ limitations under the License. package toscalib -import "github.com/kenjones-cisco/mergo" - // RequirementRelationshipType defines the Relationship type of a Requirement Definition type RequirementRelationshipType struct { Type string `yaml:"type" json:"type"` @@ -165,7 +163,15 @@ func (r *RequirementAssignment) extendFrom(rd RequirementDefinition) { r.Relationship.Type = rd.Relationship.Type } - base := rd.Relationship.Interfaces - _ = mergo.MergeWithOverwrite(&base, r.Relationship.Interfaces) - r.Relationship.Interfaces = base + for k, v := range rd.Relationship.Interfaces { + if len(r.Relationship.Interfaces) == 0 { + r.Relationship.Interfaces = make(map[string]InterfaceDefinition) + } + if intf, ok := r.Relationship.Interfaces[k]; ok { + intf.merge(v) + r.Relationship.Interfaces[k] = intf + } else { + r.Relationship.Interfaces[k] = v + } + } } diff --git a/scripts/add_dep.sh b/scripts/add_dep.sh deleted file mode 100755 index 518ba0f..0000000 --- a/scripts/add_dep.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -if [ -z "$DEP" ]; then - echo "No dependency provided. Expected: DEP=" - exit 1 -fi -glide get ${DEP} diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000..1089fde --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,92 @@ +#!/bin/bash + +set -eu + +find_mgr() { + if hash minishift 2>/dev/null; then + echo "minishift" + else + if hash docker-machine 2>/dev/null; then + echo "docker-machine" + fi + fi +} + +get_vm_name() { + case "$1" in + minishift) + echo "minishift" + ;; + docker-machine) + echo "${DOCKER_MACHINE_NAME}" + ;; + *) + ;; + esac +} + +is_vm_running() { + local vm=$1 + declare -a running=($(VBoxManage list runningvms | awk '{ print $1 }')) + local result='false' + + for rvm in "${running[@]}"; do + if [[ "${rvm}" == *"${vm}"* ]]; then + result='true' + fi + done + echo "$result" +} + +if hash cygpath 2>/dev/null; then + PROJECT_DIR=$(cygpath -w -a "$(pwd)") +else + PROJECT_DIR=$(pwd) +fi + +VM_MGR=$(find_mgr) +if [[ -z $VM_MGR ]]; then + echo "ERROR: No VM Manager found; expected one of ['minishift', 'docker-machine']" + exit 1 +fi + +VM_NAME=$(get_vm_name "$VM_MGR") +if [[ -z $VM_NAME ]]; then + echo "ERROR: No VM found; try running 'eval $(docker-machine env)'" + exit 1 +fi + +if ! hash VBoxManage 2>/dev/null; then + echo "VirtualBox executable 'VBoxManage' not found in path" + exit 1 +fi + +avail=$(is_vm_running "$VM_NAME") +if [[ "$avail" == *"true"* ]]; then + res=$(VBoxManage sharedfolder add "${VM_NAME}" --name "${PROJECT}" --hostpath "${PROJECT_DIR}" --transient 2>&1) + if [[ -z $res || $res == *"already exists"* ]]; then + # no need to show that it already exists + : + else + echo "$res" + exit 1 + fi + echo "VM: [${VM_NAME}] -- Added Sharedfolder [${PROJECT}] @Path [${PROJECT_DIR}]" +else + echo "$VM_NAME is not currently running; please start your VM and try again." + exit 1 +fi + +SSH_CMD="sudo mkdir -p /${PROJECT} ; sudo mount -t vboxsf ${PROJECT} /${PROJECT}" +case "${VM_MGR}" in + minishift) + minishift ssh "${SSH_CMD}" + echo "VM: [${VM_NAME}] -- Mounted Sharedfolder [${PROJECT}] @VM Path [/${PROJECT}]" + ;; + docker-machine) + docker-machine ssh "${VM_NAME}" "${SSH_CMD}" + echo "VM: [${VM_NAME}] -- Mounted Sharedfolder [${PROJECT}] @VM Path [/${PROJECT}]" + ;; + *) + ;; +esac diff --git a/service_template_test.go b/service_template_test.go index 8f599ae..fd9308e 100644 --- a/service_template_test.go +++ b/service_template_test.go @@ -306,6 +306,72 @@ func TestParseVerifyNTInterfaces(t *testing.T) { } } +func TestParseVerifyRTInterfaces(t *testing.T) { + fname := "./tests/tosca_custom_relationship.yaml" + var s ServiceTemplateDefinition + o, err := os.Open(fname) + if err != nil { + t.Fatal(err) + } + err = s.Parse(o) + if err != nil { + t.Log("Error in processing", fname) + t.Fatal(err) + } + + want := map[string]map[string]string{ + "my_custom_database_connection": map[string]string{ + "pre_configure_source": "scripts/wp_db_configure.sh", + "pre_configure_target": "", + "post_configure_source": "", + "post_configure_target": "", + "add_target": "", + "add_source": "", + "target_changed": "", + "remove_target": "", + }, + "my_custom_glsb_connection": map[string]string{ + "pre_configure_source": "", + "pre_configure_target": "", + "post_configure_source": "scripts/my_script.sh", + "post_configure_target": "", + "add_target": "", + "add_source": "", + "target_changed": "", + "remove_target": "", + }, + } + + for k, v := range want { + tmpl, found := s.TopologyTemplate.RelationshipTemplates[k] + if !found { + t.Log(k, "RelationshipTemplate not found in TopologyTemplate") + t.Fail() + continue + } + + cfgIntf, ok := tmpl.Interfaces["Configure"] + if !ok { + t.Log(k, "template missing Configure interface") + t.Fail() + continue + } + + for opname, impl := range v { + op, ok := cfgIntf.Operations[opname] + if !ok { + t.Log(k, "--", opname, "operation missing from Configure interface") + t.Fail() + continue + } + if op.Implementation != impl { + t.Log(k, "--", opname, "operation has the wrong implementation: got", op.Implementation, "wanted:", impl) + t.Fail() + } + } + } +} + func TestParseBadImportsSimple(t *testing.T) { fname := "./tests/invalids/test_bad_import_format.yaml" var s ServiceTemplateDefinition @@ -452,6 +518,8 @@ func TestMerge(t *testing.T) { "tosca.nodes.Database": 1, "tosca.nodes.DBMS": 0, "tosca.nodes.LoadBalancer": 1, + "tosca.nodes.network.Network": 0, + "tosca.nodes.network.Port": 2, "tosca.nodes.Storage.ObjectStorage": 0, "tosca.nodes.Root": 1, "tosca.nodes.SoftwareComponent": 1, diff --git a/tests/custom_types/custom_rel_types.yaml b/tests/custom_types/custom_rel_types.yaml new file mode 100644 index 0000000..4da1d6c --- /dev/null +++ b/tests/custom_types/custom_rel_types.yaml @@ -0,0 +1,17 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: GSLB to Web relationship type definition + +relationship_types: + my.relationships.ConnectsToWebUI: + derived_from: tosca.relationships.ConnectsTo + properties: + target_ip: + type: string + interfaces: + Configure: + post_configure_source: + inputs: + target_ip: + type: string + implementation: scripts/my_script.sh diff --git a/tests/tosca_custom_relationship.yaml b/tests/tosca_custom_relationship.yaml index 32d5202..6db6374 100644 --- a/tests/tosca_custom_relationship.yaml +++ b/tests/tosca_custom_relationship.yaml @@ -2,6 +2,9 @@ tosca_definitions_version: tosca_simple_yaml_1_0 description: Template for deploying a two-tier application on two servers. +imports: + - tests/custom_types/custom_rel_types.yaml + topology_template: inputs: # omitted here for brevity @@ -26,7 +29,16 @@ topology_template: relationship_templates: my_custom_database_connection: - type: ConnectsTo + type: tosca.relationships.ConnectsTo interfaces: Configure: pre_configure_source: scripts/wp_db_configure.sh + my_custom_glsb_connection: + type: my.relationships.ConnectsToWebUI + properties: + target_ip: { get_attribute: [TARGET, private_address] } + interfaces: + Configure: + post_configure_source: + inputs: + target_ip: { get_property: [SELF, target_ip] }