an asl appetizer asl!. overview what is asl? what can i do with asl? demo

17
An ASL Appetizer ASL !

Upload: diego-pope

Post on 26-Mar-2015

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

An ASL Appetizer

ASL!

Page 2: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Overview

What is ASL? What can I do with ASL? Demo

Page 3: 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

Page 4: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

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

Page 5: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

InCharge Binary

What are the InCharge binaries?

sm_server SAMIP AM/PM

NPM

sm_adapter

Trap Adapter

Syslog Adapter

EMOM Adapter

sm_trapd

brstart Broker

Page 6: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

InCharge Binary

What are the InCharge binaries?

sm_server

sm_adapter

sm_trapd

brstart

Platform Binary

Page 7: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

A Peek Inside….

Client API

Server API

ModelModelModel

ReposASLInterpreter

CorrelationEngine

ASL Threads

sm_whatever…

Page 8: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

What can ASL do?

Page 9: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Interact with a remote repository

Client API

Server API

Repos

sm_whatever…routers = getInstances(“Router”);foreach r (routers) { rObj = object(“Router”, r);}

Client

Server

sm_adapter –s REMOTE_SERVER

Page 10: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Interact with the local repository

Client API

Server API

Repos

sm_whatever…routers = self->getInstances(“Router”);foreach r (routers) { rObj = self->object(“Router”, r);}

sm_adapter

Page 11: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Subscribe to Topology and/or Events

Client API

Server API

Repos

sm_whatever…START { timeStamp : integer fs “NOTIFY” fs class : word fs instance : word fs event : word fs conf : integer fs}

Client

Server

sm_adapter –-subscribe=.*::.*::.*/pae

Page 12: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Read/Parse a file

Client API

Server API

Repos

sm_whatever…START { h : word c : word ..eol} do { adp->addPending(h,c,”Read from file”);}

plan_r.afnoc.mil poefluid.gnt.mil poeessence.brk.mil poe

sm_adapter --file=jdr.txt

Page 13: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Write to a file

Client API

Server API

Repos

sm_whatever…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-001Host im2-i-fms-001

sm_adapter –m sm_actions

Page 14: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Launch other ASL threads

Client API

Server API

Repos

sm_whatever…drv = create(“GA_Driver”, “myDrv”);drv->ReadsRulesFrom = create(“GA_RuleSet, “myRules”);drv->ReadsRulesFrom->fileName=“foo.asl”;drv->start();

Page 15: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Demo

Page 16: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

Summary

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

Page 17: An ASL Appetizer ASL!. Overview What is ASL? What can I do with ASL? Demo

For Further Information…

ASL Reference Guide asl_ref.pdf

Found in product’s ‘doc/pdf’ directory