Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

V3.x #86

wants to merge 6 commits into from

Conversation

wasabibob
Copy link

Merging Tile Updates from branch v2.9.x to v3.x. Resolving issue: #82

Tony Wilmer added 5 commits October 24, 2017 15:54
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
Copy link
Contributor

@jdewinne jdewinne left a 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.

@@ -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."/>
Copy link
Contributor

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):
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants