Scripting and automation with the Men & Mice Suite

14
Scripting and automation with the Men & Mice Suite © Men & Mice www.menandmice.com

description

The powerful SOAP interface & how and where scripts can be integrated Beside the Men & Mice Management Console, the Web Interface and the command line interface (CLI) there are other ways to access the Men & Mice Suite.

Transcript of Scripting and automation with the Men & Mice Suite

Page 1: Scripting and automation with the Men & Mice Suite

Scripting!and!automation!with!the

Men!&!Mice!Suite

©!Men!&!Mice!!www.menandmice.com!

Page 2: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

Agenda

SOAP!interface!

Script!hooks!

QA

Page 3: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

SOAP!interface

Documentation!!

Access

Referencing!objects!(zones,!ranges...)

Filtering

Page 4: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!interface!overview

M&M Web Interface / SOAP interface

Script or EXE

XML

M&M Central

1231/tcp

80/443/tcp

M&M protocol

Windows DNS

Windows DHCP

M&M DNS/DHCP ApplianceLinux/Unix DNS

Linux/Unix DHCP

M&M Caching Appliance

M&M protocol

4151/tcp

1337/tcp

Page 5: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!XML!call!GetDNSZones

<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body> <GetDNSZones xmlns='http://menandmice.com/webservices/'> <filter>name:!arpa.$ type:Master</filter> <sortBy>name</sortBy> <sortOrder>Ascending</sortOrder> <offset>0</offset> <limit>150</limit> <session>X0o4PX6Ec0rUNqZcXArA</session> </GetDNSZones> </soap:Body></soap:Envelope>

Page 6: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!XML!response!GetDNSZones

<?xml version="1.0" encoding="utf-8" ?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">! <soap:Body>! ! <GetDNSZonesResponse xmlns="http://menandmice.com/webservices/">! ! ! <dnsZones>! ! ! ! <dnsZone>! ! ! ! ! <ref>{#4-#1}</ref>! ! ! ! ! <name>example.com.</name>! ! ! ! ! <dynamic>0</dynamic>! ! ! ! ! <adIntegrated>0</adIntegrated>! ! ! ! ! <dnsViewRef>{#5-#1}</dnsViewRef>! ! ! ! ! <authority>dns.example.com.</authority>! ! ! ! ! <type>Master</type>! ! ! ! ! <dnssecSigned>0</dnssecSigned>! ! ! ! ! <kskIDs />! ! ! ! ! <zskIDs />! ! ! ! ! <customProperties />! ! ! ! </dnsZone>! ! ! </dnsZones>! ! ! <totalResults>1</totalResults>! ! </GetDNSZonesResponse>! </soap:Body></soap:Envelope>

Page 7: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!Documentation

Online!documentation!(also!User!Guide!and!other!documentation!available):

http://docs.menandmice.com!

Knowledge!base:

http://kb.menandmice.com

M&M!Central!built-in!SOAP!docs:

search!in!the!KB!for:!“soap!documentation”

Page 8: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!access!permissions

M&M!access!permissions!are!applied

Necessary!access!bit!in!Tools->Global!Access

Page 9: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!client!access

Create!a!SOAP!client!manually!(or!use!some!library,!e.g.!for!Perl!SOAP::Lite!

Use!the!WSDL!URL!to!create!a!proxy!(e.g.!C#!or!Java)

Use!our!SOAP!wrapper!scripts!for!Python!(uses!Suds)!or!Powershell!(!uses!New-

WebServiceProxy)

http://kb.menandmice.com

Page 10: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!referencing!objects

1.Human!friendly!version:

[[servername:]viewname:]zonenameExample:

Zone:!example.com.

DNS!Server:!dns.example.com.

on!a!Microsoft!DNS!(=no!view):

“dns.example.com.::example.com.”

2.Machine!friendly!version

“{#objType-#ID in DB}”!Example:

“{#4-#1}”

Page 11: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

M&M!SOAP!filter!keywords

“:”!-!Properties!(search!pattern!in!one!column)

“!“!-!AND!(just!a!space)

“|”!-!OR

“^”!-!starts!with

“$”!-!ends!with

“!”!-!not

Page 12: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

SOAP!interface!

Script!hooks!

QA

Agenda

Page 13: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

Script!hooks

External!scripts

(ScriptRunner!user!account)

Subnet!monitoring!

Script!scheduler!

Page 14: Scripting and automation with the Men & Mice Suite

©!Men!&!Mice!!www.menandmice.com!

Q&A

Questions?