Closed bluecmd closed 3 months ago
Thanks @bluecmd for the PR. I'm getting more and more concerned that we're adding far too many knobs to this piece of code such that it's going to get unmaintainable. This particular use case seems firmly in the corner case bracket?
It might be best to just add an access key and then use a simple PHP script as the public end point? E.g.:
$asns_to_hide_location_of = [ 1, 2, 3, ... ];
$j = json_decode(
file_get_contents("https://ixpmanager.example.com/api/v4/member-export/ixf?access_key=super-secret-access-key")
);
foreach ($j->member_list as $id => $record) {
if ( in_array( $record->asnum, $asns_to_hide_location_of ) {
foreach ($j->member_list[$id]->connection_list as $cid => $crecord) {
$j->member_list[$id]->connection_list[$cid]->if_list = [];
}
}
}
echo json_encode($j);
Thanks for the feedback.
Sure - we can do that for our use case if you feel there is no need to add this upstream.
[NF] This allows to remove which specific PoPs a given member ASN is connected on.
Longer description
We have a need to mask where some peers are physically connected, which specifically for us means to remove the
switch_id
from the IX-F feed. However, removing just theswitch_id
results in a validation error on IXPDB's validator - thus we suggest omitting the wholeif_list
structure for a matching member.In addition to the above, I have:
<?= $t->ee( $data ) ?>
or equivalent.Example IX-F resource
Example configuration