Skip to content

Instantly share code, notes, and snippets.

View jkeroes's full-sized avatar

Joshua jkeroes

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!--Auto-generated by the type catalog local manager.-->
<DataModel namespace="http://im.ca.com/inventory" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ComponentFacet.xsd">
<FacetType name="IntegraFirewallSessions">
<Documentation>Firewall session counts</Documentation>
<FacetOf namespace="http://im.ca.com/core" name="Item" />
<Attribute name="ActiveSessions" cached="true" persistent="true" type="int">
<Documentation>The Active Sessions count.</Documentation>
</Attribute>
<Attribute name="ActiveSessionsICMP" cached="true" persistent="true" type="int">
@jkeroes
jkeroes / IntegraFirewallSessions.xml
Created February 12, 2014 21:04
IntegraFirewallSessions for PAN firewalls
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2013 CA. All rights reserved.
This software and all information contained therein is confidential and
proprietary and shall not be duplicated, used, disclosed or disseminated in any
way except as authorized by the applicable license agreement, without the
express written permission of CA. All authorized reproductions must be marked
DEBUG | nDemand-thread-3 | 2014-02-12 12:52:10,236 | nagedDeviceResourceDiscoveryImpl | l.ComponentCreatorOnReadListener 70 | y-manager.inventory.impl |
| DeviceID: 9834 onReadComplete - Results:Item ID=9834, error=SUCCESS
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.Descriptions = PAN Sessions
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.ActiveSessionsUDP = {0}
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.MaxSessions = {2097138}
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.ActiveSessions = {1}
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.Indexes = 0
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.ActiveSessionsPct = {0%}
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.Names = PAN Sessions
Attribute: {http://im.ca.com/normalizer}IntegraFirewallSessions.ActiveSessionsUtilization = {0}
======= Response for DC ogddevucaimdc01:eaa25053-2d85-4453-be6d-c6600bc7a39d =======
Search string 172.16.183.81 returned 130 results (86,522 bytes)
Detailed SNMP Log for 172.16.183.81
Feb 11 14:29:31.190: Enabling SNMP logging
Feb 11 14:29:50.855: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873277, errorStatus=Success(0), errorIndex=50, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.856: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873278, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.856: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873279, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.856: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873280, errorStatus=Success(0), errorIndex=50, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.882: Received SNMP response [Resp Time: 24 ms / Trans
======= Response for DC ogddevucaimdc01:eaa25053-2d85-4453-be6d-c6600bc7a39d =======
Search string 172.16.183.81 returned 420 results (330,964 bytes)
On-Demand Log for 172.16.183.81
Feb 06 11:19:20.824: Scheduled poll request at offset=14449 request=IcmpPollRequest [serialVersionUID=1, dcmId=ogddevucaimdc01:eaa25053-2d85-4453-be6d-c6600bc7a39d, itemId=9572, deviceItemId=9572, hostname=, internetAddress=172.16.183.81, numberOfTries=1, timeout=3000, packetSize=64, pollGroupId=101, cycles=0]
Feb 06 11:19:20.943: Received Poll Request: [SnmpPollRequest [internetAddress=172.16.183.81, pollGroupId=151, deviceItemId=9572, itemIdMap={ (item id=9572, index list=[])} ] ]
Feb 06 11:19:20.943: Scheduled poll request at offset=281902 request=SnmpPollRequest [internetAddress=172.16.183.81, pollGroupId=151, deviceItemId=9572, itemIdMap={ (item id=9572, index list=[])} ]
Feb 06 11:19:20.943: Successfully scheduled poll request for pollGroupId=151, IP=172.16.183.81
Feb 06 11:19:20.971: Received Poll Request: [SnmpPollRequest
@jkeroes
jkeroes / gist:8945747
Created February 11, 2014 22:39
pan fw01
======= Response for DC ogddevucaimdc01:eaa25053-2d85-4453-be6d-c6600bc7a39d =======
Search string 172.16.183.81 returned 98 results (71,022 bytes)
Detailed SNMP Log for 172.16.183.81
Feb 11 14:29:31.190: Enabling SNMP logging
Feb 11 14:29:50.855: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873277, errorStatus=Success(0), errorIndex=50, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.856: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873278, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.856: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873279, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.856: Send SNMP request [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=1873280, errorStatus=Success(0), errorIndex=50, VBS[1.3.6.1.2.1.1.3.0 = Null]]
Feb 11 14:29:50.882: Received SNMP response [Resp Time: 24 ms / Trans
@jkeroes
jkeroes / exchange-email.pl
Last active December 20, 2015 21:08
Exchange Perl client
#!/usr/bin/env perl
use 5.10.0;
use autodie;
use Email::Folder::Exchange::EWS;
use Email::MIME;
my $uri = 'https://example.com/ews/exchange.asmx';
my $user = 'DOMAIN\userid';
my $pass = 'password1';
#!/usr/bin/env perl
use 5.10.0;
use Email::Folder::Exchange::EWS;
use Email::MIME;
use Try::Tiny;
use YAML::XS;
my $uri = 'https://secure.integratelecom.com/ews/exchange.asmx';
my $user = 'INTEGRA\jkeroes';
appname: CA-API
charset: 'UTF8'
content_type: "text/html"
template: "template_toolkit"
session: 'YAML'
allow_blessed: 1
convert_blessed: 1

Continuous Integration

Continuous Integration (CI) is the autotesting of unit tests.

Why autotest?

There are many good answers. First and most importantly, developers get fast notification of when and where defects were committed to the source code repo. Testing on multiple platforms and environments also becomes possible and automatic. Invoking a unit test build manually is silly when we have computers. Let's be smart and lazy.

Problem