Skip to content

robincher/node-f5-icontrol-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js library for F5 iControl API

Codacy Badge Codeship Status for robincher/node-f5-icontrol-client Known Vulnerabilities Coverage Status PRs Welcome

A helper client to interact with F5 iControl APIs.

See F5 iControl REST API documentation for more details

https://devcentral.f5.com/d/icontrol-rest-user-guide

Getting Started

Create iControl Client Instance

const iControl = require('node-icontrol-client').IControlUtil;

let iControlClient = new iControl({
  host: '127.0.0.1',
  proto: 'https',
  port: 443,
  token: 'token value', //Authorization Token for Basic Auth
  output: false //Set to true if you want to see output
});


iControlClient.list('/mgmt/tm/net/bwc/policy').then(function(res)  {
     //Do Something
    })
    .catch((err) => {
     //Do Something
    })


  • host : F5's hostname
  • proto : (Optional) Protocol, either https or http. It will be default to https if not specify
  • port: (Optional) TCP/IP port. Default to 443 if not indicated
  • ca : CA file content, required if strict mode is set on.
  • token: F5 generated basic token. Please refer here on how you can generate a basic auth token.
  • output : Set it true to print out console logs

Local Live Testing

Refer to the examples shared within repository.

Please ensure you have access to a test or development F5 Proxy. You can specify your own testing environment A sample.json has been included to help you kick start the testing

Running the example file

cd example/

node filename.js

Unit Testing

Run the following to start unit test

npm test

Test Coverage

Run the following to check out the code coverage

npm run testCoverage

License

Release under GNU GENERAL PUBLIC LICENSE

References