diff options
author | Pawel Slowikowski <p.slowikows2@samsung.com> | 2021-08-31 09:36:06 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-08-31 09:36:06 +0000 |
commit | 3b670db640e44f9b2a9ed97f84d3d379b9eee370 (patch) | |
tree | feee804c5101d46dba2263f849b86d27cfbad7fa | |
parent | 349fe83d55b032160f82bbd485ff84d1ec58d0cb (diff) | |
parent | 1da7986b679fe02d92c161a47ab5edcec854e871 (diff) |
Merge "Updating README.md in A1 PE Simulator"
-rw-r--r-- | README.md | 49 |
1 files changed, 41 insertions, 8 deletions
@@ -1,6 +1,6 @@ # A1 Policy Enforcement Simulator (A1 PE Simulator) -This simulator supports standard A1-P OSC\_2.1.0 interface. In addition, internal APIs are provided to manage the RAN elements (Cells, UEs) and to customize and send VES Events. +This simulator supports standard A1-P OSC\_2.1.0 interface. In addition, internal APIs are provided to manage the RAN elements (Cells, UEs) and to customize and send VES Events. A1 PE Simulator can send legacy VES events as well as FileReady events. ## How to use the A1 PE Simulator? @@ -77,7 +77,7 @@ To refresh the content of those files on runtime, see: A1 PE Simulator provides REST endpoints that can be used to trigger sending of VES events to DMaaP topic via VES-COLLECTOR (DCAE MS). -The file **vnf.config** provides the connectivity configuration as well as some commonEventHeader default values (like sourceId and sourceName): +The file **vnf.config** provides the connectivity configuration to VES Collector and FTP server as well as some commonEventHeader default values (like sourceId and sourceName): ``` vesHost=vesconsumer @@ -86,10 +86,16 @@ vesUser=sample1 vesPassword=sample1 vnfId=de305d54-75b4-431b-adb2-eb6b9e546014 vnfName=ibcx0001vm002ssc001 +ftpHost=localhost +ftpPort=22222 +repPeriod=90 ``` - vesHost defines the hostname of the VES consumer - vesPort defines the port on which consumer expects events +- ftpHost defines the hostname to FTP server +- ftpPort defines the port of FTP server +- repPeriod defines Reporting period for fileReady events in seconds - vesUser and vesPassword are used to create the BasicAuth header in the request - vnfId, vnfName map to the VES event -> commonEventHeader content: @@ -163,6 +169,13 @@ the only difference is that *measurementFields.additionalMeasurements.latency/th **200->500** means that the value will be generated from 200 to 500 (by using the exponential function) +#### Reporting method + +There are two options how to generate and collect VES events: + +- FILE_READY collects events by each CellId and send those events as FileReady event together with generated PM Bulk XML File. +- VES sends each Ves event directly to VES Collector for processing + ### A1-P Mediator API The A1 Mediator listens to the northbound interface of the RIC for policy guidance. @@ -288,6 +301,9 @@ A1 PE Simulator uses the properties to define the following: - Cell range - Default VES event sending interval - Version of the A1 PE Simulator API +- FTP server connection and configuration +- FileReady event constants +- PM Bulk File constants See (src/main/resources/application.properties) for default values. @@ -302,6 +318,11 @@ The default values can be overridden in multiple ways: - VES_COLLECTOR_ENDPOINT= - VES_DEFAULTINTERVAL= - RESTAPI_VERSION= + FTP_SERVER_UPLOAD= +- FTP_SERVER_PROTOCOL= +- FTP_SERVER_FILEPATH= +- FTP_SERVER_UPLOAD= +- XML_PM_LOCATION= #### 2. By adding the process arguments @@ -314,9 +335,21 @@ Add -D flag to the execution command: - "-Dves.collector.endpoint=" - "-Dves.defaultinterval=" - "-Drestapi.version=" +- "-Dftp.server.upload=" +- "-Dftp.server.protocol=" +- "-Dftp.server.filepath=" +- "-Dftp.server.upload=" +- "-Dxml.pm.location=" When running with -Dspring.profiles.active=dev default values for **vnf.config.file**, **topology.cell.config.file** and **topology.ue.config.file** are set to use the example files from *src/test/resources/* +### FTP upload or file copy + +In case of FILE_READY Reporting method, simulator creates PM Bulk File on FTP server in 2 ways: + +- FTP upload - ftp.server.upload=true - uploads file using FTP connection. +- Copy file - ftp.server.upload=true - copy file to FTP file location using operating system. File location is specified by *xml.pm.location* property + ### Refresh the configuration files on runtime If the contents of cells.json or ue.json are changed, the user should send a request to A1 PE Simulator to reload those files: @@ -329,19 +362,19 @@ Also, A1 PE Simulator automatically refreshes the topology/ues information from **refresher.fixed.rate.ms=60000** -# API +## API The API is documented by the Swagger tool. -## Swagger +### Swagger The generated swagger html file can be found in *doc/swagger/html* directory. JSON file that can be imported to Swagger GUI can be found in *doc/swagger*. Those files are regenerated in each maven build, so to generate this file please see **Build the A1 PE Simulator** chapter. -# Developer Guide +## Developer Guide -## Build the A1 PE Simulator +### Build the A1 PE Simulator Following mvn command (in the project directory) will build A1 Policy Enforcement Simulator: @@ -349,7 +382,7 @@ Following mvn command (in the project directory) will build A1 Policy Enforcemen mvn clean install ``` -## Run the A1 PE Simulator +### Run the A1 PE Simulator Following command will run the A1 Policy Enforcement Simulator: @@ -359,7 +392,7 @@ java -jar a1-pe-simulator-1.0-SNAPSHOT.jar org.onap.a1pesimulator.A1PolicyEnforc The application should start on 9998 port. -## Logging +### Logging The logs file will be created in the ${user.home}/log path. To define the **user.home** value, use the process arguments e.g "-Duser.home=/path_to_dir". |