<src_addr>any</src_addr>
</src_addr_collection>
<dst_addr_collection>
<dst_addr>any</dst_addr>
</dst_addr_collection>
<service_collection>
<service>any</service>
</service_collection>
<action>
<deny>null</deny>
</action>
<preferred-id>3</preferred-id>
<count>
<disabled>null</disabled>
</count>
<target_collection>
<target>any</target>
</target_collection>
<auths>
<no-auth>null</no-auth>
</auths>
<traffic>
<enabled>false</enabled>
</traffic>
</rules>
</rules_collection>
</rb_firewall>
Sample Code
* Inserts DB with nsmpolicy object with a default firewall rule base specified
in XML data.
*
* Prerequisite:
* No nsmpolicy and rule base are allowed with the same name as that in
the input.*/
public void testInsertNsmPolicyObject() {
try {
File nsmPolicyFile = new File( File.sep pathOfInput
+
"/Input/" + "testPolicyInsert.xml");
File rbFile = new File( File.sep pathO
"/Input/" +
"testRuleBaseFirewallInsert.xml");
System.out.println("Running testInsertNsmPolicyObject()");
//creates an object of ModifyObjectViewRequest
ModifyObjectViewRequest request = new ModifyObjectViewRequest();
request.setAuthToken(DataCentricServiceTest.authToken);
//creates an object of ModifyViewCommandType
ModifyViewCommandType modifyCmd = new ModifyViewCommandType();
InsertObjectViewType insertObject = new InsertObjectViewType();
modifyCmd.setInsertObject(insertObject);
insertObject.setCategory("nsmpolicy");
insertObject.setDomainId(new UnsignedShort("1"));
//reads the policy in XML format from file "testPolicyInsert.xml"
XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
XMLStreamReader parser = xmlInputFactory.createXMLStreamReader
(new FileInputStream(nsmPolicyFile));
StAXOMBuilder builder = new StAXOMBuilder(parser);
Copyright © 2010, Juniper Networks, Inc.
98
Network and Security Manager 2010.4 API Guide
Summary of Contents for NETWORK AND SECURITY MANAGER 2010.4 - API GUIDE REV 1
Page 6: ...Copyright 2010 Juniper Networks Inc vi...
Page 10: ...Copyright 2010 Juniper Networks Inc x Network and Security Manager 2010 4 API Guide...
Page 12: ...Copyright 2010 Juniper Networks Inc xii Network and Security Manager 2010 4 API Guide...
Page 20: ...Copyright 2010 Juniper Networks Inc 2 Network and Security Manager 2010 4 API Guide...
Page 24: ...Copyright 2010 Juniper Networks Inc 6 Network and Security Manager 2010 4 API Guide...
Page 34: ...Copyright 2010 Juniper Networks Inc 16 Network and Security Manager 2010 4 API Guide...
Page 92: ...Copyright 2010 Juniper Networks Inc 74 Network and Security Manager 2010 4 API Guide...
Page 98: ...Copyright 2010 Juniper Networks Inc 80 Network and Security Manager 2010 4 API Guide...
Page 100: ...Copyright 2010 Juniper Networks Inc 82 Network and Security Manager 2010 4 API Guide...
Page 112: ...Copyright 2010 Juniper Networks Inc 94 Network and Security Manager 2010 4 API Guide...
Page 128: ...Copyright 2010 Juniper Networks Inc 110 Network and Security Manager 2010 4 API Guide...
Page 138: ...Copyright 2010 Juniper Networks Inc 120 Network and Security Manager 2010 4 API Guide...
Page 152: ...Copyright 2010 Juniper Networks Inc 134 Network and Security Manager 2010 4 API Guide...
Page 165: ...PART 6 Index Index on page 149 147 Copyright 2010 Juniper Networks Inc...
Page 166: ...Copyright 2010 Juniper Networks Inc 148 Network and Security Manager 2010 4 API Guide...