Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic Validation: requirement node suggested by semantic validation is rejected as valid in following validation #119

Open
jesus-gorronogoitia opened this issue Sep 28, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jesus-gorronogoitia
Copy link

First issue

In snow.aadm, the template snow-mysql shows a wrong node snow/snow-vm for requirement host. When saved in model:
snow.v2.snow_v2.aadm_first_model.ttl.txt

the KB Reasoner reports the error and suggest three valid nodes.

Then, the user select one of those, say snow/[email protected], and tries to save again the model:
snow.v2.snow_v2.aadm_second_model.ttl.txt
,getting an unexpected validation error:

Cannot find Template: snow/[email protected]: Requirement_25

If host requirement node snow/[email protected] was suggested by KB in first validation, it should be valid in second, so last error should not be reported, shouldn't it?

Second issue

Content assistance for first model, suggests for nodes satisfying the host requirement the following ones:

ide
but the versions of snow-vm and test-vm are not of type DockerHost, but Openstack.VM, therefore not satisfying the requirement. Could you please check the API that returns these candidate nodes for a requirement?

@jesus-gorronogoitia jesus-gorronogoitia added the bug Something isn't working label Sep 28, 2021
@zoevas
Copy link
Collaborator

zoevas commented Sep 28, 2021

About the first issue:

:Parameter_132
  rdf:type exchange:Parameter ;
  exchange:name "node" ;
  exchange:value 'snow/[email protected]' ;
  .

in the snow.v2.snow_v2.aadm_second_model.ttl.txt the value is wrong..There is no docker-host with version 1, but it should be snow/[email protected] because the template was saved with snow-docker-host name.

@jesus-gorronogoitia
Copy link
Author

Openstack.VM also provides Compute capability and for that reason KB is suggesting its instances. By defining the capability type:

capability_types:
	sodalite.capabilities.DockerCompute:
		derived_from: tosca.capabilities.Compute

And use it in DockerHost host capability definition:

capabilities:  
	host:  
		type: sodalite.capabilities.DockerCompute
		valid_source_types:[docker/sodalite.nodes.DockerizedComponent] 

and in DockerComponent host requirement defintion:

host:
  capability: sodalite.capabilities.DockerCompute
  node: docker/sodalite.nodes.DockerHost
  relationship: tosca.relationships.HostedOn

This issue does away, as then only DockerHost instances are suggested by the KB where to host DockerComponent instances. The use of tosca.capabilities.Compute is quite generic. Using Compute the KB returns both instances of Openstack.VM and DockerHost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants