Skip to content

Commit ab3948a

Browse files
authored
Merge pull request #17 from /issues/16
Updates for DERStatus
2 parents 139b84f + 4bf6454 commit ab3948a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
server: WE48687
55
# Only include if we need to have dcap be available
66
# http_port: 8080
7-
https_port: 8443
7+
port: 8090
88

9-
enable_cache: False
9+
proxy_hostname: 0.0.0.0:8443
1010

1111
tls_repository: "~/tls"
1212
openssl_cnf: "openssl.cnf"
@@ -31,6 +31,7 @@ generate_admin_cert: True
3131
log_event_list_poll_rate: 60
3232
device_capability_poll_rate: 60
3333

34+
3435
# Directory containing data files for the platform.
3536
# This directory will be created if it does not exist.
3637
storage_path: data_store

ieee_2030_5/basic_proxy.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def __handle_response__(self, conn: HTTPSConnection):
9090
return response
9191

9292
def do_GET(self):
93-
9493

9594
conn = self.__start_request__()
9695

@@ -113,7 +112,7 @@ def do_POST(self):
113112

114113
response = self.__handle_response__(conn)
115114
_log.info(f"POST {self.path} Content-Length: {self.headers.get('Content-Length')}, Response Status: {response.status}")
116-
115+
117116
def do_DELETE(self):
118117
_log.info(f"DELETE {self.path} Content-Length: {self.headers.get('Content-Length')}")
119118

@@ -128,7 +127,7 @@ def do_DELETE(self):
128127

129128
response = self.__handle_response__(conn)
130129
_log.info(f"DELETE {self.path} Content-Length: {self.headers.get('Content-Length')}, Response Status: {response.status}")
131-
130+
132131
def do_PUT(self):
133132
_log.info(f"PUT {self.path} Content-Length: {self.headers.get('Content-Length')}")
134133

@@ -221,6 +220,9 @@ def _main():
221220

222221
config = ServerConfiguration(**cfg_dict)
223222

223+
if config.proxy_hostname is None:
224+
print("Invalid proxy_hostname in config file.")
225+
224226
tls_repo = TLSRepository(repo_dir=config.tls_repository,
225227
openssl_cnffile_template=config.openssl_cnf,
226228
serverhost=config.server_hostname,

0 commit comments

Comments
 (0)