Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/fabricv4_test_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ on:
types:
- completed
workflow_dispatch:
pull_request:
types: [labeled]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends on a 'run-fabric-tests' label to be created. ok. conditional looks ok to me to run when we want it and not otherwise.


jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
if: >-
${{ github.event_name == 'workflow_dispatch'
|| (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|| (github.event_name == 'pull_request' && github.event.label.name == 'run-fabric-tests') }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.event.workflow_run.head_branch || github.ref }}

- name: Set up JDK 11
uses: actions/setup-java@v4
Expand Down Expand Up @@ -54,6 +59,8 @@ jobs:
jdk: 21
- class: ServiceProfilesApiTest
jdk: 21
- class: InternetAccessApiTest
jdk: 21

env:
TEST_HOST_URL: ${{ secrets.TEST_HOST_URL }}
Expand All @@ -62,7 +69,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.event.workflow_run.head_branch || github.ref }}

- name: Set up JDK ${{ matrix.testConfig.jdk }}
uses: actions/setup-java@v4
Expand Down Expand Up @@ -136,7 +143,7 @@ jobs:

notify-slack:
needs: test
if: always()
if: always() && needs.test.result != 'skipped'
runs-on: ubuntu-latest

outputs:
Expand Down
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,77 @@ public class Example {
}
}
```

## Equinix Internet Access (EIA)

The Fabric v4 module supports **Equinix Internet Access (EIA)** services. The generated
clients live under `com.equinix.sdk.fabricv4` (`api` for clients, `model` for data classes).

Two API clients cover the EIA workflow:

- **`InternetAccessServicesApi`** — manage EIA services: create, get, search,
patch (e.g. update bandwidth) and delete.
- **`IpBlocksApi`** — manage the IP blocks an EIA service routes: submit, search,
get, patch and delete.

Supported routing protocols: `DIRECT`, `STATIC`, and `BGP`
(`InternetAccessRoutingProtocolType`). Service state is reported via
`InternetAccessServiceState` (`PROVISIONING`, `PROVISIONED`, `FAILED`,
`DEPROVISIONING`, `DEPROVISIONED`).

### Example: create an EIA service

```java
import com.equinix.sdk.fabricv4.ApiClient;
import com.equinix.sdk.fabricv4.ApiException;
import com.equinix.sdk.fabricv4.Configuration;
import com.equinix.sdk.fabricv4.auth.HttpBearerAuth;
import com.equinix.sdk.fabricv4.api.InternetAccessServicesApi;
import com.equinix.sdk.fabricv4.model.*;
import java.util.UUID;

import static java.util.Collections.singletonList;

public class EiaExample {
public static void main(String[] args) throws ApiException {
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.equinix.com");
((HttpBearerAuth) client.getAuthentication("BearerAuth"))
.setBearerToken("<GetBearerTokenFromDeveloperPortal>");

InternetAccessServicesApi eiaApi = new InternetAccessServicesApi(client);

// DIRECT routing: reference an existing IA_VC connection and a customer IPv4 block,
// and supply the Equinix peer IP from that block.
InternetAccessRoutingProtocolDirectRequest routing =
new InternetAccessRoutingProtocolDirectRequest()
.addConnectionsItem(new InternetAccessConnectionDirectRequest()
.uuid(UUID.fromString("<connectionUuid>"))
.peeringIpv4(new InternetAccessPeeringIpv4Request().equinixPeerIp("67.223.23.5")));
routing.type(InternetAccessRoutingProtocolType.DIRECT);
routing.addCustomerRoutesItem(new InternetAccessCustomerRouteRequest()
.ipBlock(new InternetAccessIpBlockRequest().uuid(UUID.fromString("<ipBlockUuid>"))));

InternetAccessPostRequest request = new InternetAccessPostRequest()
.type(InternetAccessServiceType.SINGLE_IA)
.name("my-eia-service")
.bandwidth(50)
.routingProtocol(routing)
.billing(new InternetAccessPostRequestBilling().type(InternetAccessBillingType.FIXED))
.project(new Project().projectId("<projectId>"))
.account(new InternetAccessAccount().accountNumber("<accountNumber>"));

InternetAccessService service = eiaApi.createEiaService(request);
System.out.println("Created EIA service: " + service.getUuid() + " state=" + service.getState());

// Update bandwidth
eiaApi.patchEiaService(service.getUuid(), singletonList(new InternetAccessPatchOperationUpdate()
.op(InternetAccessPatchOperationUpdateAllowedOp.REPLACE)
.path("/bandwidth")
.value(100)));

// Delete when no longer needed
eiaApi.deleteEiaService(service.getUuid());
}
}
```
Loading
Loading