Skip to content

Commit e6c8392

Browse files
committed
Delete update environment feature
1 parent 7950310 commit e6c8392

File tree

3 files changed

+1
-68
lines changed

3 files changed

+1
-68
lines changed

src/main/resources/confluence/ConfluenceClient.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -125,40 +125,6 @@ def updatePage(self, spaceKey, pageId, pageTitle, pageText):
125125
self.throw_error(response)
126126
print "Success. Page %s has been updated.\n" % pageId
127127

128-
def updateEnvironmentPage(self, spaceKey, pageTitles, environment, version, application):
129-
print "Executing updateEnvironmentPage() in ConfluenceClient\n"
130-
pageID = self.getPageIdsByTitle(spaceKey, pageTitles)[0]
131-
contentType = "application/json"
132-
headers = {'Accept' : 'application/json'}
133-
pageStr = ''
134-
tmpPageStr = ''
135-
bappend = True
136-
bfound = False
137-
for pageTitle in pageTitles:
138-
searchByPageTitleUrl = '/rest/api/content/' + pageID + '?expand=body.storage'
139-
response = self.httpRequest.get(searchByPageTitleUrl, contentType=contentType, headers=headers, quotePlus=True)
140-
if response.getStatus() not in HTTP_SUCCESS:
141-
self.throw_error(response)
142-
result = json.loads(response.response)
143-
144-
for page in result['body']['storage']['value']:
145-
if bappend:
146-
pageStr = pageStr + page
147-
if environment in pageStr and not bfound:
148-
pageStr = pageStr + '</td><td>'+application+'</td><td>'+version+'</td>'
149-
appendbool = False
150-
bfound = True
151-
152-
if not bappend and "</tr>" in tmpPageStr:
153-
pageStr = pageStr + "</tr>"
154-
appendbool = True
155-
156-
if bfound:
157-
tmpPageStr = tmpPageStr + page
158-
print "********* HTML PAGE > " + pageStr
159-
self.updatePage(spaceKey, pageID, pageTitles[0], pageStr)
160-
161-
162128
def throw_error(self, response):
163129
print "Error from Confluence, HTTP Return: %s\n" % (response.getStatus())
164130
print response.response

src/main/resources/confluence/updateEnvironmentPage.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/main/resources/synthetic.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,7 @@
5353
<property name="newPageText" category="input" />
5454
</type>
5555

56-
<type type="confluence.updateEnvironnementPage" extends="confluence.Task">
57-
<property name="spaceKey" category="input" />
58-
<property name="pageTitle" category="input" kind="string" required="true" />
59-
<property name="environment" category="input" kind="string" required="true" />
60-
<property name="version" category="input" kind="string" required="true"/>
61-
<property name="application" category="input" kind="string" required="true"/>
62-
</type>
63-
64-
<type type="confluence.getHTMLPageByTitle" extends="confluence.Task">
56+
<type type="confluence.getHtmlPageByTitle" extends="confluence.Task">
6557
<property name="spaceKey" category="input" required="true" />
6658
<property name="pageTitle" category="input" kind="string" required="true" />
6759
<property name="htmlpage" category="output"/>

0 commit comments

Comments
 (0)