Skip to content

Commit

Permalink
Merge pull request #66 from openBackhaul/develop
Browse files Browse the repository at this point in the history
NotificationProxy v1.0.1_spec
  • Loading branch information
openBackhaul authored Dec 14, 2023
2 parents e6e8e36 + 1de4c9c commit 73ea6f3
Show file tree
Hide file tree
Showing 67 changed files with 87,055 additions and 376,173 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
server/logs/
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,15 @@ This includes not just Closed-Loop-Automation applications, but also very fundam
- [TestSuite](./testing/)
- [Implementation](./server/)

### Configuration
In order to configure the SDN controller login, you have to edit these lines in the .env file of your docker-compose workspace.
There are two basic auth logins for controller notifications resp. device notifications:

CONTROLLER_USER=xxx
CONTROLLER_PASSWORD=xxx

DEVICE_USER=xxx
DEVICE_PASSWORD=xxx

### Comments
This application will be specified during [training for ApplicationOwners](https://gist.github.com/openBackhaul/5aabdbc90257b83b9fe7fc4da059d3cd).
./.
15 changes: 15 additions & 0 deletions server/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
"env": {
"node": true,
"es2021": true
},
"extends": "eslint:recommended",
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
}
}
2 changes: 2 additions & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage
node_modules
1 change: 1 addition & 0 deletions server/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
23 changes: 23 additions & 0 deletions server/.swagger-codegen-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
1 change: 1 addition & 0 deletions server/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.46
36 changes: 36 additions & 0 deletions server/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
IMAGE = np-0.1
CONTAINER = NotificationProxy-0.1
SERVER_PORT = 9092
PORT = 3009
#DOCKER_HOST = linkvis-ci-01

# Build docker image
image:
npm install
docker build -t $(IMAGE) --label com.docker.compose.project="sdn" .

# Stop docker container
stop:
docker stop $(CONTAINER)

# Remove docker container
rm:
docker rm -f $(CONTAINER)

# Remove docker container and image
clean: rm
rm -f package-lock.json
rm -Rf node_modules
docker rmi $(IMAGE)

# Run docker container
run: rm
docker run -d -p $(PORT):$(SERVER_PORT) --restart always --name $(CONTAINER) $(IMAGE)

test: run
npm run test
newman run ../testing/NotificationProxy.postman_collection.json --env-var baseUrl=http://$(DOCKER_HOST):$(PORT)

test-local: run
npm run test
newman run ../testing/NotificationProxy.postman_collection.json --env-var baseUrl=http://localhost:$(PORT)
19 changes: 19 additions & 0 deletions server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Swagger generated server

## Overview
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub.

### Running the server
To run the server, run:

```
npm start
```

To view the Swagger UI interface:

```
open http://localhost:9092/docs
```

This project leverages the mega-awesome [swagger-tools](https://github.com/apigee-127/swagger-tools) middleware which does most all the work.
Loading

0 comments on commit 73ea6f3

Please sign in to comment.