Last active
December 20, 2015 04:19
-
-
Save fatmcgav/6069595 to your computer and use it in GitHub Desktop.
Puppet F5 Device testing...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff lib/puppet/util/network_device/f5/device.rb | |
diff --git a/lib/puppet/util/network_device/f5/device.rb b/lib/puppet/util/network_device/f5/device.rb | |
index 013077e..8910412 100644 | |
--- a/lib/puppet/util/network_device/f5/device.rb | |
+++ b/lib/puppet/util/network_device/f5/device.rb | |
@@ -39,7 +39,7 @@ class Puppet::Util::NetworkDevice::F5::Device | |
# Access Common partition by default: | |
if @url.path == '' or @url.path == '/' | |
- @partition = 'Common' | |
+ @partition = '/Common' | |
else | |
@partition = /\/(.*)/.match(@url.path).captures | |
end | |
@@ -47,7 +47,7 @@ class Puppet::Util::NetworkDevice::F5::Device | |
# System.Session API not supported until V11. | |
Puppet.debug("Puppet::Device::F5: connecting to partition #{@partition}.") | |
if transport['System.Session'] | |
- transport['System.Session'].set_active_folder(@partition) | |
+ transport['System.Session'].set_active_folder(@partition) unless transport['System.Session'].get_active_folder == @partition | |
else | |
transport['Management.Partition'].set_active_partition(@partition) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jul 24 11:43:54 actint-star-f501 debug iControlPortal.cgi[19189]: Portal: User: gavinw, Folder: /Common | |
Jul 24 11:43:54 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:+++++++++++++++new+++++++++++++++++++ | |
Jul 24 11:43:54 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:Rule::get_list called by user "gavinw" | |
Jul 24 11:43:54 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:+++++++++++++++new+++++++++++++++++++ | |
Jul 24 11:43:54 actint-star-f501 debug iControlPortal.cgi[19189]: tpc:in GI::GetProto for name rule_name_SEQ, factory ptr is 586f3e42 (tag is 1083) | |
Jul 24 11:43:54 actint-star-f501 debug iControlPortal.cgi[19189]: tpc:lookup result for name rule_name_SEQ, my ptr 8692c18 | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: icontrol_portal:<?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <n1:get_list xmlns:n1="urn:iControl:LocalLB/Rule" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> </n1:get_list> </env:Body> </env:Envelope>te> </env:Body> </env:Envelope>nvelope>rol" xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="n2:Array"> <item> <rule_name xsi:type="xsd:string">Demo2</rule_name> <rule_definition xsi:type="xsd:string">when HTTP_REQUEST {}</rule_definition> </item> </rules> </n1:create> </env:Body> </env:Envelope>true"></rule_definition> </item> </rules> </n1:create> </env:Body> </env:Envelope> | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: Portal: User: gavinw, Folder: /Common | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:+++++++++++++++new+++++++++++++++++++ | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:Rule::get_list called by user "gavinw" | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:+++++++++++++++new+++++++++++++++++++ | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: tpc:in GI::GetProto for name rule_name_SEQ, factory ptr is 586f3e42 (tag is 1083) | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: tpc:lookup result for name rule_name_SEQ, my ptr 8692c18 | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: icontrol_portal:<?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <n1:create xmlns:n1="urn:iControl:LocalLB/Rule" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <rules xsi:nil="true"></rules> </n1:create> </env:Body> </env:Envelope>nvelope>rol" xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="n2:Array"> <item> <rule_name xsi:type="xsd:string">Demo2</rule_name> <rule_definition xsi:type="xsd:string">when HTTP_REQUEST {}</rule_definition> </item> </rules> </n1:create> </env:Body> </env:Envelope>true"></rule_definition> </item> </rules> </n1:create> </env:Body> </env:Envelope> | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:+++++++++++++++++++++++++++++++++++++ | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:Rule::create ( ) called by user "gavinw" | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:------------------------------------- | |
Jul 24 11:43:55 actint-star-f501 debug iControlPortal.cgi[19189]: Portal: User: gavinw, Folder: /Common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> /var/log/ltm <== | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: icontrol_portal:<?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <n1:create env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:n1="urn:iControl:LocalLB/Rule"> <rules xsi:type="n2:Array" n2:arrayType="n3:LocalLB.Rule.RuleDefinition[1]" xmlns:n3="urn:iControl" xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"> <item> <rule_name xsi:type="xsd:string">Demo3</rule_name> <rule_definition xsi:type="xsd:string">when HTTP_REQUEST {}</rule_definition> </item> </rules> </n1:create> </env:Body> </env:Envelope>true"></rule_definition> </item> </rules> </n1:create> </env:Body> </env:Envelope> | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: Portal:Session gavinw has expired | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:+++++++++++++++++++++++++++++++++++++ | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:Rule::create ( ) called by user "gavinw" | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB: [0] Rule name: Demo3 | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB: Rule definition: when HTTP_REQUEST {} | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: LocalLB:------------------------------------- | |
Jul 24 11:53:47 actint-star-f501 debug iControlPortal.cgi[19189]: Portal: User: gavinw, Folder: /Common | |
==> /var/log/audit <== | |
Jul 24 11:53:47 actint-star-f501 notice mcpd[5637]: 01070417:5: AUDIT - user gavinw - transaction #12850995-3 - object 0 - create { rule { rule_name "/Common/Demo3" rule_definition "when HTTP_REQUEST {}" } } [Status=Command OK] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment