Skip to content

Commit 4f2a148

Browse files
Merge pull request #249 from FabrizioMoggio/rel-0.9.5
Rel 0.9.5
2 parents fa5a6ab + bea2c54 commit 4f2a148

File tree

1 file changed

+160
-65
lines changed

1 file changed

+160
-65
lines changed

code/API_definitions/Traffic_Influence.yaml

+160-65
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ openapi: 3.0.3
44
# API info #
55
############################################################################
66
info:
7-
title: OPAG-CAMARA Traffic Influence API
8-
version: 0.9.4-wip
7+
title: Traffic Influence API
8+
version: 0.9.5-wip
99
description: |
1010
## Overview
1111
The reference scenario foresees a Service, composed by one or more Service
@@ -90,30 +90,30 @@ info:
9090
Before starting to use the TI API, the developer needs to know about the
9191
below specified details:\
9292
\
93-
**Base-Url**
93+
**Base-Url:**
9494
The RESTful TI API endpoint, for example
9595
[**https://tim-api.developer.tim.it/trafficinfluence**](https://tim-api.\
9696
developer.tim.it/trafficinfluence)\
9797
\
98-
**TrafficInfluence**
98+
**TrafficInfluence:**
9999
This object represents the resource that carries the requirements from the
100100
user to be implemented. The TI API is invoked for the life cycle management
101101
of this resource (CRUD). The resource contains the intents from the TI API
102102
Consumer. Managing this resource, the developer can specify in which
103103
geographical location the routing must be applied, toward which application,
104104
maybe for a specific set of users or for a limited period of time.\
105105
\
106-
**trafficInfluenceID**
106+
**trafficInfluenceID:**
107107
Identifier for the Traffic Influence resource. This parameter is returned
108108
by the TI API and must be used to update it (e.g., adding a Device or
109109
deleting it). A different Traffic Influence resource must be created for
110110
any Device or Zone or Region. All these resources are related to an
111111
Application identified by "appId".\
112112
\
113-
**apiConsumerId**
113+
**apiConsumerId:**
114114
Unique identifier for the TI API Consumer.\
115115
\
116-
**region**
116+
**region:**
117117
The developer can specify in which geographical area he requires the fastest
118118
routing toward the nearest application instance. A "region" is a wide
119119
geographical area and it contains one or more "zones". A "zone" is where the
@@ -125,7 +125,7 @@ info:
125125
"trafficInfluenceID"). All the created resources are aggregated by the
126126
Application (identified by "appId").\
127127
\
128-
**zone**
128+
**zone:**
129129
The developer can specify in which geographical area he requires the fastest
130130
routing toward the nearest Application instance. A "zone" is a smaller
131131
geographical area inside a "region". A "zone" is where the Edge Cloud Zone
@@ -135,32 +135,40 @@ info:
135135
"trafficInfluenceID"). All the created resources are aggregated by the
136136
Application (identified by "appId").\
137137
\
138-
**appId**
138+
**appId:**
139139
A globally unique identifier associated with the application. This
140140
identifier is provided during the application onboarding process.
141141
To influence the traffic toward a specific Application. It is the Operator
142142
Platform that detects the appropriate Application instance in the selected
143143
"region" or "zone".\
144144
\
145-
**appInstanceId**
145+
**appInstanceId:**
146146
A globally unique identifier generated by the Operator Platform to identify
147147
a specific instance of the Application on a specific zone. To influence a
148148
traffic toward a specific Application instance.\
149149
\
150-
**trafficFilters**
151-
The Application can expose different service on different interfaces, with
152-
this parameter it is possible to enable just some of those services maybe
153-
for different sets of users.\
150+
**sourceTrafficFilters:**
151+
The traffic can be from a specific application port in the Device.\
154152
\
155-
**Device**
156-
A user Device can be provided as an input. To add more users the TI API must
157-
be invoked (POST) of each user Device. New "TrafficInfluence" resources are
158-
created (with different "trafficInfluenceID"). All the created resources are
159-
aggregated by the Application (identified by "appId"). The routing toward
160-
the selected Application instance is only applied for provided user
161-
Devices.\
153+
**destinationTrafficFilters:**
154+
The Application can expose different service on different interfaces,
155+
identified by port and protocol, with this parameter it is possible to
156+
route the traffic just toward some of those services maybe for different
157+
sets of users.\
162158
\
163-
**Notification URL and token**
159+
**Device:**
160+
An user Device can be provided as an input. The Device can be identified by
161+
the phone number (phoneNumber), an external identifier
162+
(networkAccessIdentifier) or by its IP Address (Ipv4Address, Ipv6Address)
163+
also specifying a Port. For IP address both the private (as seen from inside
164+
the Device) and the public (as seen over Internet by a server connected to
165+
the Device) can be used. To add more users the TI API must be invoked (POST)
166+
of each user Device. New "TrafficInfluence" resources are created (with
167+
different "trafficInfluenceID"). All the created resources are aggregated by
168+
the Application (identified by "appId"). The routing toward the selected
169+
Application instance is only applied for provided user Devices.\
170+
\
171+
**Notification URL and token:**
164172
Developers have a chance to specify call back URL on which notifications
165173
(e.g. session termination) regarding the session can be received from the
166174
service provider. This is also an optional parameter.
@@ -270,6 +278,11 @@ info:
270278
- Modified CAMARA URL to refer to the Edge Cloud Repository
271279
- OAS version now includes "-wip" extension
272280
- simplified "Servers" section and included "vwip" as version
281+
- Updated documentation to better specify how to identify a Device
282+
- Updated the Device parameter according to CAMARA_common.yaml
283+
- change API name in YAML
284+
- introduced sourceTrafficFilters and modified trafficFilters into
285+
destinationTrafficFilters
273286
license:
274287
name: Apache 2.0
275288
url: https://www.apache.org/licenses/LICENSE-2.0.html
@@ -641,28 +654,29 @@ components:
641654
- 'error'
642655
- 'deletion in progress'
643656
- 'deleted'
644-
trafficFilters:
645-
type: array
646-
items:
647-
type: string
648-
description: Indicates the packet filters of the IP flow. The source
649-
IP is not required. It is retrived by the platoform according to
650-
the TI API request. If no Traffic Influece resourse is created with
651-
a specific Device, any IP will be routed to the Application. If a
652-
Traffic Influece resource exists with a specific Device configured,
653-
only the related IPs will be routed to the local instance of the
654-
Application. The destination IP is not required,it is already known
655-
by the platform thanks to the appId and appInstanceId parameters
656-
that are used to retive the destination IP. The protocol must be
657-
specified and it is identified by a string according to the column
658-
“Keyword” as defined by IANA (https://www.iana.org/assignments/\
659-
protocol-numbers/protocol-numbers.xhtml), e.g. UDP or TCP.
660-
The destination port must be specified.
661-
example: TCP 5060
662-
minItems: 1
663-
minItems: 1
664-
description: Identifies IP packet filters. To be used when a the
665-
Application needs a traffic flow towards a specific EAS interface
657+
sourceTrafficFilters:
658+
description: Ports used locally by the device for flows to which
659+
the requested traffic influence should apply. If omitted, then the
660+
traffic influence will apply to all flows between the device and the
661+
specified application server address and ports.
662+
type: object
663+
properties:
664+
sourcePort:
665+
allOf:
666+
- $ref: "#/components/schemas/PortsSpec"
667+
destinationTrafficFilters:
668+
description: Identifies the destination IP packet filters. To be
669+
used when it is needed a traffic flow towards a specific EAS
670+
interface identified by a protocol and a port. Also the Protocol
671+
(e.g. TCP or UDP) can be specified.
672+
type: object
673+
properties:
674+
destinationPort:
675+
allOf:
676+
- $ref: "#/components/schemas/PortsSpec"
677+
destinationProtocol:
678+
allOf:
679+
- $ref: "#/components/schemas/Protocol"
666680
notificationUri:
667681
type: string
668682
description: Defines the callback uri which should be notified in
@@ -719,42 +733,123 @@ components:
719733
type: string
720734
additionalProperties: false
721735
Device:
736+
description: |
737+
End-user equipment able to connect to a mobile network. Examples of
738+
devices include smartphones or IoT sensors/actuators.
739+
The developer can choose to provide the below specified device
740+
identifiers:
741+
* `ipv4Address`
742+
* `ipv6Address`
743+
* `phoneNumber`
744+
* `networkAccessIdentifier`
745+
NOTE: the MNO might support only a subset of these options. The API
746+
invoker can provide multiple identifiers to be compatible across
747+
different MNOs. In this case the identifiers MUST belong to the same
748+
device.
722749
type: object
723-
minProperties: 1
724750
properties:
725751
phoneNumber:
726752
$ref: "#/components/schemas/PhoneNumber"
727753
networkAccessIdentifier:
728754
$ref: "#/components/schemas/NetworkAccessIdentifier"
729755
ipv4Address:
730-
$ref: "#/components/schemas/Ipv4Address"
756+
$ref: "#/components/schemas/DeviceIpv4Addr"
731757
ipv6Address:
732-
$ref: "#/components/schemas/Ipv6Address"
733-
description: Device identifier
758+
$ref: "#/components/schemas/DeviceIpv6Address"
759+
minProperties: 1
760+
PhoneNumber:
761+
description: A public identifier addressing a telephone subscription. In
762+
mobile networks it corresponds to the MSISDN (Mobile Station
763+
International Subscriber Directory Number). In order to be globally
764+
unique it has to be formatted in international format, according to
765+
E.164 standard, prefixed with '+'.
766+
type: string
767+
pattern: '^\+[1-9][0-9]{4,14}$'
768+
example: "+123456789"
734769
NetworkAccessIdentifier:
770+
description: A public identifier addressing a subscription in a mobile
771+
network. In 3GPP terminology, it corresponds to the GPSI formatted with
772+
the External Identifier ({Local Identifier}@{Domain Identifier}).
773+
Unlike the telephone number, the network access identifier is not
774+
subjected to portability ruling in force, and is individually managed
775+
by each operator.
735776
type: string
736777
example: "[email protected]"
737-
description: identifier for the End User formatted as string, it cab be
738-
the user's email address.
739-
PhoneNumber:
740-
type: string
741-
pattern: '^\+?[0-9]{5,15}$'
742-
example: "123456789"
743-
description: Subscriber number in E.164 format (starting with country
744-
code). Optionally prefixed with '+'.
745-
Ipv4Address:
778+
DeviceIpv4Addr:
779+
type: object
780+
description: |
781+
The device should be identified by either the public (observed) IP
782+
address and port as seen by the application server, or the private
783+
(local) and any public (observed) IP addresses in use by the device
784+
(this information can be obtained by various means, for example from
785+
some DNS servers).
786+
If the allocated and observed IP addresses are the same (i.e. NAT is not
787+
in use) then the same address should be specified for both
788+
publicAddress and privateAddress.
789+
If NAT64 is in use, the device should be identified by its publicAddress
790+
and publicPort, or separately by its allocated IPv6 address (field
791+
ipv6Address of the Device object)
792+
In all cases, publicAddress must be specified, along with at least one
793+
of either privateAddress or publicPort, dependent upon which is known.
794+
In general, mobile devices cannot be identified by their public IPv4
795+
address alone.
796+
properties:
797+
publicAddress:
798+
$ref: "#/components/schemas/SingleIpv4Addr"
799+
privateAddress:
800+
$ref: "#/components/schemas/SingleIpv4Addr"
801+
publicPort:
802+
$ref: "#/components/schemas/Port"
803+
anyOf:
804+
- required: [publicAddress, privateAddress]
805+
- required: [publicAddress, publicPort]
806+
example:
807+
publicAddress: "84.125.93.10"
808+
publicPort: 59765
809+
SingleIpv4Addr:
810+
description: A single IPv4 address with no subnet mask
746811
type: string
747812
format: ipv4
748-
example: "192.168.0.1"
749-
description: IP of the device. A single IPv4 address may be specified in
750-
dotted-quad form 1.2.3.4. Only this exact IP number will match the flow
751-
control rule.
752-
Ipv6Address:
813+
example: "84.125.93.10"
814+
PortsSpec:
815+
description: Specification of several TCP or UDP ports
816+
type: object
817+
minProperties: 1
818+
properties:
819+
ranges:
820+
description: Range of TCP or UDP ports
821+
type: array
822+
minItems: 1
823+
items:
824+
type: object
825+
required:
826+
- from
827+
- to
828+
properties:
829+
from:
830+
$ref: "#/components/schemas/Port"
831+
to:
832+
$ref: "#/components/schemas/Port"
833+
Port:
834+
description: TCP or UDP port number
835+
type: integer
836+
minimum: 0
837+
maximum: 65535
838+
Protocol:
839+
description: The protocol for the influeced flow. It can be specified and
840+
it is identified by a string according to the column “Keyword” as defined
841+
by IANA (https://www.iana.org/assignments/protocol-numbers/\
842+
protocol-numbers.xhtml), e.g. UDP or TCP.
843+
type: string
844+
example: "TCP"
845+
DeviceIpv6Address:
846+
description: |
847+
The device should be identified by the observed IPv6 address, or by any
848+
single IPv6 address from within the subnet allocated to the device
849+
(e.g. adding ::0 to the /64 prefix).
753850
type: string
754851
format: ipv6
755-
example: "2001:db8:85a3:8d3:1319:8a2e:370:7344"
756-
description: IP of the device. A single IPv6 address, following IETF 5952
757-
format, may be specified like 2001:db8:85a3:8d3:1319:8a2e:370:7344
852+
example: 2001:db8:85a3:8d3:1319:8a2e:370:7344
758853
AppInstanceId:
759854
type: string
760855
format: uuid

0 commit comments

Comments
 (0)