Instead of copying the CLI script in API code, use functions shared by CLI and API Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I3f9b30b8700b68237d0e80768db015d8dec3deb5