Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
pierky committed Sep 6, 2024
2 parents 79ed5dc + d07a207 commit d6a45b8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/test_playground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function pr_bold() {

function run_on() {
set +e
docker-compose exec -T $1 bash -c "$2"
docker compose exec -T $1 bash -c "$2"

if [ $? -eq 0 ]; then
res="OK"
Expand All @@ -24,17 +24,17 @@ function run_on() {
pr_bold "$1: $2 $res"
}

docker-compose version
docker compose version

cd tools/playground

if [ "$CI" == "true" ]; then
export INSTALL_FROM_SRC=1
fi

docker-compose build
docker compose build

docker-compose up -d
docker compose up -d

# Let run.sh configure ARouteServer...
echo -n "Waiting a bit till run.sh configures everything... "
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ Change log

.. note:: **Upgrade notes**: after upgrading, run the ``arouteserver setup-templates`` command to sync the local templates with those distributed with the new version. More details on the `Upgrading <https://arouteserver.readthedocs.io/en/latest/INSTALLATION.html#upgrading>`__ section of the documentation.

1.23.1
------

- Fix: ``clients-from-euroix`` ``--guess-custom-bgp-communities`` multiple values not handled

When ``clients-from-euroix`` was used with ``--guess-custom-bgp-communities``, if multiple values were passed (like country colocation city) only one was used to attach the custom community to the client.

1.23
----

Expand Down
11 changes: 8 additions & 3 deletions pierky/arouteserver/euro_ix.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,16 @@ def normalize_bgp_community(s):
def attach_custom_bgp_community(client, prefix, name):
community_tag = normalize_bgp_community(name)

self.mk_parents_and_set(client, "cfg.attach_custom_communities", [])
if "cfg" not in client:
client["cfg"] = {}
if "attach_custom_communities" not in client["cfg"]:
client["cfg"]["attach_custom_communities"] = []

if community_tag not in client["cfg"]["attach_custom_communities"]:
community_value = "{}_{}".format(prefix, community_tag)

if community_value not in client["cfg"]["attach_custom_communities"]:
client["cfg"]["attach_custom_communities"].append(
"{}_{}".format(prefix, community_tag)
community_value
)

def enrich_with_custom_bgp_communities(clients, connection):
Expand Down
2 changes: 1 addition & 1 deletion pierky/arouteserver/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

__version__ = "1.23.0" # pragma: no cover
__version__ = "1.23.1-alpha2" # pragma: no cover
COPYRIGHT_YEAR = 2024 # pragma: no cover

0 comments on commit d6a45b8

Please sign in to comment.