summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-06-12 22:44:25 +0300
committerEdi Feschiyan <edi.feschiyan@konsulko.com>2020-06-12 22:44:25 +0300
commit8a8b87e65c0b3d579f8ea420e23a9cd07528dfe1 (patch)
treed5ced56f53104781bf156b38dbad7aba48578ca1 /templates
parente2bb2d3ff3f909b9417040de4dd8ea876777a6ee (diff)
Adding cookiecutter, preparing for setuptools, new services
Diffstat (limited to 'templates')
-rw-r--r--templates/service/cookiecutter.json6
-rw-r--r--templates/service/{{cookiecutter.file_name}}.py9
-rw-r--r--templates/test/{{cookiecutter.file_name}}.py0
3 files changed, 15 insertions, 0 deletions
diff --git a/templates/service/cookiecutter.json b/templates/service/cookiecutter.json
new file mode 100644
index 0000000..f37ea1f
--- /dev/null
+++ b/templates/service/cookiecutter.json
@@ -0,0 +1,6 @@
+{
+ "aglsystemdservice": "agl-service-something",
+ "classname": "NewService",
+ "api": "serviceapi",
+ "verblist": ["subscribe", "unsubscribe"]
+} \ No newline at end of file
diff --git a/templates/service/{{cookiecutter.file_name}}.py b/templates/service/{{cookiecutter.file_name}}.py
new file mode 100644
index 0000000..6defd28
--- /dev/null
+++ b/templates/service/{{cookiecutter.file_name}}.py
@@ -0,0 +1,9 @@
+from aglbaseservice import AGLBaseService, AFBResponse
+import asyncio
+import os
+
+class {{cookiecutter.classname}}(AGLBaseService):
+
+ def __init__(self, ip, port=None, service='{{cookiecutter.aglsystemdservice}}'):
+ super().__init__(api='{{cookiecutter.api}}', ip=ip, port=port, service=service)
+
diff --git a/templates/test/{{cookiecutter.file_name}}.py b/templates/test/{{cookiecutter.file_name}}.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/templates/test/{{cookiecutter.file_name}}.py