Could you create a minimal YAML file that demonstrates this problem so we can reproduce it? It could be a bug.
On Fri, Aug 25, 2017 at 2:48 PM, DeWayne Filppi <[email protected]> wrote: > I don't know if this is a clue or not, but I modified the > relationship: aria.openstack.subnet_connected_to_router, in the aria > openstack plugin.yaml to require the 'openstack_config' input for the > Configure.add_target operation (and got rid of the default). Afterwards, > any attempt to validate this: > > subnet: > type: aria.openstack.nodes.Subnet > properties: > resource_id: aria_helloworld_subnet > create_if_missing: true > interfaces: > Standard: > create: > inputs: > openstack_config: { get_input: openstack_config } > requirements: > - router: > node: router > relationship: > type: aria.openstack.subnet_connected_to_router > interfaces: > Configure: > add_target: > inputs: > openstack_config: { get_input: openstack_config } > > Fails with the error : Validation issues: > 4: interface definition "Configure" does not assign a value to a required > operation input "add_target.openstack_config" in "relationship" > > Which is further confirmation that the input isn't seen, and normally the > default gets used (empty strings). I don't see examples anywhere that show > how to properly override the interface inside a relationship inside a > requirement. > > > On Fri, Aug 25, 2017 at 10:57 AM, Tal Liron <[email protected]> wrote: > > > "implementation" is a required field in the TOSCA spec, so you must > specify > > it even if it is the same. > > > > On Fri, Aug 25, 2017 at 12:47 PM, DeWayne Filppi <[email protected]> > > wrote: > > > > > It appears that this issue *was* fixed by repeating the implementation > > key > > > in the add_target block. Intuitively, I would expect that fields I > > didn't > > > override would be untouched, but apparently not. > > > > > > On Thu, Aug 24, 2017 at 4:59 PM, Tal Liron <[email protected]> wrote: > > > > > > > Did you read the wiki? ARIA will send those specially formatted > > > > dependencies as arguments to the @operation function. > > > > > > > > It would help to see your complete example, as I don't know what > you're > > > > doing and not doing anymore. Could you throw it into a GitHub repo > > > perhaps? > > > > > > > > On Thu, Aug 24, 2017 at 6:53 PM, DeWayne Filppi <[email protected] > > > > > > wrote: > > > > > > > > > 'dependencies' is a child of implementation in the spec. I don't > > > think > > > > > it's going to do anything for me anyway. I just want to pass > > > > > openstack_config to the add_target operation as inputs. > > > > > > > > > > On Thu, Aug 24, 2017 at 4:28 PM, Tal Liron <[email protected]> > wrote: > > > > > > > > > > > What is the error? > > > > > > > > > > > > On Thu, Aug 24, 2017 at 6:22 PM, DeWayne Filppi < > > [email protected] > > > > > > > > > > wrote: > > > > > > > > > > > > > actually "dependencies" fails validation. > > > > > > > > > > > > > > On Thu, Aug 24, 2017 at 4:08 PM, Tal Liron <[email protected]> > > > wrote: > > > > > > > > > > > > > > > Oops, sorry, this is the syntax: > > > > > > > > > > > > > > > > interfaces: > > > > > > > > Configure: > > > > > > > > add_target: > > > > > > > > primary: my_script.sh > > > > > > > > dependencies: > > > > > > > > - "openstack_config > { get_input: openstack_config > }" > > > > > > > > > > > > > > > > On Thu, Aug 24, 2017 at 6:00 PM, Tal Liron <[email protected]> > > > > wrote: > > > > > > > > > > > > > > > > > A few syntax problems: > > > > > > > > > > > > > > > > > > 1. It looks like you don't have any operation > implementation, > > > > which > > > > > > is > > > > > > > a > > > > > > > > > required field. (What do you expect the inputs to be sent > > to?) > > > > > > > > > 2. Also, you are not naming the input. It should be > "inputs: > > { > > > > > > > > > my_input_name: { get_input: openstack_config } }" > > > > > > > > > 3. But #2 won't work because you can't just add inputs in > > this > > > > > case, > > > > > > > > > because they are not declared at the interface type. > > > > > > > > > > > > > > > > > > Assuming you do have an implementation, you could you try > > > passing > > > > > it > > > > > > > > using > > > > > > > > > execution configuration: > > > > > > > > > > > > > > > > > > https://cwiki.apache.org/confluence/display/ARIATOSCA/ > > > > > > > > > Execution+Configuration > > > > > > > > > > > > > > > > > > Try something like this: > > > > > > > > > > > > > > > > > > interfaces: > > > > > > > > > Configure: > > > > > > > > > add_target: > > > > > > > > > primary: my_script.sh > > > > > > > > > dependencies: > > > > > > > > > - openstack_config: { get_input: openstack_config } > > > > > > > > > > > > > > > > > > On Thu, Aug 24, 2017 at 5:49 PM, DeWayne Filppi < > > > > > [email protected] > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > >> In the ARIA usage of the plugin, I need to pass > > > openstack_config > > > > > > > > >> explicitly > > > > > > > > >> to every operation. Since the relationships are implicit, > > how > > > > do > > > > > I > > > > > > > > >> accomplish this? Currently I get errors when trying to > > > connect > > > > a > > > > > > > subnet > > > > > > > > >> to > > > > > > > > >> a router. I've tried overriding the relationship like > so: > > > > > > > > >> > > > > > > > > >> subnet: > > > > > > > > >> type: aria.openstack.nodes.Subnet > > > > > > > > >> properties: > > > > > > > > >> resource_id: aria_helloworld_subnet > > > > > > > > >> create_if_missing: true > > > > > > > > >> interfaces: > > > > > > > > >> Standard: > > > > > > > > >> create: > > > > > > > > >> inputs: > > > > > > > > >> openstack_config: { get_input: > > openstack_config > > > } > > > > > > > > >> requirements: > > > > > > > > >> - router: > > > > > > > > >> node: router > > > > > > > > >> relationship: > > > > > > > > >> type: aria.openstack.subnet_ > > connected_to_router > > > > > > > > >> interfaces: > > > > > > > > >> Configure: > > > > > > > > >> add_target: > > > > > > > > >> inputs: { get_input: openstack_config > } > > > > > > > > >> - network: network > > > > > > > > >> > > > > > > > > >> Note the router requirement. Does this syntax look > correct? > > > > > > Spoiler: > > > > > > > > >> openstack_config never makes it to the plugin. > > > > > > > > >> > > > > > > > > >> DeWayne > > > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
