-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V3.x #86
base: master
Are you sure you want to change the base?
Conversation
update to version 2.9.2
* initial changes to support number of days on tile * initial updates to support number of days on tile * changes to support number of days on tile * changes to use Joda-Time library * changes to support TimeDate * DateTime call and numberOfDays tool tip * updated comments
* Changed Tile, set query begin date off end date if provided. * Update synthetic.xml changed numberOfDays to a hidden property. * Update synthetic.xml changed to hidden=true * Changed Tile, default max_days 90, numberOfDays 30 * Changed Tile, default max_days 90, numberOfDays 30 * Changed Tile, default max_days 90, numberOfDays 30 * Changed Tile, maxDays property must have catagory * removed debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes I would make.
src/main/resources/synthetic.xml
Outdated
@@ -309,6 +309,9 @@ | |||
required="true"/> | |||
<property name="date" category="input" required="false" | |||
description="Date in format yyyy-MM-dd. If not provided, latest deployed applications are shown."/> | |||
<property name="maxDays" default="90" category="input" kind="integer" hidden="true"/> | |||
<property name="numberOfDays" category="input" required="false" default="30" kind="integer" | |||
description="The number of days worth of (release version) data to reterive from XL Deploy."/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "reterive" --> "retrieve"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'} | ||
response = self.http_request.get(get_tasks, headers=headers) | ||
check_response(response, "Failed to get archived tasks. Server return [%s], with content [%s]" % ( | ||
response.status, response.response)) | ||
return response.getResponse() | ||
|
||
def get_deployed_applications_for_environment(self, environment, date=None): | ||
archived_tasks = self.query_archived_tasks(date) | ||
def get_deployed_applications_for_environment(self, environment, begin_date, date=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename last argument from date
to end_date
if not xldeployServer: | ||
raise Exception("XL Deploy server ID must be provided") | ||
|
||
#check the range of values for numberOfDays, | ||
if not 1 <= numberOfDays <= maxDays: | ||
numberOfDays = maxDays |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we log something here? So that it's clear in the logs that the data was truncated?
xld_client = XLDeployClientUtil.create_xldeploy_client(xldeployServer, username, password) | ||
if xld_client.check_ci_exist(environment): | ||
if date: | ||
data = xld_client.get_deployed_applications_for_environment(environment, date) | ||
#if date provided, set a begin_date based on provided date - number of days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's now quite some duplication between the two branches... Consider refactoring it.
Merging Tile Updates from branch v2.9.x to v3.x. Resolving issue: #82