de.tum.ei.lkn.eces:nbi

NBI providing a REST API for the tenant manager of the ECES framework

Лицензия

Лицензия

Группа

Группа

de.tum.ei.lkn.eces
Идентификатор

Идентификатор

nbi
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

NBI providing a REST API for the tenant manager of the ECES framework
Ссылка на сайт

Ссылка на сайт

https://github.com/AmoVanB/eces-nbi
Система контроля версий

Система контроля версий

http://github.com/amovanb/eces-nbi/tree/master

Скачать nbi

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/de.tum.ei.lkn.eces/nbi/ -->
<dependency>
    <groupId>de.tum.ei.lkn.eces</groupId>
    <artifactId>nbi</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/de.tum.ei.lkn.eces/nbi/
implementation 'de.tum.ei.lkn.eces:nbi:1.0.2'
// https://jarcasting.com/artifacts/de.tum.ei.lkn.eces/nbi/
implementation ("de.tum.ei.lkn.eces:nbi:1.0.2")
'de.tum.ei.lkn.eces:nbi:jar:1.0.2'
<dependency org="de.tum.ei.lkn.eces" name="nbi" rev="1.0.2">
  <artifact name="nbi" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.tum.ei.lkn.eces', module='nbi', version='1.0.2')
)
libraryDependencies += "de.tum.ei.lkn.eces" % "nbi" % "1.0.2"
[de.tum.ei.lkn.eces/nbi "1.0.2"]

Зависимости

compile (8)

Идентификатор библиотеки Тип Версия
com.sparkjava : spark-core jar 2.9.1
org.slf4j : slf4j-api jar 1.7.7
org.slf4j : slf4j-log4j12 jar 1.7.7
de.tum.ei.lkn.eces : core jar 2.0.3
de.tum.ei.lkn.eces : tenant-manager jar 1.0.18
de.tum.ei.lkn.eces : master-pom-commons jar 1.0.21
org.aeonbits.owner : owner jar 1.0.10
log4j : log4j jar 1.2.17

test (6)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
de.tum.ei.lkn.eces : routing jar 2.0.4
de.tum.ei.lkn.eces : network jar 2.0.1
de.tum.ei.lkn.eces : dnm jar 2.0.2
org.apache.httpcomponents : httpclient jar 4.5.9
de.tum.ei.lkn.eces : master-pom-commons test-jar 1.0.21

Модули Проекта

Данный проект не имеет модулей.

NBI

This project implements a REST API for the tenant manager of the ECES framework.

Usage

The project can be downloaded from maven central using:

<dependency>
  <groupId>de.tum.ei.lkn.eces</groupId>
  <artifactId>nbi</artifactId>
  <version>X.Y.Z</version>
</dependency>

The REST API can be activated simply by instantiating the NBISystem:

new NBISystem(tenantManagerSystem, controller, NBI_PORT)

The API will be exposed on the port NBI_PORT and calls will be forwarded to the TenantManagerSystem passed as parameter.

API

The system exposes the following API routes:

  • POST: /newTenant.
    • Parameters:
      • name (string): name of the tenant.
    • Returns:
      • id (int): ID of the created tenant.
      • cookie (int): a cookie to reuse when performing actions on behalf of this tenant.
  • POST: /newVM.
    • Parameters:
      • name (string): name of the VM.
      • tenantId (int): ID of the tenant for which the VM should be created.
      • cookie (int): cookie of the tenant.
    • Returns:
      • id (int): ID of the VM.
      • managememnt (string): a string for connecting to the management interface of the VM.
  • POST: /newFlow
    • Parameters:
      • name (string): flow name.
      • tenantId (int): tenant ID.
      • cookie (int): cookie of the tenant.
      • srcIp (string): source IP of the flow.
      • dstIp (string): destination IP of the flow.
      • srcPort (int): source port of the flow.
      • dstPort (int): destination port of the flow.
      • protocol (int): protocol number of the flow.
      • source (int): source VM ID.
      • destination (int): destination VM ID.
      • rate (int): rate of the flow in bps.
      • burst (int): burt of the flow in bytes.
      • latency (int): delay requirement of the flow in ms.
    • Returns:
      • id (int): ID of the created flow.
  • POST: /removeTenant
    • Parameters:
      • tenantId (int): ID of the tenant to remove.
      • cookie (int): cookie of the tenant.
  • POST: /removeVM
    • Parameters:
      • vmId (int): ID of the VM to remove.
      • cookie (int): cookie of the tenant.
  • POST: /removeFlow
    • Parameters:
      • flowId (int): ID of the flow to remove.
      • cookie (int): cookie of the tenant.

These routes correspond to the identically named functions of the TenantManagerSystem.

See the example script for an example of how to use the API. See tests for other examples of how to (and to not) use the interface.

Версии библиотеки

Версия
1.0.2