-
-
08 Mar 2017 22:04:32 UTC
- Distribution: Megaport
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (1)
- Testers (502 / 0 / 11)
- Kwalitee
Bus factor: 0- 48.84% Coverage
- License: unknown
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (7.94KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
Megaport::Ports
DESCRIPTION
This provide a simple read-only list of Megaport "partner ports". Details about the objects returned by the API can be found here.
Partner Ports
In Megaport terminology, a partner port is a Megaport service that is active on the network which is a valid target for VXC orders. Not all Megaport POPs are interconnected, there is the concept of
networkRegion
which defines which locations are accessible to each other.This endpoint provides a
locationId
for each service but doesn't indicate thenetworkRegion
. For now, this will need to be handled in application code.METHODS
list
# Optional array or arrayref my @list = $ports->list; my $list = $ports->list; # Use search terms to find a partial list my @telx_nyc2 = $ports->list(locationId => 78); my @google_cloud = $ports->list(companyUid => '29ba879b-45c8-48eb-bd97-618d0f20ea04'); # Or use a regexp to get a bit fancy my @amsix = $ports->list(companyName => qr/^AMS-IX/);
Returns a list or allows searching based on any field present in the object.
get
# id is an alias for productUid my $azure_wash_dc = $ports->get(id => '4695b867-84ad-48b4-bf25-fca26c443f2c');
Best used to search by
id
but as with "list" in list, any field can be used. This method uses "first" in List::Util to return the first matching entry. The data is stored in a hash internally so the keys are unordered. Using this method with a search term likecompanyUid
will yield unexpected results.AUTHOR
Cameron Daniel <cdaniel@cpan.org>
Module Install Instructions
To install Megaport, copy and paste the appropriate command in to your terminal.
cpanm Megaport
perl -MCPAN -e shell install Megaport
For more information on module installation, please visit the detailed CPAN module installation guide.