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

[WIP] Initial commit - Heat Translator for TOSCA templates #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mmnelemane
Copy link
Contributor

@mmnelemane mmnelemane commented Nov 14, 2016

OASIS specifies a standardized template to specify infrastructure requirements for Virtual Network Functions. The template called TOSCA( Topology and Orchestration Specification for Cloud Applications) is parsed by tosca-parser and the resulting artifacts are passed on to Heat-Translator to generate deployable HOT (Heat Orchestration Templates). This branch adds a barclamp that allows to install and configure TOSCA parser and Heat Translator.

Note: Since these are not integrated with mkcloud, one needs to manually add the following repo on the controller node to get this barclamp to deploy the required packages.
http://download.suse.de/ibs/home:/mmnelemane:/opnfv/Devel_Cloud_7_Mitaka_SLE_12_SP2/home:mmnelemane:opnfv.repo

Attached is a screenshot for deployment through Crowbar-UI.
screenshot_20161116_180301

@logger.debug("tosca create_proposal: exiting")
base
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/EmptyLinesAroundClassBody: Extra empty line detected at class body end.

@logger.debug("tosca create_proposal: exiting")
base
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/EmptyLinesAroundClassBody: Extra empty line detected at class body end.


# Ignore nodes that are being discovered
base["deployment"]["tosca"]["elements"] = {
"updater" => nodes.select { |x| not ["discovering", "discovered"].include?(x.status) }.map { |x| x.name }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Not: Use ! instead of not. (https://github.com/bbatsov/ruby-style-guide#bang-not-not)
Style/SymbolProc: Pass &:name as an argument to map instead of a block.
Metrics/LineLength: Line is too long. 111/100


# Ignore nodes that are being discovered
base["deployment"]["tosca"]["elements"] = {
"updater" => nodes.select { |x| not ["discovering", "discovered"].include?(x.status) }.map { |x| x.name }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/Not: Use ! instead of not. (https://github.com/bbatsov/ruby-style-guide#bang-not-not)
Style/SymbolProc: Pass &:name as an argument to map instead of a block.
Metrics/LineLength: Line is too long. 111/100


nodes = NodeObject.all
# Don't include the admin node by default, you never know...
nodes.delete_if { |n| n.nil? or n.admin? }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/AndOr: Use || instead of or. (https://github.com/bbatsov/ruby-style-guide#no-and-or-or)


nodes = NodeObject.all
# Don't include the admin node by default, you never know...
nodes.delete_if { |n| n.nil? or n.admin? }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/AndOr: Use || instead of or. (https://github.com/bbatsov/ruby-style-guide#no-and-or-or)

@@ -0,0 +1,55 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,55 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,20 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,20 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,23 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,23 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

run_list("recipe[tosca::role_tosca_parser]")
default_attributes()
override_attributes()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingBlankLines: 1 trailing blank lines detected. (https://github.com/bbatsov/ruby-style-guide#newline-eof)

run_list("recipe[tosca::role_tosca_parser]")
default_attributes()
override_attributes()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingBlankLines: 1 trailing blank lines detected. (https://github.com/bbatsov/ruby-style-guide#newline-eof)

description "Tosca Role - Node registered as a TOSCA-template parser"
run_list("recipe[tosca::role_tosca_parser]")
default_attributes()
override_attributes()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/MethodCallParentheses: Do not use parentheses for method calls with no arguments. (https://github.com/bbatsov/ruby-style-guide#no-args-no-parens)

description "Tosca Role - Node registered as a TOSCA-template parser"
run_list("recipe[tosca::role_tosca_parser]")
default_attributes()
override_attributes()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/MethodCallParentheses: Do not use parentheses for method calls with no arguments. (https://github.com/bbatsov/ruby-style-guide#no-args-no-parens)

name "tosca-parser"
description "Tosca Role - Node registered as a TOSCA-template parser"
run_list("recipe[tosca::role_tosca_parser]")
default_attributes()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/MethodCallParentheses: Do not use parentheses for method calls with no arguments. (https://github.com/bbatsov/ruby-style-guide#no-args-no-parens)

name "tosca-parser"
description "Tosca Role - Node registered as a TOSCA-template parser"
run_list("recipe[tosca::role_tosca_parser]")
default_attributes()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/MethodCallParentheses: Do not use parentheses for method calls with no arguments. (https://github.com/bbatsov/ruby-style-guide#no-args-no-parens)

@@ -0,0 +1,6 @@
name "tosca-parser"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,17 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,6 @@
name "tosca-parser"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

mode "0640"
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingBlankLines: 1 trailing blank lines detected. (https://github.com/bbatsov/ruby-style-guide#newline-eof)

@@ -0,0 +1,17 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,34 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

mode "0640"
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingBlankLines: 1 trailing blank lines detected. (https://github.com/bbatsov/ruby-style-guide#newline-eof)

@@ -0,0 +1,24 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,34 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,21 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,24 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,21 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

package "python-tosca-parser"
package "openstack-heat-translator"
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingBlankLines: 1 trailing blank lines detected. (https://github.com/bbatsov/ruby-style-guide#newline-eof)

@@ -0,0 +1,18 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,20 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@@ -0,0 +1,23 @@
#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/FrozenStringLiteralComment: Missing frozen string literal comment.

@mmnelemane mmnelemane changed the title [Untested- Not ready for review] Initial commit - Heat Translator for TOSCA templates [WIP] Initial commit - Heat Translator for TOSCA templates Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants