Juniper JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010 Manual page 14

Junos xml management protocol guide
Hide thumbs Also See for JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010:
Table of Contents

Advertisement

Junos 10.3 Junos XML Management Protocol Guide
Part 3
Chapter 9
Chapter 10
Part 4
xiv
Writing Junos XML Protocol Client Applications
Writing Junos XML Protocol Perl Client Applications . . . . . . . . . . . . . . . . . 205
Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Installing the Junos XML Protocol Perl Client . . . . . . . . . . . . . . . . . . . . . . . . 209
Tutorial: Writing Perl Client Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Import Perl Modules and Declare Constants . . . . . . . . . . . . . . . . . . . . . . . . . 210
Connect to the Junos XML Protocol Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Satisfying Protocol Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Group Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Obtaining Application-Specific Parameters . . . . . . . . . . . . . . . . . . . . . . 215
Converting Disallowed Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Establishing the Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Submitting a Request to the Junos XML Protocol Server . . . . . . . . . . . . . . . . 217
Providing Method Options or Attributes . . . . . . . . . . . . . . . . . . . . . . . . . 218
Submitting a Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Example: Loading Configuration Statements . . . . . . . . . . . . . . . . . . . . . 222
Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Parsing and Formatting an Operational Response . . . . . . . . . . . . . . . . 226
Parsing and Outputting Configuration Data . . . . . . . . . . . . . . . . . . . . . . 228
Mapping CLI Commands to Perl Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Writing Junos XML Protocol C Client Applications . . . . . . . . . . . . . . . . . . . . 233
Establishing a Junos XML Protocol Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Accessing and Editing Device Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Index of Statements and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Copyright © 2010, Juniper Networks, Inc.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents