Network Function Store server
The Network Function Store is mainly a repository for the VNFs software images and their metadata descriptions.
The NFS has been written in java as a web application running on TomEE server, a tomcat server with java EE extensions.
The build require JRE 1.8 and ant 1.9.
The server has to be run on server with Linux OS, rpm and JRE 1.8 installed.
Tools and Packages used
- jdk 1.8 - Java virtual machine
- ant 1.9 - build of Java applications
- ivy 2.4.0 - Apache dependency manager
- redline - pure Java library for manipulating RPM
- rpm - RPM Package Manager
- TomEE+ - Tomcat server with EE features
- HTMLWadlGenerator - Help generator
- H2 - H2 database
- gson - JSON library
- log4j2 - log library
- commons-fileupload - file upload library
- robotframework - python tools
- python - test automation framework
- robotframework-requests - robotframework Library for HTTP level testing
- wiremock - library for stubbing and mocking web services
Clone Git Repo
$ cd ~ $ git clone https://github.com/T-NOVA/NFS.git $ cd NFS
After you cloned the sources from the git repository the build can be done running ant
$ ant -lib lib.no.deploy
The build produce an rpm into directory prod/rpms containing all the code needed to install the service.
The NFStore will be installed as a standard linux SysVinit service.
After uploading the rpm on the server install it as root user
$ rpm -ivh nfs-1.0-0.noarch.rpm
The default configuration of NFStore is:
|NFS_STORE_PATH||local store directory||/usr/local/store|
|NFS_URL||NFStore URL used for set image links||https://apis.t-nova.eu/NFS|
|TOMCAT_IP||NFStore address||0.0.0.0 (any address)|
|TOMCAT_HTTP_PORT||NFStore port when protocol is http||80|
|TOMCAT_HTTPS_PORT||NFStore port when protocol is https||443|
If changes are needed, you can modify the values inside file /usr/local/nfs/bin/nfs.conf using a text editor before start the server.
This file contains commented rows with this variables so you should only uncomment what you need and set required values.
Run NFS service
$ service nfs start Starting nfs (via systemctl): [ OK ] $
The Network Function Store is available at default URL http://127.0.0.1:8080/NFS
Stop NFS service
$ service nfs stop Stopping nfs (via systemctl): [ OK ] $
Check NFS service
$ service nfs status nfsMonitor active: pid 29890 tomcat active: pid 29924 tomcat manager status: running nfs app status: running $
restart NFS service
$ service nfs restart Restarting nfs (via systemctl): [ OK ] $
NFS API Documentation
The NFS interfaces can be mainly divided in 2 parts:
The server is also able to generated directly a basic documentation in html format using URL http://127.0.0.1:8080/NFS?_wadl&_type=text/html.
Note that these informations are not complete because the used library has some restrictions.
Tests are available in
functionalTest directory of repository and can be run using robotframework tools loading directory
Robotframework and necessary libraries can be easy installed using
pip on your system after python installation.
$ pip install <object to install>
Note that some libraries are local like Http requests library that is modified to support attachments on REST requests; local libraries that should be used are available into 'functionsTest/python.lib' directory.
Is possible to change some configuration changing values available on ServerSetting.html file.