27

UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

Embed Size (px)

Citation preview

Page 1: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom
Page 2: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

UCS Director Creating and Utilizing Custom Tasks and Script Modules

John McDonough, Technical Leader – Developer Evangelist

DEVNET-2564

Page 3: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Cisco Spark

Questions? Use Cisco Spark to communicate with the speaker after the session

1. Find this session in the Cisco Live Mobile App

2. Click “Join the Discussion”

3. Install Spark or go directly to the space

4. Enter messages/questions in the space

How

cs.co/ciscolivebot#DEVNET-2564

Page 4: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

• Cisco UCS Director – Creating and Utilizing Custom Tasks and Script Modules

• Create a Script Module

• Create a Custom Task

• Create a Workflow Utilizing the Custom Task and Script Module

• Conclusion

Agenda – DEVNET-2564

Page 5: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

UCS DirectorCreate a Script Module

Page 6: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Script Module

6DEVNET-2564

Page 7: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Script Module – View Details

7DEVNET-2564

Page 8: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Script Module – Add Library

8DEVNET-2564

Page 9: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Script Module – Add Jar

9DEVNET-2564

Page 10: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

UCS Director Create a Custom Task

Page 11: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Custom Task – Information

11DEVNET-2564

Page 12: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Custom Task – Inputs

12DEVNET-2564

Page 13: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Custom Task – Inputs

13DEVNET-2564

Page 14: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Custom Task – Outputs & Controller

14DEVNET-2564

Page 15: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Custom Task – Script

15DEVNET-2564

Page 16: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 16DEVNET-2564

Create a Custom Task – Scriptvar num_1 = Number(input.num_1);

var num_2 = Number(input.num_2);

logger.addInfo("Begin Script Module Demo");

// Load Script Module Jar File

logger.addInfo("Loading Script Module Jar MathDemo.jar");

loadJar("MathModule/MathDemo.jar");

// Import MathDemo Package

importPackage(com.cisco.devnet);

var jar_demo = new MathDemo();

logger.addInfo("Script Module Jar Addition Demo");

var jar_sum = jar_demo.add(num_1, num_2);

logger.addInfo("Jar File Addition Result: " + jar_sum);

logger.addInfo("Script Module Jar Multiply Demo");

var jar_mul = jar_demo.mul(num_1, num_2);

logger.addInfo("Jar File Multiply Result: " + jar_mul);

// Load Script Module Librarylogger.addInfo("Loading Script Module Library mathdemolib");

loadLibrary("MathModule/mathdemolib");

logger.addInfo("Script Module Library Addition Demo");

var lib_add = add(num_1, num_2);

logger.addInfo("Library Addition Result: " + lib_add);logger.addInfo("Script Module Library Multiply Demo");

var lib_mul = mul(num_1, num_2);

logger.addInfo("Library Multiply Result: " + lib_mul);logger.addInfo("End Script Module Demo");

Page 17: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

UCS DirectorImport a Workflow Utilizing the Custom Task and Script Module

Page 18: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Create a Custom Task – Script

18DEVNET-2564

Page 19: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

Conclusion

Page 20: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

DevNet ZoneGet hands-on with APIs and SDKs in the

LEARN | CODE | INSPIRE | CONNECT

• Classrooms –Learn about a specific topic/technology

• Panels –Get inspired & interact with industry experts

• NEW! Hack, Defend and Win! –Embrace your inner hacker, then defend the network! Black Hat, White Hat Security Challenge

• Connected Women’s Event –Join Susie Wee on Monday for this event…followed by a DevNet Zone open house

• DevNet Sandbox –Explore free technology-packed 24x7 labs and play IoT foosball! Go for a 5-minute mini-hack challenge or complete all three in 15-minutes to win

• NEW! Application Developer Zone and Challenge –Win a special-edition t-shirt and bragging rights…complete a learning lab, a workshop, and an application developer demo

• Learning Labs –Find an open seat to start coding with self-paced tutorials (experts available)

• Demos –Exciting demos and inspiring partner solutions showcase

• Workshops – code with an instructor in a hands-on session

@CiscoDevNet | #DevNet| #CLEUR

In the DevNet Zone we offer:

Join DevNet!developer.cisco.com/join/CLEUR18

All DevNet members win a prize, visit the Info Desk to

learn more!

Page 21: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

Hack, Defend, and Win!

Come play the Black Hat, White Hat Security Challenge in the DevNet Zone!

>>> Hack

>>> Defend

>>> Win

Embrace your inner hacker and try to access the network

Be the heavily-armed Cisco defender that saves the day

Collect your prize and claim your bragging rights

@CiscoDevNet

#DevNet | #CLEUR

Page 22: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Cisco Spark

Questions? Use Cisco Spark to communicate with the speaker after the session

1. Find this session in the Cisco Live Mobile App

2. Click “Join the Discussion”

3. Install Spark or go directly to the space

4. Enter messages/questions in the space

How

cs.co/ciscolivebot#DEVNET-2564

Page 23: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

• Please complete your Online Session Evaluations after each session

• Complete 4 Session Evaluations & the Overall Conference Evaluation (available from Thursday) to receive your Cisco Live T-shirt

• All surveys can be completed via the Cisco Live Mobile App or the Communication Stations

Don’t forget: Cisco Live sessions will be available for viewing on-demand after the event at www.ciscolive.com/global/on-demand-library/.

Complete Your Online Session Evaluation

Page 24: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public

Continue Your Education

• DevNet: https://developer.cisco.com

• DevNet Learning Labs: https://learninglabs.cisco.com

• Demos in the Cisco campus

• Walk-in Self-Paced Labs

• Tech Circle

• Meet the Engineer 1:1 meetings

• Related sessions

24DEVNET-2564

Page 25: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 25

Got more questions? Come find me!

[email protected]

@johnamcdonough

http://github.com/movinalot

@CiscoDevNet

facebook.com/ciscodevnet

http://github.com/CiscoDevNet

DEVNET-2564

Page 26: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom

Thank you

Page 27: UCS Director Creating and Utilizing Custom Tasks and · •Cisco UCS Director –Creating and Utilizing Custom Tasks and Script Modules • Create a Script Module • Create a Custom