Software Defined Networking
1828221 Members
2012 Online
109975 Solutions
New Discussion

Re: SDN Sample Application

 
stephshaf
Occasional Visitor

SDN Sample Application

Hello,

 

I have been following the HP VAN SDN Controller Programming Guide to create the sample application "health-monitor". In the guide it says that the complete sample application source code can be found in the HP VAN SDN Controller SDK. I have searched through the hp-sdn-sdk-2.0.0 folder that I recieved from HP and have been unable to find it. Can you point me in the right direction?

 

Thanks,

Stephanie

8 REPLIES 8
sdnindia
Trusted Contributor

Re: SDN Sample Application

Hello Stephanie,

 

Thanks for posting your query.

You can follow below steps to get the code of sample application health-monitor -

 

 1. Unzip hp-sdn-sdk-2.0.0.zip

2. Under bin directory you can find installer-sdk script, just run this script without any argument.

3. Then run gen-sdn-app script (which is also under bin directory) without any argument. This will show the sample usage at the bottom of the screen.

4. Run the gen-sdn-app with arguments as mentioned in the sample usage. This will generate the code for the sample application.

You can take help from SDN Programming guide [page 8 - HP Van SDN Controller SDK and page 113 onwards- Application Generator (Automatic Workspace Creation) ].

 

Please let us know if you still face the problem.

 

Thanks,

HP SDN Team

sdnindia
Trusted Contributor

Re: SDN Sample Application

Hello Stephanie,

Doing a follow up to check if you need any further assistance with respect to the query posted.
Please do let us know  if your problem is solved.

If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.

Thanks
HP SDN Team

ankur_aggarwal
Senior Member

Re: SDN Sample Application

I used the steps as mentioned above and a document with name "Sample Application Generation and Installation" but still it says the error as "gen-sdn-app: command not found"...

 

I was able install the SDK and later got stuck with this. Please help.

 

 

ankur@ankur-comp2:~$ cd /media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0/
ankur@ankur-comp2:/media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0$ gen-sdn-app ~sdn-hm mango DeviceHealth "Device Health Monitor" "Mango Agile Networks" "Application for monitoring health of network devices." health
gen-sdn-app: command not found

 

Thanks in advance.

 

Ankur

sdnindia
Trusted Contributor

Re: SDN Sample Application

Hi Ankur,

 

As you mentioned that you were able to install the SDK , so please make sure that  you have the gen-sdn-app script in the same directory (i.e.  under hp-sdn-sdk-2.0.0/bin)

gen-sdn-app script is in bin directory while you are trying to run this script from hp-sdn-sdk-2.0.0 directory so you get the error “gen-sdn-app: command not found”

 

Also please check if your PATH variable has  dot (.) to search in the current directory.

If PATH variable has dot, you can run as below from the bin directory -

/media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0/bin$ gen-sdn-app

 

If PATH variable does not have a dot , you have to run as below-

/media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0/bin$ ./gen-sdn-app

 

Please  let us know if you still face the issue.

 

Thanks,

HP SDN Team

Dennis Handly
Acclaimed Contributor

Re: SDN Sample Application

>Also please check if your PATH variable has dot (.) to search in the current directory.

 

The best solution is to make sure PATH has the path to the script/executable:

/media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0/bin

ankur_aggarwal
Senior Member

Re: SDN Sample Application

Hi,

 

Thanks for the response,, i followed the suggesstions and I'm gettign a new error now as "Error: Could not find or load main class Health":-

 

ankur@ankur-comp2:~$ cd /media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0/ankur@ankur-comp2:/media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0$ cd bin
ankur@ankur-comp2:/media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0/bin$ ./gen-sdn-app ~/sdn-hm/ mango DeviceHealth "Device Health Monitor" "Mango Agile Networks" "Application for monitoring health of network devices." health
Creating module /home/ankur/sdn-hm//mango-root...
Error: Could not find or load main class Health
Creating module /home/ankur/sdn-hm//mango-model...
Error: Could not find or load main class Health
Creating module /home/ankur/sdn-hm//mango-api...
Error: Could not find or load main class Health
Creating module /home/ankur/sdn-hm//mango-bl...
Error: Could not find or load main class Health
Creating module /home/ankur/sdn-hm//mango-rs...
Error: Could not find or load main class Health
Creating module /home/ankur/sdn-hm//mango-ui...
Error: Could not find or load main class Health
Creating module /home/ankur/sdn-hm//mango-app...
Error: Could not find or load main class Health

 

Its creating the directories though empty..I'm a bit confused on what is being missed. Please guide.

 

Ankur

sdnindia
Trusted Contributor

Re: SDN Sample Application

Hi Ankur,

 

You are missing one argument (i.e. hm) while running the gen-sdn-app script.

Please include hm as below while running the script -

 

ankur@ankur-comp2:/media/sf_SDN/1VANcontroller/hp-sdn-sdk-2.0.0/bin$ gen-sdn-app ~/sdn-hm/ hm mango DeviceHealth "Device Health Monitor" "Mango Agile Networks" "Application for monitoring health of network devices." health

 

Please follow the commands/steps as per the guide/reference docs and you will be able to successfully build the sample app.

 

Please  let us know if you still face the issue.

 

Thanks,

HP SDN Team

sdnindia
Trusted Contributor

Re: SDN Sample Application

Hello Ankur,

Doing a follow up to check if you need any further assistance with respect to the query posted.
Please do let us know  if your problem is solved.


If you have more questions on the same topic please do reply on the same thread or open a new post if new topic.


Thanks
HP SDN Team