1 / 17

An ASL Appetizer

An ASL Appetizer. ASL!. Overview. What is ASL? What can I do with ASL? Demo. What is ASL?. Adapter Scripting Language Not a general purpose language Limited I/O (no user interaction) No library support The native scripting language of InCharge. Unique Strengths of ASL. A Parser

gaia
Télécharger la présentation

An ASL Appetizer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An ASL Appetizer ASL!

  2. Overview • What is ASL? • What can I do with ASL? • Demo

  3. What is ASL? • Adapter Scripting Language • Not a general purpose language • Limited I/O (no user interaction) • No library support • The native scripting language of InCharge

  4. Unique Strengths of ASL • A Parser • Makes it easy to parse files of any format • As powerful as regular expressions but easier to read! • Can connect two InCharge processes • Many built in connections are implemented in ASL • Embedded in all of the InCharge binaries • Runs inside of an InCharge server • Always available in any InCharge environment

  5. InCharge Binary • What are the InCharge binaries? sm_server SAM IP AM/PM NPM sm_adapter Syslog Adapter EMOM Adapter sm_trapd Trap Adapter brstart Broker

  6. InCharge Binary • What are the InCharge binaries? sm_server sm_adapter Platform Binary sm_trapd brstart

  7. Correlation Engine A Peek Inside…. Server API Repos ASL Threads ASL Interpreter Model Model Model sm_whatever… Client API

  8. What can ASL do?

  9. Interact with a remote repository Server API Repos sm_whatever… sm_adapter –s REMOTE_SERVER Client API routers = getInstances(“Router”); foreach r (routers) { rObj = object(“Router”, r); } Server Client

  10. Interact with the local repository Server API Repos sm_whatever… sm_adapter Client API routers = self->getInstances(“Router”); foreach r (routers) { rObj = self->object(“Router”, r); }

  11. Subscribe to Topology and/or Events Server API Repos sm_whatever… sm_adapter –-subscribe=.*::.*::.*/pae Client API START { timeStamp : integer fs “NOTIFY” fs class : word fs instance : word fs event : word fs conf : integer fs } Server Client

  12. Read/Parse a file Server API Repos sm_whatever… sm_adapter --file=jdr.txt Client API START { h : word c : word ..eol } do { adp->addPending(h,c,”Read from file”); } plan_r.afnoc.mil poe fluid.gnt.mil poe essence.brk.mil poe

  13. Write to a file Server API Repos sm_whatever… sm_adapter –m sm_actions Client API fo = create(“ACT_File”, “myFileObj”); Fo->fileName = “myAdapter.log”; foreach n (getInstances(“Node”) { obj = object(n); fo->writeln(obj->CreatonClass.”\t”.n); } Router gw1-i-fw-001 Host im2-i-fms-001

  14. Launch other ASL threads Server API Repos sm_whatever… Client API drv = create(“GA_Driver”, “myDrv”); drv->ReadsRulesFrom = create(“GA_RuleSet, “myRules”); drv->ReadsRulesFrom->fileName=“foo.asl”; drv->start();

  15. Demo

  16. Summary • We now know what is ASL • We now know what can ASL do • We have seen code examples • More questions….?

  17. For Further Information… • ASL Reference Guide • asl_ref.pdf • Found in product’s ‘doc/pdf’ directory

More Related