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

Specify an Exchange/Connection object with Email #755

Open
mngan opened this issue Aug 31, 2023 · 0 comments
Open

Specify an Exchange/Connection object with Email #755

mngan opened this issue Aug 31, 2023 · 0 comments
Assignees
Labels
priority: evaluating status: accepted type: enhancement Issue is considered as an enhancement to the code, so it is not a regression nor a blocking issue

Comments

@mngan
Copy link
Contributor

mngan commented Aug 31, 2023

Peering Manager version

1.7.4

Feature type

New functionality

Proposed functionality

Allow a config context to be associated with the Email template.

Example template:

{% set our_as = affiliated_autonomous_systems | get(asn=32590) %}
{% set ixp = autonomous_system.get_internet_exchange_points(our_as) | get(slug="equinix-hong-kong") %}
{% set connection = ixp | connections | get(router__name="bg1-hkg2") %}
Hi {{autonomous_system.name}} (AS{{autonomous_system.asn}})

AS{{our_as.asn}} ({{our_as.name}}) has added a new connection to {{ ixp.name }}. We have existing BGP sessions with you on {{ ixp.name }}, so we are requesting you to set up additional sessions with this new connection to help with load balancing and resiliency. Our new peering IP's are below. 

AS{{our_as.asn}}
{{ connection.ipv4_address.ip }}
{{ connection.ipv6_address.ip }}

The sessions are already configured on our side. So they should come up when you configure them. If you had MD5 keys configured on the existing sessions, the same keys should also be set on the new sessions. 

Regards

Valve Peering Team

Right now, I have to hard code a number of things into the template, using a config context will allow this to be reused without touching the template. If the IXP and Connections objects could be retrieved more directly, that would also be a bonus because putting all the Jinja code into the subject line as well is a bit of a pain.

e.g

{% set our_as = affiliated_autonomous_systems | get(asn=32590) -%}{% set ixp = autonomous_system.get_internet_exchange_points(our_as) | get(slug="equinix-hong-kong") -%}New AS{{our_as.asn}} <=> AS{{autonomous_system.asn}} Sessions at {{ ixp.name }}

Use case

We find that we want to announce to existing peers of an IX about a new connection to the IX. There doesn't seem to be a good way to template this tidily. The parameters end up being hardcoded into the template. Also, it would be nice to be able to retrieve some of these stand alone objects in the templates without having to dive through the AutonomousSystem object to get it, but that is really a separate issue, and could be just the addition of more filters?

Database changes

None

External dependencies

None

@gmazoyer gmazoyer self-assigned this Sep 7, 2023
@gmazoyer gmazoyer added type: enhancement Issue is considered as an enhancement to the code, so it is not a regression nor a blocking issue priority: evaluating status: accepted labels Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: evaluating status: accepted type: enhancement Issue is considered as an enhancement to the code, so it is not a regression nor a blocking issue
Projects
None yet
Development

No branches or pull requests

2 participants