-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit - Heat Translator for TOSCA templates
- Loading branch information
1 parent
00501b7
commit d314a03
Showing
16 changed files
with
535 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env ruby | ||
# | ||
# Copyright 2016, SUSE LINUX Products GmbH | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
require File.join(File.expand_path(File.dirname(__FILE__)), "barclamp_lib") | ||
@barclamp = "tosca" | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Cookbook Name:: opendaylight | ||
# Attributes:: default | ||
# | ||
# Copyright 2016, SUSE LINUX Products GmbH | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
default[:tosca][:verbose] = true | ||
default[:tosca][:debug] = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Copyright 2016, SUSE LINUX Products GmbH | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
maintainer "Crowbar Project" | ||
maintainer_email "crowbar@dell.com" | ||
license "Apache 2.0" | ||
description "TOSCA-Template parser and translator to HOT" | ||
long_description "" | ||
version "0.0.1" | ||
|
||
recipe "tosca", "VNF Template parser for TOSCA-template and translator to HOT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# Cookbook Name:: opendaylight | ||
# Recipe:: default | ||
# | ||
# Copyright 2016, SUSE LINUX Products GmbH | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
if node[:platform_family] == "suse" | ||
|
||
package "python-tosca-parser" do | ||
owner "root" | ||
group "root" | ||
mode "0640" | ||
end | ||
|
||
package "openstack-heat-translator" do | ||
owner "root" | ||
group "root" | ||
mode "0640" | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# Copyright 2016, SUSE LINUX GmbH | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
include_recipe "tosca::default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting// | ||
DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> | ||
|
||
<Configure class="org.eclipse.jetty.server.Server"> | ||
|
||
<!-- =========================================================== --> | ||
<!-- Set connectors --> | ||
<!-- =========================================================== --> | ||
<!-- One of each type! --> | ||
<!-- =========================================================== --> | ||
|
||
<!-- Use this connector for many frequently idle connections and for | ||
threadless continuations. --> | ||
<Call name="addConnector"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> | ||
<Set name="host"> | ||
<Property name="jetty.host" /> | ||
</Set> | ||
<Set name="port"> | ||
<Property name="jetty.port" default="8181" /> | ||
</Set> | ||
<Set name="maxIdleTime">300000</Set> | ||
<Set name="Acceptors">2</Set> | ||
<Set name="statsOn">false</Set> | ||
<Set name="confidentialPort">8543</Set> | ||
<Set name="lowResourcesConnections">20000</Set> | ||
<Set name="lowResourcesMaxIdleTime">5000</Set> | ||
</New> | ||
</Arg> | ||
</Call> | ||
<Call name="addConnector"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> | ||
<Set name="host"> | ||
<Property name="jetty.host" /> | ||
</Set> | ||
<Set name="port"> | ||
<Property name="jetty.port" default="<%= @port %>"/> | ||
</Set> | ||
<Set name="maxIdleTime">300000</Set> | ||
<Set name="Acceptors">2</Set> | ||
<Set name="statsOn">false</Set> | ||
<Set name="confidentialPort">8443</Set> | ||
<Set name="lowResourcesConnections">20000</Set> | ||
<Set name="lowResourcesMaxIdleTime">5000</Set> | ||
</New> | ||
</Arg> | ||
</Call> | ||
|
||
<!-- =========================================================== --> | ||
<!-- Configure Authentication Realms --> | ||
<!-- Realms may be configured for the entire server here, or --> | ||
<!-- they can be configured for a specific web app in a context --> | ||
<!-- configuration (see $(jetty.home)/contexts/test.xml for an --> | ||
<!-- example). --> | ||
<!-- =========================================================== --> | ||
<Call name="addBean"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.plus.jaas.JAASLoginService"> | ||
<Set name="name">karaf</Set> | ||
<Set name="loginModuleName">karaf</Set> | ||
<Set name="roleClassNames"> | ||
<Array type="java.lang.String"> | ||
<Item>org.apache.karaf.jaas.boot.principal.RolePrincipal | ||
</Item> | ||
</Array> | ||
</Set> | ||
</New> | ||
</Arg> | ||
</Call> | ||
<Call name="addBean"> | ||
<Arg> | ||
<New class="org.eclipse.jetty.plus.jaas.JAASLoginService"> | ||
<Set name="name">default</Set> | ||
<Set name="loginModuleName">karaf</Set> | ||
<Set name="roleClassNames"> | ||
<Array type="java.lang.String"> | ||
<Item>org.apache.karaf.jaas.boot.principal.RolePrincipal | ||
</Item> | ||
</Array> | ||
</Set> | ||
</New> | ||
</Arg> | ||
</Call> | ||
|
||
</Configure> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"id": "template-tosca", | ||
"description": "TOSCA Templates for Virtual Network Functions", | ||
"attributes": { | ||
"tosca": { | ||
"verbose" : true, | ||
"debug" : true | ||
} | ||
}, | ||
"deployment": { | ||
"tosca": { | ||
"crowbar-revision": 0, | ||
"crowbar-applied": false, | ||
"schema-revision": 100, | ||
"element_states": { | ||
"tosca": [ "readying", "ready", "applying" ] | ||
}, | ||
"elements": {}, | ||
"element_order": [ | ||
[ "tosca" ] | ||
], | ||
"element_run_list_order": { | ||
"tosca": 81 | ||
}, | ||
"config": { | ||
"environment": "tosca-config-base", | ||
"mode": "full", | ||
"transitions": false, | ||
"transition_list": [ | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"type": "map", | ||
"required": true, | ||
"mapping": { | ||
"id": { "type": "str", "required": true, "pattern": "/^tosca-|^template-tosca$/" }, | ||
"description": { "type": "str", "required": true }, | ||
"attributes": { | ||
"type": "map", | ||
"required": true, | ||
"mapping": { | ||
"tosca": { | ||
"type": "map", | ||
"required": true, | ||
"mapping": { | ||
"verbose": { "type": "bool", "required": false }, | ||
"debug": { "type": "bool", "required": false } | ||
} | ||
} | ||
} | ||
}, | ||
"deployment": { | ||
"type": "map", | ||
"required": true, | ||
"mapping": { | ||
"tosca": { | ||
"type": "map", | ||
"required": true, | ||
"mapping": { | ||
"crowbar-revision": { "type": "int", "required": true }, | ||
"schema-revision": { "type": "int" }, | ||
"crowbar-committing": { "type": "bool" }, | ||
"crowbar-applied": { "type": "bool" }, | ||
"crowbar-status": { "type": "str" }, | ||
"crowbar-failed": { "type": "str" }, | ||
"crowbar-queued": { "type": "bool" }, | ||
"element_states": { | ||
"type": "map", | ||
"mapping": { | ||
= : { | ||
"type": "seq", | ||
"required": true, | ||
"sequence": [ { "type": "str" } ] | ||
} | ||
} | ||
}, | ||
"elements": { | ||
"type": "map", | ||
"required": true, | ||
"mapping": { | ||
= : { | ||
"type": "seq", | ||
"required": true, | ||
"sequence": [ { "type": "str" } ] | ||
} | ||
} | ||
}, | ||
"element_order": { | ||
"type": "seq", | ||
"required": true, | ||
"sequence": [ { | ||
"type": "seq", | ||
"sequence": [ { "type": "str" } ] | ||
} ] | ||
}, | ||
"element_run_list_order": { | ||
"type": "map", | ||
"required": false, | ||
"mapping": { | ||
= : { | ||
"type": "int", | ||
"required": true | ||
} | ||
} | ||
}, | ||
"config": { | ||
"type": "map", | ||
"required": true, | ||
"mapping": { | ||
"environment": { "type": "str", "required": true }, | ||
"mode": { "type": "str", "required": true }, | ||
"transitions": { "type": "bool", "required": true }, | ||
"transition_list": { | ||
"type": "seq", | ||
"required": true, | ||
"sequence": [ { "type": "str" } ] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name "tosca-parser" | ||
description "Tosca Role - Node registered as a TOSCA-template parser" | ||
run_list("recipe[tosca::role_tosca_parser]") | ||
default_attributes() | ||
override_attributes() | ||
|
15 changes: 15 additions & 0 deletions
15
crowbar_framework/app/assets/javascripts/barclamps/tosca/application.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Copyright 2016, SUSE LINUX GmbH | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ |
Oops, something went wrong.