-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
303 additions
and
9 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,287 @@ | ||
tosca_definitions_version: tosca_simple_yaml_1_3 | ||
|
||
metadata: | ||
targetNamespace: "radon.blueprints.testing" | ||
topology_template: | ||
node_templates: | ||
AwsLambdaFunction_1: | ||
type: radon.nodes.aws.AwsLambdaFunction | ||
metadata: | ||
x: "893" | ||
y: "113" | ||
displayName: "GetTodoItem" | ||
properties: | ||
handler: "get.handler" | ||
memory: 128 | ||
name: "get-item" | ||
runtime: "nodejs12.x" | ||
alias: "dev" | ||
statement_id: "get-stmt" | ||
zip_file: { get_artifact: [ SELF, get_item ] } | ||
timeout: 300 | ||
env_vars: | ||
TODOS_TABLE: "items" | ||
requirements: | ||
- endpoint: | ||
node: AwsDynamoDBTable_0 | ||
relationship: con_ConnectsTo_1 | ||
capability: database_endpoint | ||
- host: | ||
node: AwsPlatform_0 | ||
relationship: con_HostedOn_3 | ||
capability: host | ||
artifacts: | ||
get_item: | ||
type: radon.artifacts.archive.Zip | ||
file: get.zip | ||
AwsLambdaFunction_2: | ||
type: radon.nodes.aws.AwsLambdaFunction | ||
metadata: | ||
x: "893" | ||
y: "208" | ||
displayName: "CreateTodoItem" | ||
properties: | ||
handler: "create.handler" | ||
memory: 128 | ||
name: "create-item" | ||
runtime: "nodejs12.x" | ||
alias: "dev" | ||
statement_id: "create-stmt" | ||
zip_file: { get_artifact: [ SELF, create_item ] } | ||
timeout: 300 | ||
env_vars: | ||
TODOS_TABLE: "items" | ||
requirements: | ||
- endpoint: | ||
node: AwsDynamoDBTable_0 | ||
relationship: con_ConnectsTo_2 | ||
capability: database_endpoint | ||
- host: | ||
node: AwsPlatform_0 | ||
relationship: con_HostedOn_4 | ||
capability: host | ||
artifacts: | ||
create_item: | ||
type: radon.artifacts.archive.Zip | ||
file: create.zip | ||
AwsDynamoDBTable_0: | ||
type: radon.nodes.aws.AwsDynamoDBTable | ||
metadata: | ||
x: "1514" | ||
y: "301" | ||
displayName: "ItemsTable" | ||
properties: | ||
hash_key_name: "id" | ||
read_capacity: 1 | ||
name: "items" | ||
write_capacity: 1 | ||
hash_key_type: "STRING" | ||
requirements: | ||
- host: | ||
node: AwsPlatform_0 | ||
relationship: con_HostedOn_0 | ||
capability: host | ||
AwsLambdaFunction_0: | ||
type: radon.nodes.aws.AwsLambdaFunction | ||
metadata: | ||
x: "893" | ||
y: "304" | ||
displayName: "ListTodoItem" | ||
properties: | ||
handler: "list.handler" | ||
memory: 128 | ||
name: "list-item" | ||
runtime: "nodejs12.x" | ||
alias: "dev" | ||
statement_id: "list-stmt" | ||
zip_file: { get_artifact: [ SELF, list_items ] } | ||
timeout: 300 | ||
concurrency: 0 | ||
env_vars: | ||
TODOS_TABLE: "items" | ||
requirements: | ||
- endpoint: | ||
node: AwsDynamoDBTable_0 | ||
relationship: con_ConnectsTo_0 | ||
capability: database_endpoint | ||
- host: | ||
node: AwsPlatform_0 | ||
relationship: con_HostedOn_1 | ||
capability: host | ||
artifacts: | ||
list_items: | ||
type: radon.artifacts.archive.Zip | ||
file: list.zip | ||
AwsLambdaFunction_3: | ||
type: radon.nodes.aws.AwsLambdaFunction | ||
metadata: | ||
x: "888" | ||
y: "398" | ||
displayName: "UpdateTodoItem" | ||
properties: | ||
handler: "update.handler" | ||
memory: 128 | ||
name: "update-item" | ||
runtime: "nodejs12.x" | ||
alias: "dev" | ||
statement_id: "update-stmt" | ||
zip_file: { get_artifact: [ SELF, update_item ] } | ||
timeout: 300 | ||
env_vars: | ||
TODOS_TABLE: "items" | ||
requirements: | ||
- endpoint: | ||
node: AwsDynamoDBTable_0 | ||
relationship: con_ConnectsTo_3 | ||
capability: database_endpoint | ||
- host: | ||
node: AwsPlatform_0 | ||
relationship: con_HostedOn_5 | ||
capability: host | ||
artifacts: | ||
update_item: | ||
type: radon.artifacts.archive.Zip | ||
file: update.zip | ||
AwsPlatform_0: | ||
type: radon.nodes.aws.AwsPlatform | ||
metadata: | ||
x: "549" | ||
y: "589" | ||
displayName: "AwsPlatform" | ||
properties: | ||
name: "AWS" | ||
region: "eu-central-1" | ||
AwsLambdaFunction_4: | ||
type: radon.nodes.aws.AwsLambdaFunction | ||
metadata: | ||
x: "888" | ||
y: "499" | ||
displayName: "DeleteTodoItem" | ||
properties: | ||
handler: "delete.handler" | ||
memory: 128 | ||
name: "delete-item" | ||
runtime: "nodejs12.x" | ||
alias: "dev" | ||
statement_id: "delete-stmt" | ||
zip_file: { get_artifact: [ SELF, delete_item ] } | ||
timeout: 300 | ||
env_vars: | ||
TODOS_TABLE: "items" | ||
requirements: | ||
- endpoint: | ||
node: AwsDynamoDBTable_0 | ||
relationship: con_ConnectsTo_4 | ||
capability: database_endpoint | ||
- host: | ||
node: AwsPlatform_0 | ||
relationship: con_HostedOn_6 | ||
capability: host | ||
artifacts: | ||
delete_item: | ||
type: radon.artifacts.archive.Zip | ||
file: delete.zip | ||
AwsApiGateway_0: | ||
type: radon.nodes.aws.AwsApiGateway | ||
metadata: | ||
x: "355" | ||
y: "300" | ||
displayName: "AwsApiGateway" | ||
properties: | ||
name: "ServerlessToDoListAPI" | ||
api_version: "1.0.0" | ||
api_description: "a simple serverless API example" | ||
requirements: | ||
- host: | ||
node: AwsPlatform_0 | ||
relationship: con_HostedOn_2 | ||
capability: host | ||
- invoker: | ||
node: AwsLambdaFunction_0 | ||
relationship: con_AwsApiGatewayTriggers_0 | ||
capability: invocable | ||
- invoker: | ||
node: AwsLambdaFunction_1 | ||
relationship: con_AwsApiGatewayTriggers_1 | ||
capability: invocable | ||
- invoker: | ||
node: AwsLambdaFunction_2 | ||
relationship: con_AwsApiGatewayTriggers_2 | ||
capability: invocable | ||
- invoker: | ||
node: AwsLambdaFunction_3 | ||
relationship: con_AwsApiGatewayTriggers_3 | ||
capability: invocable | ||
- invoker: | ||
node: AwsLambdaFunction_4 | ||
relationship: con_AwsApiGatewayTriggers_4 | ||
capability: invocable | ||
relationship_templates: | ||
con_HostedOn_2: | ||
type: tosca.relationships.HostedOn | ||
con_HostedOn_3: | ||
type: tosca.relationships.HostedOn | ||
con_HostedOn_0: | ||
type: tosca.relationships.HostedOn | ||
con_HostedOn_1: | ||
type: tosca.relationships.HostedOn | ||
con_HostedOn_6: | ||
type: tosca.relationships.HostedOn | ||
con_HostedOn_4: | ||
type: tosca.relationships.HostedOn | ||
con_HostedOn_5: | ||
type: tosca.relationships.HostedOn | ||
con_ConnectsTo_2: | ||
type: radon.relationships.ConnectsTo | ||
con_ConnectsTo_3: | ||
type: radon.relationships.ConnectsTo | ||
con_ConnectsTo_4: | ||
type: radon.relationships.ConnectsTo | ||
con_AwsApiGatewayTriggers_4: | ||
type: radon.relationships.aws.AwsApiGatewayTriggers | ||
properties: | ||
endpoint: "/todos/{id}" | ||
http_methods: "delete" | ||
con_AwsApiGatewayTriggers_3: | ||
type: radon.relationships.aws.AwsApiGatewayTriggers | ||
properties: | ||
endpoint: "/todos/{id}" | ||
http_methods: "put" | ||
con_ConnectsTo_0: | ||
type: radon.relationships.ConnectsTo | ||
con_AwsApiGatewayTriggers_2: | ||
type: radon.relationships.aws.AwsApiGatewayTriggers | ||
properties: | ||
endpoint: "/todos" | ||
http_methods: "post" | ||
con_ConnectsTo_1: | ||
type: radon.relationships.ConnectsTo | ||
con_AwsApiGatewayTriggers_1: | ||
type: radon.relationships.aws.AwsApiGatewayTriggers | ||
properties: | ||
endpoint: "/todos/{id}" | ||
http_methods: "get" | ||
con_AwsApiGatewayTriggers_0: | ||
type: radon.relationships.aws.AwsApiGatewayTriggers | ||
properties: | ||
endpoint: "/todos" | ||
http_methods: "get" | ||
policies: | ||
- exampleTestPolicy: | ||
type: radon.policies.testing.HttpEndpointTest | ||
properties: | ||
path: "/" | ||
hostname: "google.com" | ||
method: "GET" | ||
port: "443" | ||
expected_status: "200" | ||
ti_blueprint: "radon.blueprints.testing.DeploymentTestAgentEC2" | ||
use_https: "true" | ||
test_id: "exampleTest" | ||
targets: [ AwsLambdaFunction_0 ] | ||
outputs: | ||
testing_endpoint: | ||
type: string | ||
description: Endpoint that is used for testing | ||
required: false | ||
default: { concat: [ { get_attribute: [ AwsApiGateway_0, endpoint_url ] }, { get_property: [ con_AwsApiGatewayTriggers_0, endpoint ] } ] } |