Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bitonio committed Jun 7, 2021
2 parents 9c84f5d + 059a8b7 commit 26875c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bin/akamai-etp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ from requests.compat import urljoin
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from config import EdgeGridConfig

__version__ = "0.3.3"
__version__ = "0.3.4"

#: Data collection delay, default is 30 minutes
collection_delay_min = 30
Expand All @@ -62,7 +62,7 @@ session.auth = EdgeGridAuth(
access_token=config.access_token
)

session.headers.update({'User-Agent': "Akamai-CLI etp/%s" % __version__})
session.headers.update({'User-Agent': f"{config.ua_prefix} cli-etp/{__version__}"})
headers = {'content-type': "application/json;charset=UTF-8"}
baseurl = '%s://%s' % ('https', config.host)
extra_qs = None
Expand Down Expand Up @@ -245,7 +245,7 @@ def fetch_events(config, output):
# TODO: add a better/more resilient logic
sleep_time = max(0, poll_interval_sec - (time.time() - timing_s))
if sleep_time == 0:
LOG.WARN("Potential data gaps")
LOG.warn("Potential data gaps")
LOG.info("Sleeping for %.2f sec..." % sleep_time)
stop_event.wait(sleep_time)
start = int(time.time()) - (collection_delay_min * 60) - poll_interval_sec
Expand Down
1 change: 1 addition & 0 deletions bin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def __init__(self, config_values, configuration, flags=None):
help=' Location of the credentials file (default is ~/.edgerc)')
parser.add_argument('--section', '-c', default='default', metavar='credentials_file_section', action='store',
help=' Credentials file Section\'s name to use')
parser.add_argument('--user-agent-prefix', dest='ua_prefix', default='Akamai-CLI', help=argparse.SUPPRESS)

if flags:
for argument in flags.keys():
Expand Down
2 changes: 1 addition & 1 deletion cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"commands": [
{
"name": "etp",
"version": "0.3.3",
"version": "0.3.4",
"description": "Akamai CLI for Enterprise Threat Protector"
}
]
Expand Down

0 comments on commit 26875c5

Please sign in to comment.