Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
453fd697
Commit
453fd697
authored
5 years ago
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed typo
parent
88e4ea9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
nodes.yaml
TOSCA/types/nodes.yaml
+3
-3
planner.py
planner/planner/planner.py
+6
-1
No files found.
TOSCA/types/nodes.yaml
View file @
453fd697
...
...
@@ -32,7 +32,7 @@ node_types:
requirements
:
-
host
:
capability
:
tosca.capabilities.ARTICONF.docker.Orchestrator
node
:
osca.nodes.ARTICONF.docker.Orchestrator
node
:
t
osca.nodes.ARTICONF.docker.Orchestrator
relationship
:
tosca.relationships.HostedOn
tosca.nodes.ARTICONF.docker.Orchestrator
:
...
...
@@ -66,7 +66,7 @@ node_types:
tosca.nodes.ARTICONF.docker.Orchestrator.Kubernetes
:
derived_from
:
osca.nodes.ARTICONF.docker.Orchestrator
derived_from
:
t
osca.nodes.ARTICONF.docker.Orchestrator
description
:
Kubernetes orchestrator
attributes
:
tokens
:
...
...
@@ -94,7 +94,7 @@ node_types:
#osca.nodes.ARTICONF.docker.Orchestrator.Swarm:
#derived_from: osca.nodes.ARTICONF.docker.Orchestrator
#derived_from:
t
osca.nodes.ARTICONF.docker.Orchestrator
#description: swarm orchestrator
#interfaces:
#Standard:
...
...
This diff is collapsed.
Click to expand it.
planner/planner/planner.py
View file @
453fd697
...
...
@@ -184,12 +184,16 @@ class Planner:
for
tosca_node_type
in
self
.
all_node_types
:
if
tosca_node_type
.
startswith
(
'tosca.nodes'
)
and
'capabilities'
in
self
.
all_node_types
[
tosca_node_type
]:
logging
.
debug
(
' Node: '
+
str
(
tosca_node_type
))
print
(
' Node: '
+
str
(
tosca_node_type
))
for
caps
in
self
.
all_node_types
[
tosca_node_type
][
'capabilities'
]:
logging
.
debug
(
' '
+
str
(
self
.
all_node_types
[
tosca_node_type
][
'capabilities'
][
caps
][
'type'
])
+
' == '
+
cap
)
print
(
' '
+
str
(
self
.
all_node_types
[
tosca_node_type
][
'capabilities'
][
caps
][
'type'
])
+
' == '
+
cap
)
if
self
.
all_node_types
[
tosca_node_type
][
'capabilities'
][
caps
][
'type'
]
==
cap
:
candidate_nodes
[
tosca_node_type
]
=
self
.
all_node_types
[
tosca_node_type
]
logging
.
debug
(
' candidate_node: '
+
str
(
tosca_node_type
))
print
(
' candidate_node: '
+
str
(
tosca_node_type
))
candidate_child_nodes
=
{}
for
node
in
candidate_nodes
:
...
...
@@ -212,7 +216,6 @@ class Planner:
for
req
in
all_requirements
:
if
'capability'
in
req
[
next
(
iter
(
req
))]:
capability
=
req
[
next
(
iter
(
req
))][
'capability'
]
# Find nodes in node_templates that have the capability
logging
.
info
(
' Looking for nodes in node_templates with capability: '
+
capability
)
capable_nodes
=
self
.
get_node_templates_by_capability
(
capability
)
...
...
@@ -251,6 +254,8 @@ class Planner:
child_nodes
=
{}
for
tosca_node_type
in
self
.
all_node_types
:
if
tosca_node_type
.
startswith
(
'tosca.nodes'
)
and
'derived_from'
in
self
.
all_node_types
[
tosca_node_type
]:
print
(
parent_node_type_name
)
print
(
tosca_node_type
)
if
parent_node_type_name
==
self
.
all_node_types
[
tosca_node_type
][
'derived_from'
]:
child_nodes
[
tosca_node_type
]
=
self
.
all_node_types
[
tosca_node_type
]
return
child_nodes
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment