Skip to content

Commit

Permalink
Added new markings to slycat.web.client and fixed some bugs in dac_ru…
Browse files Browse the repository at this point in the history
…n_charts.py.
  • Loading branch information
smartin71 committed Mar 13, 2023
1 parent ad3e6aa commit e4046d8
Show file tree
Hide file tree
Showing 6 changed files with 793 additions and 757 deletions.
2 changes: 1 addition & 1 deletion web-client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

# development version
# VERSION = VERSION
VERSION = "3.3.1"
VERSION = "3.4.0"

# get README.md
import pathlib
Expand Down
15 changes: 13 additions & 2 deletions web-client/slycat/web/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
# logging
import logging

# url/IP
from urllib.parse import urlparse
import socket

# 3rd party libraries

# http requests & kerberos
Expand Down Expand Up @@ -212,10 +216,17 @@ def __init__(self, host=HOST_DEFAULT, port=None, kerberos=False,
elif not keywords.get("verify"):
verify = False

# resolve host alias
host_alias = urlparse(host)
host_alias = host_alias.netloc
host_ip = socket.gethostbyname(host_alias)
host_name = socket.gethostbyaddr(host_ip)
host_name = host_name[0]

# host and port
self.host = host
self.host = host.replace(host_alias, host_name)
if port:
self.host = host + ':' + port
self.host = self.host + ':' + port

# using kerberos authentication?
self.kerberos = kerberos
Expand Down
2 changes: 1 addition & 1 deletion web-client/slycat/web/client/dac_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def parser():
parser.add_argument("dac_gen_zip", help="DAC generic .zip file.")

# model and project names/descriptions
parser.add_argument("--marking", default="ouo3",
parser.add_argument("--marking", default="cui",
help="Marking type. Default: %(default)s")
parser.add_argument("--model-description", default="",
help="New model description. Default: %(default)s")
Expand Down

0 comments on commit e4046d8

Please sign in to comment.