Skip to content
Permalink
Browse files

Merge "Add Cloud Number and Ticket to Notifications."

  • Loading branch information
grafuls authored and gerritforge-ltd committed Mar 12, 2020
2 parents fd3195e + 4171fdf commit 38dc0cffce02c673072f441d8c9448809d77d1e6
@@ -68,6 +68,9 @@ rt_url: https://engineering.example.com/rt/Ticket/Display.html

# this is used in some of the wiki generate for the links
quads_url: http://quads.scalelab.example.com
# url for a request form if you use one
# e.g. http://scalelab.redhat.com
quads_request_url:

# Foreman Specific Variables
# foreman URL
@@ -23,7 +23,7 @@ are in their final, desired state before being ready to use.
For additional information regarding the Scale Lab usage
please see the following documentation:

http://{{ wp_wiki }}/faq/
http://{{ wp_wiki }}/usage/
{{ wp_wiki }}/faq/
{{ wp_wiki }}/usage/

Perf/Scale DevOps Team
@@ -5,7 +5,7 @@ your allocated environment:
{{ cloud_info }}

(Details)
http://{{ wp_wiki }}/assignments/#{{ cloud }}
{{ wp_wiki }}/assignments/#{{ cloud }}

will change. As host schedules are activated some
hosts will automatically be reprovisioned and moved to
@@ -18,8 +18,8 @@ your environment. Specifically:
For additional information regarding the Scale Lab usage
please see the following documentation:

http://{{ wp_wiki }}/faq/
http://{{ wp_wiki }}/usage/
{{ wp_wiki }}/faq/
{{ wp_wiki }}/usage/

Thank you for your attention.

@@ -6,7 +6,7 @@ You've been allocated a new environment!
{{ cloud_info }}

(Details)
http://{{ wp_wiki }}/assignments/#{{ cloud }}
{{ wp_wiki }}/assignments/#{{ cloud }}

You can view your machine list, duration and other
details above.
@@ -21,7 +21,7 @@ Password: {{ password }}
For additional information regarding system usage
please see the following documentation:

http://{{ wp_wiki }}/faq/
http://{{ wp_wiki }}/usage/
{{ wp_wiki }}/faq/
{{ wp_wiki }}/usage/

Perf/Scale DevOps Team
@@ -15,12 +15,22 @@ the pool of available hosts.
{{host}}
{% endfor %}


{% if quads_request_url %}
To request an extension please file a new request via
the form below with your cloud number in the subject line.

e.g. "cloud04 extension"

{{ quads_request_url }}
{% endif %}

For additional information regarding the Scale Lab usage
please see the following documentation:

http://{{ wp_wiki }}/faq/
http://{{ wp_wiki }}/usage/
{{ wp_wiki }}/faq/
{{ wp_wiki }}/usage/

Thank you for your attention.

Perf/Scale DevOps Team
Perf/Scale DevOps Team
@@ -46,7 +46,10 @@ def create_initial_message(real_owner, cloud, cloud_info, ticket, cc):
foreman_url=conf["foreman_url"],
)

postman = Postman("New QUADS Assignment Allocated", real_owner, cc_users, content)
postman = Postman("New QUADS Assignment Allocated - %s %s" % (
cloud,
ticket
), real_owner, cc_users, content)
postman.send_email()
if conf["irc_notify"]:
try:
@@ -64,27 +67,35 @@ def create_initial_message(real_owner, cloud, cloud_info, ticket, cc):


def create_message(
real_owner,
cloud_obj,
day,
cloud,
cloud_info,
cc,
host_list_expire,
):
template_file = "message"
cloud = cloud_obj.name
real_owner = cloud_obj.owner
ticket = cloud_obj.ticket
cc = cloud_obj.ccuser

cc_users = conf["report_cc"].split(",")
for user in cc:
cc_users.append("%s@%s" % (user, conf["domain"]))
with open(os.path.join(TEMPLATES_PATH, template_file)) as _file:
template = Template(_file.read())
quads_request_url = conf.get("quads_request_url")
content = template.render(
days_to_report=day,
cloud_info=cloud_info,
wp_wiki=conf["wp_wiki"],
quads_request_url=quads_request_url,
cloud=cloud,
hosts=host_list_expire,
)
postman = Postman("QUADS upcoming expiration notification", real_owner, cc_users, content)
postman = Postman("QUADS upcoming expiration for %s - %s" % (
cloud,
ticket
), real_owner, cc_users, content)
postman.send_email()


@@ -174,11 +185,9 @@ def main():
logger.info('=============== Additional Message')
host_list = [schedule.host.name for schedule in diff]
create_message(
cloud.owner,
cloud,
day.value,
cloud.name,
cloud_info,
cloud.ccuser,
host_list,
)
kwargs = {day.name.lower(): True}

0 comments on commit 38dc0cf

Please sign in to comment.
You can’t perform that action at this time.