diff --git a/pandora_plugins/Advanced Log Parser/logparser.unix.sample.conf b/pandora_plugins/Advanced Log Parser/logparser.unix.sample.conf new file mode 100644 index 0000000000..7ddbc2c642 --- /dev/null +++ b/pandora_plugins/Advanced Log Parser/logparser.unix.sample.conf @@ -0,0 +1,88 @@ +# WARNING WITH BLANK SPACES AFTER LINE CONTENT! +# This can cause lots of headaches!. + + +# Include, to load extenal/aditional configuration files +# include /tmp/my_other_configuration.conf + +# Directory where temporal indexes will be stored (/tmp by default) +#index_dir /tmp + +# Log problems with the logparser, (/tmp/pandora_logparser.log by default) +#logfile /tmp/pandora_logparser.log + +# Sample of logparser using a single file and several match cases + + + +# Sample of a single log match +log_begin +log_module_name Weekly +log_location_file /var/log/weekly.out +log_description Errors cannot find +log_type return_lines +log_regexp_begin +log_regexp_rule output +log_regexp_severity WARNING +log_return_message Cannot find process to run +log_regexp_end +log_end + + +# Sample of wildcard matching of several logfiles within the same module +log_begin +log_rotate_mode md5 +log_module_name system_log +log_force_readall +log_location_multiple /var/log/system.log* +log_description Errors cannot find +log_type return_lines +log_regexp_begin +log_regexp_rule Cannot +log_regexp_severity WARNING +log_return_message Cannot find process to run +log_regexp_end +log_end + + +# Sample of several wildcard matching on the same file +log_begin +log_module_name hits_apache +log_location_file /var/log/apache2/access_log +log_description Access log from Apache, we will get the integria access +#log_create_module_for_each_log +log_type return_ocurrences +log_regexp_begin +log_regexp_rule Error -($1)\-($2) [0-9a-zA-Z]* +log_regexp_severity WARNING +log_return_message Otro bonito texto de error +log_regexp_end +log_regexp_begin +log_regexp_rule File\sdoes\snot\sexist +log_regexp_severity WARNING +log_regexp_end +log_regexp_begin +log_regexp_rule pandora_backend\.html +log_regexp_severity WARNING +log_return_message Something possible harmful happen +log_regexp_end +log_end + +# Sample of wildcard matching of several logfiles with diferent dynamic modules +log_begin +log_rotate_mode inode +log_module_name test_log +log_force_readall +# If enabled, this token will create a different module using the module_name +# provided plus the full logfilename replacing / with " ". +log_create_module_for_each_log +log_location_multiple /tmp/log*/hola* +log_description Errors cannot find +log_type return_lines +log_regexp_begin +log_regexp_rule adios +log_regexp_severity WARNING +log_return_message Cannot find process to run +log_regexp_end +log_end + diff --git a/pandora_plugins/Advanced Log Parser/logparser.windows.sample.conf b/pandora_plugins/Advanced Log Parser/logparser.windows.sample.conf new file mode 100644 index 0000000000..0f65971740 --- /dev/null +++ b/pandora_plugins/Advanced Log Parser/logparser.windows.sample.conf @@ -0,0 +1,30 @@ +# WARNING WITH BLANK SPACES AFTER LINE CONTENT! +# This can cause lots of headaches!. + + +# Include, to load extenal/aditional configuration files +# include /tmp/my_other_configuration.conf + +# Directory where temporal indexes will be stored (/tmp by default) +index_dir C:\Users\slerena\Desktop\tmp + +# Log problems with the logparser, (/tmp/pandora_logparser.log by default) +logfile c:\Users\slerena\Desktop\tmp\pandora_logparser.log + +# Sample of logparser using a single file and several match cases + + + +# Sample of a single log match +log_begin +log_module_name WindowsUpdate +log_force_readall +log_location_file c:\Windows\WindowsUpdate.log +log_description updates detected +log_type return_lines +log_regexp_begin +log_regexp_rule updates detected +log_regexp_severity WARNING +log_return_message Updates detected +log_regexp_end +log_end diff --git a/pandora_plugins/Advanced Log Parser/pandora_logparser.pl b/pandora_plugins/Advanced Log Parser/pandora_logparser.pl new file mode 100644 index 0000000000..403660d1af --- /dev/null +++ b/pandora_plugins/Advanced Log Parser/pandora_logparser.pl @@ -0,0 +1,738 @@ +#!/usr/bin/perl +############################################################################### +# Pandora FMS Agent Plugin for ADVANCED log parsing +# Copyright (c) 2011-2015 Sancho Lerena +# Copyright (c) 2011-2015 Artica Soluciones Tecnologicas S.L. +# _______ __ __ _______ _______ +# | _ |.----.| |_|__|.----.---.-. | __|_ _| +# | || _|| _| || __| _ | |__ | | | +# |___|___||__| |____|__||____|___._| |_______| |___| +# +# +# ARTICA SOLUCIONES TECNOLOGICAS +# http://www.artica.es +# +# v1r3 +# Change log (v1r3 - Ago 2015) +# * Solved lot of issues present in r2 +# * Added support for wildcards +# * Identified problem with perl <5.13. It won't work on old Perl. Use binary! +############################################################################### + +use strict; +use Data::Dumper; +use File::Basename; + +# Used to calculate the MD5 checksum of a string +use constant MOD232 => 2**32; + +my @config_file; # Stores the config file contents, line by line +my %plugin_setup; # Hash with this plugin setup + +my $archivo_cfg = $ARGV[0]; # External main config file +my $log_items = 0; # Stores total of log definitions in the conf file +my $reg_exp = 0; # Total regexps +my $version; +$version = "v1r3"; # Actual plugin's version + +############################################################################### +# SUB load_external_setup +# Receives a configuration filename to load in the configuration hash +############################################################################### + +sub load_external_setup ($){ + + my $archivo_cfg = $_[0]; + my $buffer_line; + + # Collect items from config file and put in an array + if (! open (CFG, "< $archivo_cfg")) { + print "[ERROR] Error opening configuration file $archivo_cfg: $!.\n"; + exit 1; + } + + while (){ + $buffer_line = $_; + # Parse configuration file, this is specially difficult because can contain regexp, with many things + if ($buffer_line !=~ /^\#/){ # begins with anything except # (for commenting) + if ($buffer_line =~ m/(.+)\s(.*)/){ + push @config_file, $buffer_line; + } + } + } + close (CFG); +} + + +############################################################################### +# MD5 leftrotate function. See http://en.wikipedia.org/wiki/MD5#Pseudocode. +############################################################################### +sub leftrotate ($$) { + my ($x, $c) = @_; + + return (0xFFFFFFFF & ($x << $c)) | ($x >> (32 - $c)); +} + +############################################################################### +# Initialize some variables needed by the MD5 algorithm. +# See http://en.wikipedia.org/wiki/MD5#Pseudocode. +############################################################################### +my (@R, @K); +sub md5_init () { + + # R specifies the per-round shift amounts + @R = (7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, + 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, + 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, + 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21); + + # Use binary integer part of the sines of integers (radians) as constants + for (my $i = 0; $i < 64; $i++) { + $K[$i] = floor(abs(sin($i + 1)) * MOD232); + } +} + +############################################################################### +# Return the MD5 checksum of the given string. +# Pseudocode from http://en.wikipedia.org/wiki/MD5#Pseudocode. +############################################################################### +sub md5 ($) { + my $str = shift; + + # Note: All variables are unsigned 32 bits and wrap modulo 2^32 when calculating + + # Initialize variables + my $h0 = 0x67452301; + my $h1 = 0xEFCDAB89; + my $h2 = 0x98BADCFE; + my $h3 = 0x10325476; + + # Pre-processing + my $msg = unpack ("B*", pack ("A*", $str)); + my $bit_len = length ($msg); + + # Append "1" bit to message + $msg .= '1'; + + # Append "0" bits until message length in bits ≡ 448 (mod 512) + $msg .= '0' while ((length ($msg) % 512) != 448); + + # Append bit /* bit, not byte */ length of unpadded message as 64-bit little-endian integer to message + $msg .= unpack ("B64", pack ("VV", $bit_len)); + + # Process the message in successive 512-bit chunks + for (my $i = 0; $i < length ($msg); $i += 512) { + + my @w; + my $chunk = substr ($msg, $i, 512); + + # Break chunk into sixteen 32-bit little-endian words w[i], 0 <= i <= 15 + for (my $j = 0; $j < length ($chunk); $j += 32) { + push (@w, unpack ("V", pack ("B32", substr ($chunk, $j, 32)))); + } + + # Initialize hash value for this chunk + my $a = $h0; + my $b = $h1; + my $c = $h2; + my $d = $h3; + my $f; + my $g; + + # Main loop + for (my $y = 0; $y < 64; $y++) { + if ($y <= 15) { + $f = $d ^ ($b & ($c ^ $d)); + $g = $y; + } + elsif ($y <= 31) { + $f = $c ^ ($d & ($b ^ $c)); + $g = (5 * $y + 1) % 16; + } + elsif ($y <= 47) { + $f = $b ^ $c ^ $d; + $g = (3 * $y + 5) % 16; + } + else { + $f = $c ^ ($b | (0xFFFFFFFF & (~ $d))); + $g = (7 * $y) % 16; + } + + my $temp = $d; + $d = $c; + $c = $b; + $b = ($b + leftrotate (($a + $f + $K[$y] + $w[$g]) % MOD232, $R[$y])) % MOD232; + $a = $temp; + } + + # Add this chunk's hash to result so far + $h0 = ($h0 + $a) % MOD232; + $h1 = ($h1 + $b) % MOD232; + $h2 = ($h2 + $c) % MOD232; + $h3 = ($h3 + $d) % MOD232; + } + + # Digest := h0 append h1 append h2 append h3 #(expressed as little-endian) + return unpack ("H*", pack ("V", $h0)) . unpack ("H*", pack ("V", $h1)) . unpack ("H*", pack ("V", $h2)) . unpack ("H*", pack ("V", $h3)); +} + +############################################################################### +# SUB log_msg +# Print a log message. +############################################################################### + +sub log_msg ($) { + my $log_msg = $_[0]; + + if (! open (LOG, "> ".$plugin_setup{"logfile"})) { + print "[ERROR] Error opening internal logfile ".$plugin_setup{"logfile"}."\n"; + exit 1; + } + + print LOG $log_msg; + close (LOG); +} + + +############################################################################### +# SUB error_msg +# Print a log message and exit (fatal log error message) +############################################################################### +sub error_msg ($) { + my $log_msg = $_[0]; + + log_msg ($log_msg); +} + +############################################################################### +# parse_config +# +# This function load configuration tokens and store in a global hash +# called %plugin_setup accesible on all program. +############################################################################### + +sub parse_config { + + my $tbuf; + my $log_block = 0; + my $reg_exp_rule = 0; + my $parametro; + + # Some default options + $plugin_setup{"index_dir"} = "/tmp"; + $plugin_setup{"logfile"} = "/tmp/pandora_logparser.log"; + $plugin_setup{"log_rotate_mode"}="inode"; + + foreach (@config_file){ + $parametro = $_; + + if ($parametro =~ m/^include\s+(.*)$/i) { + load_external_setup ($1); + } + + if ($parametro =~ m/^index_dir\s+(.*)$/i) { + $plugin_setup{"index_dir"} = $1; + } + + if ($parametro =~ m/^logfile\s+(.*)$/i) { + $plugin_setup{"logfile"} = $1; + } + + if ($parametro =~ m/^log\_rotate\_mode\s+(.*)$/i) { + $plugin_setup{"log_rotate_mode"} = $1; + } + + # Detect begin of log definition + if ($parametro =~ m/^log\_begin/i) { + $log_block = 1; + } + + # Log definition parsing mode + if ($log_block == 1){ + + if ($parametro =~ m/^log\_module\_name\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"name"} = $1; + } + + if ($parametro =~ m/^log\_type\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"type"} = $1; + } + + if ($parametro =~ m/^log\_create_module_for_each_log/i) { + $plugin_setup{"log"}->[$log_items]->{"module_for_each_log"} = 1; + } else { + if (!defined($plugin_setup{"log"}->[$log_items]->{"module_for_each_log"})){ + $plugin_setup{"log"}->[$log_items]->{"module_for_each_log"} = 0; + } + } + + if ($parametro =~ m/^log\_force\_readall/i) { + $plugin_setup{"log"}->[$log_items]->{"readall"} = 1; + } else { + if (!defined($plugin_setup{"log"}->[$log_items]->{"readall"})){ + $plugin_setup{"log"}->[$log_items]->{"readall"} = 0; + } + } + + if ($parametro =~ m/^log\_location\_file\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"log_location_file"} = $1; + } + + if ($parametro =~ m/^log\_location\_exec\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"log_location_exec"} = $1; + } + + if ($parametro =~ m/^log\_location\_multiple\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"log_location_multiple"} = $1; + } + + if ($parametro =~ m/^log\_description\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"description"} = $1; + } + + if ($parametro =~ m/^log\_regexp\_begin/i) { + $log_block = 2; + $reg_exp_rule = 0; + } + + if ($parametro =~ m/^log\_end/i) { + $log_items++; + $log_block = 0; + $reg_exp=0; + } + } + + if ($log_block == 2){ + + if ($parametro =~ m/^log_regexp_severity\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"regexp"}->{$reg_exp}->{"severity"} = $1; + } + + if ($parametro =~ m/^log_regexp_rule\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"regexp"}->{$reg_exp}->{"rule"} = $1; + } + + if ($parametro =~ m/^log_return_message\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"regexp"}->{$reg_exp} -> {"message"} = $1; + } + + if ($parametro =~ m/^log_action\s+(.*)$/i) { + $plugin_setup{"log"}->[$log_items]->{"regexp"}->{$reg_exp} -> {"action"} = $1; + } + + if ($parametro =~ m/^log\_regexp\_end/i) { + $log_block = 1; + $reg_exp++; + } + } + } +} + +############################################################################### +# clean_blank +# +# This function return a string without blanspaces, given a simple text string +############################################################################### + +sub clean_blank($){ + my $input = $_[0]; + $input =~ s/[\s\r\n]*//g; + return $input; +} + + +############################################################################### +# SUB load_idx +# +# Load index file and Logfile +############################################################################### + +sub load_idx ($$) { + my $Idx_file = $_[0]; + my $Log_file = $_[1]; + + my $line; + my $current_ino; + my $current_size; + my $Idx_pos; + my $Idx_ino; + + log_msg("Loading index file $Idx_file"); + + open(IDXFILE, $Idx_file) || error_msg("Error opening file $Idx_file: " . $!); + + # Read position and date + $line = ; + ($Idx_pos, $Idx_ino) = split(' ', $line); + + close(IDXFILE); + + # Reset the file index if the file has changed + my $current_ino = (stat($Log_file))[1]; + my $current_size = (stat($Log_file))[7]; + if (($current_ino != $Idx_ino) || ($current_size < $Idx_pos)) { + log_msg("File changed, resetting index"); + + $Idx_pos = 0; + $Idx_ino = $current_ino; + } + + return ($Idx_pos, $Idx_ino); +} + +############################################################################### +# SUB save_idx +# +# Save index file, fiven idxfile, logfile, idxpos and idxinode +############################################################################### + +sub save_idx ($$$$) { + + my $Idx_file = $_[0]; + my $Log_file = $_[1]; + my $Idx_pos = $_[2]; + my $Idx_ino = $_[3]; + + log_msg("Saving index file $Idx_file"); + + open(IDXFILE, "> $Idx_file") || error_msg("Error opening file $Idx_file: ". $!); + print (IDXFILE $Idx_pos . " " . $Idx_ino); + + close(IDXFILE); + + return; +} + +############################################################################### +# SUB create_idx +# +# Create index file. +############################################################################### + +sub create_idx ($$) { + my $Idx_file = $_[0]; + my $Log_file = $_[1]; + my $first_line; + + log_msg("Creating index file $Idx_file"); + + open(LOGFILE, $Log_file) || error_msg("Error opening file $Log_file: " . $!); + + # Go to EOF and save the position + seek(LOGFILE, 0, 2); + my $Idx_pos = tell(LOGFILE); + + close(LOGFILE); + + # Save the file inode number + my $Idx_ino = (stat($Log_file))[1]; + + # Sometimes returns "blank" inode ¿? + if ($Idx_ino eq ""){ + $Idx_ino = 0; + } + + # Save the index file + save_idx($Idx_file, $Log_file, $Idx_pos, $Idx_ino); + + return; +} + +############################################################################### +# SUB parse_log +# +# Parse log file starting from position $Idx_pos. +############################################################################### + +sub parse_log ($$$$$$$) { + my $Idx_file = $_[0]; + my $Log_file = $_[1]; + my $Idx_pos = $_[2]; + my $Idx_ino = $_[3]; + my $Module_name = $_[4]; + my $type = $_[5]; + my $regexp_collection = $_[6]; # hash of rules + my $line; + my $count = 0; + + my $action = ""; + my $severity = ""; + my $rule = ""; + my $buffer = ""; + + # Parse log file + + # Open log file for reading + open(LOGFILE, $Log_file) || error_msg("Error opening file $Log_file: " . $!); + + # Go to starting position + seek(LOGFILE, $Idx_pos, 0); + + $buffer .= "\n"; + $buffer .= "\n"; + $buffer .= "\n"; + + if ($type eq "return_ocurrences"){ + $buffer .= "generic_data\n"; + } else { + $buffer .= "\n"; + $buffer .= "\n"; + } + + while ($line = ) { + while (my ($key, $value) = each (%{$regexp_collection})) { + # For each regexp block + + $rule = $value->{"rule"}; + + #print "[DEBUG] Action: ".$value->{"action"} ."\n"; + #print "[DEBUG] Severity: ".$value->{"severity"} ."\n"; + #print "[DEBUG] Message: ".$value->{"message"} ."\n"; + #print "[DEBUG] Rule: ".$value->{"rule"} ."\n"; + + if ($line =~ m/$rule/i) { + + # Remove the trailing '\n' + chop($line); + + # depending on type: + if ($type eq "return_message"){ + $buffer .= "{"message"}."]]>\n"; + } + + if ($type eq "return_lines"){ + $buffer .= "\n"; + } + + # Critical severity will prevail over other matches + if ($severity eq ""){ + $severity = $value->{"severity"}; + } elsif ($severity ne "CRITICAL"){ + $severity = $value->{"severity"}; + } + + $action = $value->{"action"}; + $count++; + } + } + } + + if ($type eq "return_ocurrences"){ + $buffer .= "\n"; + } else { + $buffer .= "\n"; + } + + # Execute action if any match (always for last match) + if ($count > 0){ + `$action`; + } + + # Write severity field in XML + if ($severity ne ""){ + $buffer .= "$severity\n"; + } + + # End XML + $buffer .= "\n"; + + # Update Index + $Idx_pos = tell(LOGFILE); + close(LOGFILE); + + # Save the index file + save_idx($Idx_file, $Log_file, $Idx_pos, $Idx_ino); + + # There is no need to write XML, no data. + if (($count eq 0) && ($type ne "return_ocurrences")){ + return; + } + + # Else, show the XML file + print $buffer; + + return; +} + +############################################################################### +# SUB print_module +# +# Dump a XML module +############################################################################### + +sub print_module ($$$$$){ + my $MODULE_NAME = $_[0]; + my $MODULE_TYPE = $_[1]; + my $MODULE_VALUE = $_[2]; + my $MODULE_DESC = $_[3]; + my $MODULE_STATUS = $_[4]; + + # If not a string type, remove all blank spaces! + if ($MODULE_TYPE !=~ m/string/){ + $MODULE_VALUE = clean_blank($MODULE_VALUE); + } + + print "\n"; + print "$MODULE_NAME\n"; + print "$MODULE_TYPE\n"; + print "\n"; + + if ($MODULE_STATUS ne ""){ + print "\n"; + } + + print "\n"; + print "\n"; + +} + + +############################################################################### +# SUB manage_logfile +# +# Do the stuff with a given file and options +############################################################################### +#manage_logfile($log_filename, $module_name, $readall, $type, $regexp); + +sub manage_logfile ($$$$$){ + + my $Idx_pos; + my $Idx_ino; + my $Idx_md5; + my $Idx_file; + + my $log_filename = $_[0]; + my $module_name = $_[1]; + my $readall = $_[2]; + my $type = $_[3]; + my $regexp = $_[4]; + + my $index_file_converted = $log_filename; + # Avoid / \ | and : characters + $index_file_converted =~ s/\//_/g; + $index_file_converted =~ s/\\/_/g; + $index_file_converted =~ s/\|/_/g; + $index_file_converted =~ s/\:/_/g; + + # Create index file if it does not exist + $Idx_file = $plugin_setup{"index_dir"} . "/". $module_name . "_" . $index_file_converted . ".idx"; + + # if force read all is enabled, + if (! -e $Idx_file) { + create_idx($Idx_file, $log_filename); + + # Load index file + ($Idx_pos, $Idx_ino) = load_idx ($Idx_file, $log_filename); + + if ($readall == 1){ + $Idx_pos = 0; + } + } else { + # Load index file + ($Idx_pos, $Idx_ino) = load_idx ($Idx_file, $log_filename); + } + + # Parse log file + parse_log($Idx_file, $log_filename, $Idx_pos, $Idx_ino, $module_name, $type, $regexp); + +} + +############################################################################### +############################################################################### +######################## MAIN PROGRAM CODE #################################### +############################################################################### +############################################################################### + +# Parse external configuration file +# ------------------------------------------- + +# Load config file from command line +if ($#ARGV == -1 ){ + print "I need at least one parameter: Complete path to external configuration file \n"; + exit; +} + +# Check for file +if ( ! -f $archivo_cfg ) { + printf "\n [ERROR] Cannot open configuration file at $archivo_cfg. \n\n"; + exit 1; +} + +load_external_setup ($archivo_cfg); +parse_config; + +#print Dumper(%plugin_setup); + +my $log_filename; +my $log_filename_multiple; +my $log_create_module_for_each_log; +my $module_name; +my $module_name_multiple; +my $module_type; +my $readall; +my $type; +my $regexp; + + +# Parse external configuration file +# ------------------------------------------- + +# Please note that following sentence is not compatible in perl 5.10, it requires +# Perl 5.13 or higher. +while (my ($key, $value) = each (@{$plugin_setup{"log"}})) { + + # For each log defined, read data from hash tree + #print "[DEBUG] Key: $key\n"; + #print "[DEBUG] Name: ".$value->{name} . "\n"; + #print "[DEBUG] Log Location: ".$value->{"log_location_file"} . "\n"; + #print "[DEBUG] Log Location exec: ".$value->{"log_location_exec"} . "\n"; + #print "[DEBUG] Log Location multiple: ".$value->{"log_location_multiple"} . "\n"; + #print "[DEBUG] Log readall: ".$value->{"readall"} . "\n"; + #print "[DEBUG] Type: ".$value->{"type"} . "\n"; + #print "[DEBUG] Regexp: ".$value->{"regexp"} . "\n"; + + if (!defined($value->{"name"})) { + print_module ($module_name, "async_string", "", "Missing name in log definition. Skipped", ""); + next; + } + + $module_name = $value->{"name"}; + $readall = $value->{"readall"}; + $type = $value->{"type"}; + $regexp = $value->{"regexp"}; + + # Check if filename exists + + if (defined($value->{"log_location_file"})){ + $log_filename = $value->{"log_location_file"}; + manage_logfile ($log_filename, $module_name, $readall, $type, $regexp); + + } elsif (defined($value->{"log_location_exec"})){ + $log_filename = `$value->{"log_location_exec"}`; + manage_logfile ($log_filename, $module_name, $readall, $type, $regexp); + } + + # Multiple files + if (defined($value->{"log_location_multiple"})){ + $log_filename_multiple = $value->{"log_location_multiple"}; + $log_create_module_for_each_log = $value->{"module_for_each_log"}; + my @buffer = `find $log_filename_multiple`; + foreach (@buffer) { + # This should solve problems with carriage return in Unix, Linux and Windooze + chomp($_); + chop($_) if ($_ =~ m/\r$/); + $log_filename = $_; + $module_name_multiple = $module_name; + if ($log_create_module_for_each_log == 1){ + # Create a dynamic module name with the name of the logfile + $module_name_multiple = $log_filename; + $module_name_multiple =~ s/\//_/g; + $module_name_multiple = $module_name . "_" . $module_name_multiple; + } + manage_logfile ($log_filename, $module_name_multiple, $readall, $type, $regexp); + } + } + + print "\n"; + +} \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/README.TXT b/pandora_plugins/EC2/CloudWatch/README.TXT new file mode 100644 index 0000000000..ced818dcb7 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/README.TXT @@ -0,0 +1,65 @@ +Amazon CloudWatch (Monitoring) Command Line Tools +================================================= + +Installation: +------------- + +1. Ensure that JAVA version 1.5 or higher is installed on your system: (java -version) +2. Unzip the deployment zip file +3. Set the following environment variables: +3.1 AWS_CLOUDWATCH_HOME - The directory where the deployment files were copied to + check with: + Unix: ls ${AWS_CLOUDWATCH_HOME}/bin should list mon-list-metrics ...) + Windows: dir %AWS_CLOUDWATCH_HOME%\bin should list mon-list-metrics ...) +3.2 JAVA_HOME - Java Installation home directory +4. Add ${AWS_CLOUDWATCH_HOME}/bin (in Windows: %AWS_CLOUDWATCH_HOME%\bin) to your path + +Configuration: +-------------- + +Provide the command line tool with your AWS user credentials. There +are two ways you can provide credentails: AWS keys, or using X.509 +certificates. + +Using AWS Keys +-------------- + +1. Create a credential file: The deployment includes a template file ${AWS_CLOUDWATCH_HOME}/credential-file-path.template. + Edit a copy of this file to add your information. + On UNIX, limit permissions to the owner of the credential file: $ chmod 600 . +2. There are several ways to provide your credential information: + a. Set the following environment variable: AWS_CREDENTIAL_FILE= + b. Alternatively, provide the following option with every command --aws-credential-file + c. Explicitly specify credentials on the command line: --I ACCESS_KEY --S SECRET_KEY + +Using X.509 Certs +----------------- + +1. Save your cetificate and private keys to files: e.g. my-cert.pem +and my-pk.pem. + +2. There are two ways to provide the certificate information to the +command line tool + a. Set the following environment variables: + EC2_CERT=/path/to/cert/file + EC2_PRIVATE_KEY=/path/to/key/file + b. Specify the files directly on command-line for every command + --ec2-cert-file-path=/path/to/cert/file --ec2-private-key-file-path=/path/to/key/file + +Setting custom JVM properties +----------------------------- + +By setting the environment variable SERVICE_JVM_ARGS, you can pass arbitrary JVM properties to the command line. +For example, the following line sets proxy server properties in Linux/UNIX + export SERVICE_JVM_ARGS="-Dhttp.proxyHost=http://my.proxy.com -Dhttp.proxyPort=8080" + + +Running: +--------- + +1. Check that your setup works properly, run the following command: + $ mon-cmd --help + You should see the usage page for all Monitoring commands + + $ mon-list-metrics --headers + You should see a header line. If you have any metrics defined, you should see them as well. diff --git a/pandora_plugins/EC2/CloudWatch/RELEASENOTES.TXT b/pandora_plugins/EC2/CloudWatch/RELEASENOTES.TXT new file mode 100644 index 0000000000..968bd86fd7 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/RELEASENOTES.TXT @@ -0,0 +1,54 @@ +Amazon CloudWatch Command Line Tools +=============================== + +CloudWatch CLI version 1.0.13.4 (API 2010-08-01) +================================================= +* Added the mon-put-data command to put metric data into Cloudwatch +* CLI script now restores the parent script echo settings in windows + +CloudWatch CLI version 1.0.9.5 (API 2010-08-01) +================================================= + +Config changes +-------------- +* Updated to use the new API version +* Modified the syntax of existing commands to reflect the new API +* --measure-name is now --metric-name for mon-get-stats +* Added filtering for mon-list-metrics +* Added multiple APIs for Alarms + +CloudWatch CLI version 1.0.2.3 (API 2009-05-15) +================================================= +* Minor Fixes + +CloudWatch CLI version 1.0.0.24 (API 2009-05-15) +================================================= +* Fixed output of exponential numbers + +CloudWatch CLI version 1.0.0.22 (API 2009-05-15) +================================================= +* Fixed default start-time and end-time timezone. + +CloudWatch CLI version 1.0-1 (API 2009-05-15) +================================================= + +Config changes +-------------- +* Environment var MONITORING_HOME has been renamed to + AWS_CLOUDWATCH_HOME +* Environment var MONITORING_URL has been renamed to + AWS_CLOUDWATCH_URL + +Command changes +--------------- +* bin/mon has been removed. +* bin/service has been renamed bin/mon-cmd. +* All commands now have default 555 permissions. +* For all command line options which accept a list of args, args + must now be separated by ",". +* --accesskeyid has been renamed to --access-key-id +* --secretkey has been renamed to --secret-key +* All short options for optional arguments have been removed + +CloudWatch CLI version 1.0 (API 2009-05-15) +================================================= diff --git a/pandora_plugins/EC2/CloudWatch/THIRDPARTYLICENSE.TXT b/pandora_plugins/EC2/CloudWatch/THIRDPARTYLICENSE.TXT new file mode 100644 index 0000000000..d32b7101d6 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/THIRDPARTYLICENSE.TXT @@ -0,0 +1,824 @@ +%% The following software may be included in this product: + xalan-j2.jar + serializer.jar +Use of any of this software is governed by the terms of the license below: + + ========================================================================= + == NOTICE file corresponding to section 4(d) of the Apache License, == + == Version 2.0, in this case for the Apache Xalan serializer == + == distribution. == + ========================================================================= + + This product includes software developed by IBM Corporation (http://www.ibm.com) + and The Apache Software Foundation (http://www.apache.org/). + + Portions of this software was originally based on the following: + - software copyright (c) 1999-2002, Lotus Development Corporation., + http://www.lotus.com. + - software copyright (c) 2001-2002, Sun Microsystems., + http://www.sun.com. + - software copyright (c) 2003, IBM Corporation., http://www.ibm.com. + + +%% The following software may be included in this product: + commons-cli.jar + commons-codec.jar + commons-discovery.jar + commons-httpclient.jar + commons-logging.jar + commons-logging-api.jar + log4j.jar + stax-api.jar + xmlsec.jar + wss4j.jar + wstx-asl.jar +Use of any of this software is governed by the terms of the license below: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +%% The following software may be included in this product: + xfire-all.jar + xfire-jsr181-api.jar + + Copyright (c) 2005 Envoi Solutions LLC + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +%% The following software may be included in this product: + jdom.jar + + /* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2000 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * Portions of this software are based upon public domain software + * originally written at the National Center for Supercomputing Applications, + * University of Illinois, Urbana-Champaign. + */ + +%% The following software may be included in this product: + wsdl4j.jar + + Common Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + b) in the case of each subsequent Contributor: + + i) changes to the Program, and + + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + + b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + + c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + + d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + + b) its license agreement: + + i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + + ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + + iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + + iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + + b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. + + + +%% The following software may be included in this product: + activation.jar + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: + +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; + +B. Any new file that contains any part of the Original Software or previous Modification; or + +C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)????????????the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)????????????ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections????????????2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section????????????2.1(b) above, no patent license is granted: (1)????????????for code that You delete from the Original Software, or (2)????????????for infringements caused by: (i)????????????the modification of the Original Software, or (ii)????????????the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)????????????Modifications made by that Contributor (or portions thereof); and (2)????????????the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections????????????2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section????????????2.2(b) above, no patent license is granted: (1)????????????for any code that Contributor has deleted from the Contributor Version; (2)????????????for infringements caused by: (i)????????????third party modifications of Contributor Version, or (ii)????????????the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)????????????under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. + +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. + +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. +Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. + +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. + +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)????????????rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)????????????otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections????????????2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sections????????????6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a commercial item, as that term is defined in 48????????????C.F.R.????????????2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. ????????????252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48????????????C.F.R.????????????12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) +The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + +%% The following software may be included in this product: + jaxb-api.jar + jaxb-impl.jar + jaxws-api.jar + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: + +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; + +B. Any new file that contains any part of the Original Software or previous Modification; or + +C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)????????????the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)????????????ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections????????????2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section????????????2.1(b) above, no patent license is granted: (1)????????????for code that You delete from the Original Software, or (2)????????????for infringements caused by: (i)????????????the modification of the Original Software, or (ii)????????????the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)????????????Modifications made by that Contributor (or portions thereof); and (2)????????????the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections????????????2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section????????????2.2(b) above, no patent license is granted: (1)????????????for any code that Contributor has deleted from the Contributor Version; (2)????????????for infringements caused by: (i)????????????third party modifications of Contributor Version, or (ii)????????????the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)????????????under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. + +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. + +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. +Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. + +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. + +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)????????????rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)????????????otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections????????????2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sections????????????6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a commercial item, as that term is defined in 48????????????C.F.R.????????????2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. ????????????252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48????????????C.F.R.????????????12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) +The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + +The GNU General Public License (GPL) Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + * + + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + + Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + * + + 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + * + + 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + o + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + o + + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + o + + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + + In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + * + + 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + o + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + o + + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + o + + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + + If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + * + + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + * + + 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + * + + 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + * + + 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + + It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + * + + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + * + + 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + * + + 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + * + + NO WARRANTY + * + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + * + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + + END OF TERMS AND CONDITIONS + * + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + o + + One line to give the program's name and a brief idea of what it does. + o + + Copyright (C) + o + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + o + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + o + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + o + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + + You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + o + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. + * + + "CLASSPATH" EXCEPTION TO THE GPL VERSION 2 + + Certain source files distributed by Sun Microsystems, Inc. are subject to the following clarification and special exception to the GPL Version 2, but only where Sun has expressly included in the particular source file's header the words + "Sun designates this particular file as subject to the "Classpath" exception as provided by Sun in the License file that accompanied this code." + + Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License Version 2 cover the whole combination. + + As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module.? An independent module is a module which is not derived from or based on this library.? If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so.? If you do not wish to do so, delete this exception statement from your version. + +XML diff --git a/pandora_plugins/EC2/CloudWatch/bin/echo-helper.cmd b/pandora_plugins/EC2/CloudWatch/bin/echo-helper.cmd new file mode 100644 index 0000000000..0299593262 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/echo-helper.cmd @@ -0,0 +1,10 @@ +@ REM Helper file to help in restoring parent echo state +@ REM Variable ECHO_STATE stores parent echo state. It will be used as a command in the end of file mon-cmd.cmd to restore the echo state + +@ set ECHO_STATE_FILE=%temp%\cwclitemp.txt +@ echo > %ECHO_STATE_FILE% + +@ for /F "Tokens=*" %%x in ('type %ECHO_STATE_FILE%') do @set ECHO_STATE=%%x +@ set ECHO_STATE=%ECHO_STATE:ECHO is on.=echo on% +@ set ECHO_STATE=%ECHO_STATE:ECHO is off.=echo off% +@ del %ECHO_STATE_FILE% \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-cmd new file mode 100755 index 0000000000..31735fe691 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-cmd @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# This script passes the service dependent SERVICE_HOME to the common service script to run the command + +# Check AWS_CLOUDWATCH_HOME +if [ -z "${AWS_CLOUDWATCH_HOME}" ]; then + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi + +export SERVICE_HOME=${AWS_CLOUDWATCH_HOME} + +exec "${AWS_CLOUDWATCH_HOME}/bin/service" "$@" + diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-cmd.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-cmd.cmd new file mode 100644 index 0000000000..76243aa923 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-cmd.cmd @@ -0,0 +1,36 @@ +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +SET CHK_SERVICE_HOME=_%AWS_CLOUDWATCH_HOME% +SET SERVICE_HOME=%AWS_CLOUDWATCH_HOME% + +if "%CHK_SERVICE_HOME:"=%" == "_" goto SERVICE_HOME_MISSING + +SET SERVICE_HOME="%SERVICE_HOME:"=%" + +:ARGV_LOOP +IF (%1) == () GOTO ARGV_DONE +REM Get around strange quoting bug +SET ARGV=%ARGV% %1 +SHIFT +GOTO ARGV_LOOP +:ARGV_DONE + +REM run +call %SERVICE_HOME%\bin\service.cmd %ARGV% +goto DONE + +:SERVICE_HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal + +REM Restore original echo state +%ECHO_STATE% \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-delete-alarms b/pandora_plugins/EC2/CloudWatch/bin/mon-delete-alarms new file mode 100755 index 0000000000..baa29c4095 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-delete-alarms @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-delete-alarms "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-delete-alarms.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-delete-alarms.cmd new file mode 100644 index 0000000000..6dc5aa1ad7 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-delete-alarms.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-delete-alarms %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarm-history b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarm-history new file mode 100755 index 0000000000..4d1b8db9a4 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarm-history @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-describe-alarm-history "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarm-history.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarm-history.cmd new file mode 100644 index 0000000000..6149c5cc22 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarm-history.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-describe-alarm-history %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms new file mode 100755 index 0000000000..32b7b61221 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-describe-alarms "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms-for-metric b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms-for-metric new file mode 100755 index 0000000000..28fb853c2c --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms-for-metric @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-describe-alarms-for-metric "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms-for-metric.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms-for-metric.cmd new file mode 100644 index 0000000000..c27e72efed --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms-for-metric.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-describe-alarms-for-metric %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms.cmd new file mode 100644 index 0000000000..f087c6f897 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-describe-alarms.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-describe-alarms %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-disable-alarm-actions b/pandora_plugins/EC2/CloudWatch/bin/mon-disable-alarm-actions new file mode 100755 index 0000000000..5773251fb3 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-disable-alarm-actions @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-disable-alarm-actions "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-disable-alarm-actions.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-disable-alarm-actions.cmd new file mode 100644 index 0000000000..43bb00ce58 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-disable-alarm-actions.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-disable-alarm-actions %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-enable-alarm-actions b/pandora_plugins/EC2/CloudWatch/bin/mon-enable-alarm-actions new file mode 100755 index 0000000000..bc36112b85 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-enable-alarm-actions @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-enable-alarm-actions "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-enable-alarm-actions.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-enable-alarm-actions.cmd new file mode 100644 index 0000000000..42e5635f6d --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-enable-alarm-actions.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-enable-alarm-actions %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-get-stats b/pandora_plugins/EC2/CloudWatch/bin/mon-get-stats new file mode 100755 index 0000000000..72a292c357 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-get-stats @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-get-stats "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-get-stats.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-get-stats.cmd new file mode 100644 index 0000000000..c5488d9664 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-get-stats.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-get-stats %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-list-metrics b/pandora_plugins/EC2/CloudWatch/bin/mon-list-metrics new file mode 100755 index 0000000000..05bddd2a04 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-list-metrics @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-list-metrics "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-list-metrics.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-list-metrics.cmd new file mode 100644 index 0000000000..59806a10c9 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-list-metrics.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-list-metrics %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-put-data b/pandora_plugins/EC2/CloudWatch/bin/mon-put-data new file mode 100755 index 0000000000..69a149d17e --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-put-data @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-put-data "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-put-data.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-put-data.cmd new file mode 100644 index 0000000000..cdfc71e9cd --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-put-data.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-put-data %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-put-metric-alarm b/pandora_plugins/EC2/CloudWatch/bin/mon-put-metric-alarm new file mode 100755 index 0000000000..fd61da2618 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-put-metric-alarm @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-put-metric-alarm "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-put-metric-alarm.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-put-metric-alarm.cmd new file mode 100644 index 0000000000..9ef0285dbd --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-put-metric-alarm.cmd @@ -0,0 +1,22 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-put-metric-alarm %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal + diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-set-alarm-state b/pandora_plugins/EC2/CloudWatch/bin/mon-set-alarm-state new file mode 100755 index 0000000000..97d7be651a --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-set-alarm-state @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd mon-set-alarm-state "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-set-alarm-state.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-set-alarm-state.cmd new file mode 100644 index 0000000000..374fbe91e5 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-set-alarm-state.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" mon-set-alarm-state %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-version b/pandora_plugins/EC2/CloudWatch/bin/mon-version new file mode 100755 index 0000000000..202177ba2a --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-version @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if [ -n "${AWS_CLOUDWATCH_HOME:+x}" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-cmd --version "$@" +else + echo AWS_CLOUDWATCH_HOME is not set + exit 1 +fi diff --git a/pandora_plugins/EC2/CloudWatch/bin/mon-version.cmd b/pandora_plugins/EC2/CloudWatch/bin/mon-version.cmd new file mode 100644 index 0000000000..638071bc13 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/mon-version.cmd @@ -0,0 +1,21 @@ +@call echo-helper +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%AWS_CLOUDWATCH_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%AWS_CLOUDWATCH_HOME:"=%\bin\mon-cmd.cmd" version %* +goto DONE +:HOME_MISSING +echo AWS_CLOUDWATCH_HOME is not set +exit /b 1 + +:DONE +endlocal \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/bin/service b/pandora_plugins/EC2/CloudWatch/bin/service new file mode 100755 index 0000000000..0bae4d9b5b --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/service @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# This script "concentrates" all of our Java invocations into a single location +# for maintainability. + +# Verify SERVICE_HOME +if [ -z "${SERVICE_HOME}" ]; then + echo 'This command is not intended to be run directly. Please see documentation on using service commands.' + exit 1 +fi + +# Check our Java env +if [ -n "${JAVA_HOME:+x}" ]; then + JAVA_COMMAND=${JAVA_HOME}/bin/java +else + echo JAVA_HOME is not set + exit 1 +fi + +LIBDIR=${SERVICE_HOME}/lib +# If a classpath exists preserve it +CP=$CLASSPATH + +# Check for cygwin bash so we use the correct path separator + +for jar in $(ls $LIBDIR/*.jar) ; do + CP=${CP}:$jar +done + +exec ${JAVA_COMMAND} ${SERVICE_JVM_ARGS} -classpath "${CP}" com.amazon.webservices.Cli "$@" diff --git a/pandora_plugins/EC2/CloudWatch/bin/service.cmd b/pandora_plugins/EC2/CloudWatch/bin/service.cmd new file mode 100644 index 0000000000..ffd03ab206 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/bin/service.cmd @@ -0,0 +1,74 @@ +@echo off + +setlocal + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_JAVA_HOME=_%JAVA_HOME% +set CHK_SERVICE_HOME=_%SERVICE_HOME% +set CHK_CREDENTIAL_FILE=_%AWS_CREDENTIAL_FILE% + +if "%CHK_CREDENTIAL_FILE:"=%" == "_" goto CREDENTIAL_FILE_MISSING +SET AWS_CREDENTIAL_FILE=%AWS_CREDENTIAL_FILE:"=% +:CREDENTIAL_FILE_MISSING + +if "%CHK_SERVICE_HOME:"=%" == "_" goto SERVICE_HOME_MISSING +if "%CHK_JAVA_HOME:"=%" == "_" goto JAVA_HOME_MISSING + +REM If a classpath exists preserve it + +SET SERVICE_HOME=%SERVICE_HOME:"=% +SET LIB="%SERVICE_HOME%\lib" + +REM Brute force +SETLOCAL ENABLEDELAYEDEXPANSION + +SET CP=%LIB%\service.jar +for /F "usebackq" %%c in (`dir /b %LIB%`) do SET CP=!CP!;%LIB%\%%c + +REM Grab the class name +SET CMD=%1 + +REM SHIFT doesn't affect %* so we need this clunky hack +SET ARGV=%2 +SHIFT +SHIFT +:ARGV_LOOP +IF (%1) == () GOTO ARGV_DONE +REM Get around strange quoting bug +SET ARG=%1 + +REM Escape the minus sign for negative numbers +ECHO %ARG% > %TEMP%\argtest +FINDSTR /B \-[0-9.] %TEMP%\argtest > NUL +if %ERRORLEVEL%==0 ( + SET ARG=\%ARG% +) +DEL %TEMP%\argtest + + +SET ARG=%ARG:"=% +SET ARGV=%ARGV% "%ARG%" +SHIFT +GOTO ARGV_LOOP +:ARGV_DONE + +REM Make sure JAVA_HOME has only a single sorrounding double quotes +set JAVA_HOME="%JAVA_HOME:"=%" + +REM run +%JAVA_HOME%\bin\java %SERVICE_JVM_ARGS% -classpath %CP% com.amazon.webservices.Cli %CMD% %ARGV% +goto DONE + +:JAVA_HOME_MISSING +echo JAVA_HOME is not set +exit /b 1 + +:SERVICE_HOME_MISSING +echo "This command is not intended to be run directly. Please see documentation on using service commands." +exit /b 1 + +:DONE +endlocal diff --git a/pandora_plugins/EC2/CloudWatch/credential-file-path.template b/pandora_plugins/EC2/CloudWatch/credential-file-path.template new file mode 100644 index 0000000000..85f1d0b283 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/credential-file-path.template @@ -0,0 +1,2 @@ +AWSAccessKeyId= +AWSSecretKey= \ No newline at end of file diff --git a/pandora_plugins/EC2/CloudWatch/lib/CliCommando-1.0.jar b/pandora_plugins/EC2/CloudWatch/lib/CliCommando-1.0.jar new file mode 100644 index 0000000000..b707777927 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/CliCommando-1.0.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/activation-1.1.jar b/pandora_plugins/EC2/CloudWatch/lib/activation-1.1.jar new file mode 100644 index 0000000000..9baf577720 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/activation-1.1.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/commons-cli-1.1.jar b/pandora_plugins/EC2/CloudWatch/lib/commons-cli-1.1.jar new file mode 100644 index 0000000000..e633afbe68 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/commons-cli-1.1.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/commons-codec-1.3.jar b/pandora_plugins/EC2/CloudWatch/lib/commons-codec-1.3.jar new file mode 100644 index 0000000000..5b598a1f15 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/commons-codec-1.3.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/commons-discovery-0.2.jar b/pandora_plugins/EC2/CloudWatch/lib/commons-discovery-0.2.jar new file mode 100644 index 0000000000..21895ac0ed Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/commons-discovery-0.2.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/commons-httpclient-3.0.jar b/pandora_plugins/EC2/CloudWatch/lib/commons-httpclient-3.0.jar new file mode 100644 index 0000000000..a85e61c025 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/commons-httpclient-3.0.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/commons-logging-1.0.4.jar b/pandora_plugins/EC2/CloudWatch/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000000..d253b4fcc2 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/commons-logging-1.0.4.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/commons-logging-api-1.1.1.jar b/pandora_plugins/EC2/CloudWatch/lib/commons-logging-api-1.1.1.jar new file mode 100644 index 0000000000..bd4511684b Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/commons-logging-api-1.1.1.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/httpclient-4.2.jar b/pandora_plugins/EC2/CloudWatch/lib/httpclient-4.2.jar new file mode 100644 index 0000000000..9e0df5098c Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/httpclient-4.2.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/jaxb-api-2.0.jar b/pandora_plugins/EC2/CloudWatch/lib/jaxb-api-2.0.jar new file mode 100644 index 0000000000..54ce7f1514 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/jaxb-api-2.0.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/jaxb-impl-2.0.1.jar b/pandora_plugins/EC2/CloudWatch/lib/jaxb-impl-2.0.1.jar new file mode 100644 index 0000000000..28e9f83f9e Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/jaxb-impl-2.0.1.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/jaxws-api-2.0.jar b/pandora_plugins/EC2/CloudWatch/lib/jaxws-api-2.0.jar new file mode 100644 index 0000000000..eeb2c8e107 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/jaxws-api-2.0.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/jdom-1.0.jar b/pandora_plugins/EC2/CloudWatch/lib/jdom-1.0.jar new file mode 100644 index 0000000000..d5e9a89012 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/jdom-1.0.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/log4j.jar b/pandora_plugins/EC2/CloudWatch/lib/log4j.jar new file mode 100644 index 0000000000..e72672c6bb Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/log4j.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/serializer.jar b/pandora_plugins/EC2/CloudWatch/lib/serializer.jar new file mode 100644 index 0000000000..7cd7405474 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/serializer.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/service.jar b/pandora_plugins/EC2/CloudWatch/lib/service.jar new file mode 100644 index 0000000000..f2ad55d50f Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/service.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/stax-api-1.0.1.jar b/pandora_plugins/EC2/CloudWatch/lib/stax-api-1.0.1.jar new file mode 100644 index 0000000000..a10aeb4efc Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/stax-api-1.0.1.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/wsdl4j-1.6.1.jar b/pandora_plugins/EC2/CloudWatch/lib/wsdl4j-1.6.1.jar new file mode 100644 index 0000000000..c614923f1b Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/wsdl4j-1.6.1.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/wss4j-1.5.7.jar b/pandora_plugins/EC2/CloudWatch/lib/wss4j-1.5.7.jar new file mode 100644 index 0000000000..cfc355fb2d Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/wss4j-1.5.7.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/wstx-asl-3.2.0.jar b/pandora_plugins/EC2/CloudWatch/lib/wstx-asl-3.2.0.jar new file mode 100644 index 0000000000..fed336814c Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/wstx-asl-3.2.0.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/xalan-j2-2.7.0.jar b/pandora_plugins/EC2/CloudWatch/lib/xalan-j2-2.7.0.jar new file mode 100644 index 0000000000..9fac2d1723 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/xalan-j2-2.7.0.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/xfire-all-1.2.6.jar b/pandora_plugins/EC2/CloudWatch/lib/xfire-all-1.2.6.jar new file mode 100644 index 0000000000..92e0a17fa1 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/xfire-all-1.2.6.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/xfire-jsr181-api-1.0-M1.jar b/pandora_plugins/EC2/CloudWatch/lib/xfire-jsr181-api-1.0-M1.jar new file mode 100644 index 0000000000..b5358464b5 Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/xfire-jsr181-api-1.0-M1.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/lib/xmlsec-1.4.2.jar b/pandora_plugins/EC2/CloudWatch/lib/xmlsec-1.4.2.jar new file mode 100644 index 0000000000..6753cec3dc Binary files /dev/null and b/pandora_plugins/EC2/CloudWatch/lib/xmlsec-1.4.2.jar differ diff --git a/pandora_plugins/EC2/CloudWatch/license.txt b/pandora_plugins/EC2/CloudWatch/license.txt new file mode 100644 index 0000000000..8cdd010933 --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/license.txt @@ -0,0 +1,96 @@ +Amazon Software License + +This Amazon Software License ("License") governs your use, reproduction, and +distribution of the accompanying software as specified below. + +1. Definitions + +"Licensor" means any person or entity that distributes its Work. + +"Software" means the original work of authorship made available under this +License. + +"Work" means the Software and any additions to or derivative works of the +Software that are made available under this License. + +The terms "reproduce," "reproduction," "derivative works," and "distribution" +have the meaning as provided under U.S. copyright law; provided, however, that +for the purposes of this License, derivative works shall not include works that +remain separable from, or merely link (or bind by name) to the interfaces of, +the Work. + +Works, including the Software, are "made available" under this License by +including in or with the Work either (a) a copyright notice referencing the +applicability of this License to the Work, or (b) a copy of this License. + +2. License Grants + +2.1 Copyright Grant. Subject to the terms and conditions of this License, each +Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, +copyright license to reproduce, prepare derivative works of, publicly display, +publicly perform, sublicense and distribute its Work and any resulting +derivative works in any form. + +2.2 Patent Grant. Subject to the terms and conditions of this License, each +Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free +patent license to make, have made, use, sell, offer for sale, import, and +otherwise transfer its Work, in whole or in part. The foregoing license applies +only to the patent claims licensable by Licensor that would be infringed by +Licensor's Work (or portion thereof) individually and excluding any +combinations with any other materials or technology. + +3. Limitations + +3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do +so under this License, (b) you include a complete copy of this License with +your distribution, and (c) you retain without modification any copyright, +patent, trademark, or attribution notices that are present in the Work. + +3.2 Derivative Works. You may specify that additional or different terms apply +to the use, reproduction, and distribution of your derivative works of the Work +("Your Terms") only if (a) Your Terms provide that the use limitation in +Section 3.3 applies to your derivative works, and (b) you identify the specific +derivative works that are subject to Your Terms. Notwithstanding Your Terms, +this License (including the redistribution requirements in Section 3.1) will +continue to apply to the Work itself. + +3.3 Use Limitation. The Work and any derivative works thereof only may be used +or intended for use with the web services, computing platforms or applications +provided by Amazon.com, Inc. or its affiliates, including Amazon Web Services +LLC. + +3.4 Patent Claims. If you bring or threaten to bring a patent claim against any +Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to +enforce any patents that you allege are infringed by any Work, then your rights +under this License from such Licensor (including the grants in Sections 2.1 and +2.2) will terminate immediately. + +3.5 Trademarks. This License does not grant any rights to use any Licensor's or +its affiliates' names, logos, or trademarks, except as necessary to reproduce +the notices described in this License. + +3.6 Termination. If you violate any term of this License, then your rights +under this License (including the grants in Sections 2.1 and 2.2) will +terminate immediately. + +4. Disclaimer of Warranty. THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR +CONDITIONS OF M ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR +NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS +LICENSE. SOME STATES' CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN IMPLIED +WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU. + +5. Limitation of Liability. EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT +AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR +OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF +OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT +NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, +COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), +EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +Note: Other license terms may apply to certain, identified software files +contained within or distributed with the accompanying software if such terms +are included in the notice folder accompanying the file. Such other license +terms will then apply in lieu of the terms of the Amazon Software License +above. diff --git a/pandora_plugins/EC2/CloudWatch/notice.txt b/pandora_plugins/EC2/CloudWatch/notice.txt new file mode 100644 index 0000000000..c3555b92dc --- /dev/null +++ b/pandora_plugins/EC2/CloudWatch/notice.txt @@ -0,0 +1,40 @@ +Copyright 2006-2009 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Licensed under the Amazon Software License (the "License"). You may not use +this file except in compliance with the License. A copy of the +License is located at + +http://aws.amazon.com/asl + +or in the "license" file accompanying this file. This file is +distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the specific language +governing permissions and limitations under the License. + +********************** +THIRD PARTY COMPONENTS +********************** +This software includes third party software subject to the following +copyrights: + +-XML handling functions from the JAXB project - Copyright 2005 Sun +Microsystems, Inc. +-XSLT support from Xalan - Copyright (c) 1999-2002, Lotus Development +Corporation, Copyright (c) 2001-2002, Sun Microsystems., Copyright (c) +2003, IBM Corporation. +-Utility functions from Apache Commons - Copyright 2001-2008 Apache Software +Foundation +-Streaming API for XML from Codehaus - Copyright 2003-2006 The Codehaus +-XML processing from Codehaus - Copyright 2006 Codehaus Foundation +-XML processing from Apache - Copyright (c) 2000 The Apache Software Foundation +-XFire SOAP framework from Codehaus - Copyright (c) 2005 Envoi Solutions LLC +-WS-Security verification for SOAP messages from Apache Software +Foundation - Copyright 2004-2009 The Apache Software Foundation +-Security standards for XML from Apache Software Foundation - Copyright +2002-2006 The Apache Software Foundation +-Cryptographic functions from Bouncy Castle - Copyright (c) 2000 - 2008 +The Legion Of The Bouncy Castle + +The licenses for these third party components are included in +THIRDPARTYLICENSE.TXT + diff --git a/pandora_plugins/EC2/Credential.template b/pandora_plugins/EC2/Credential.template new file mode 100644 index 0000000000..999808fbd8 --- /dev/null +++ b/pandora_plugins/EC2/Credential.template @@ -0,0 +1,2 @@ +AWSAccessKeyId= +AWSSecretKey= diff --git a/pandora_plugins/EC2/README b/pandora_plugins/EC2/README new file mode 100644 index 0000000000..45ed11b7bb --- /dev/null +++ b/pandora_plugins/EC2/README @@ -0,0 +1,142 @@ +-------------------------------- +Amazon EC2 CloudWatch monitoring +-------------------------------- + +This specific monitoring uses CloudWatch API to monitor your instances +in Amazon EC2 service. You need to have activated the cloudwatch +enabled in your instance. + +The main idea of this remote server plugin is to get information from +your instances using the network plugin server, that means you will +need to register the plugin in the server, and make different modules +to grab the information of your EC2 servers. + +This is an example of the execution: + + ./ec2_cloudwatch_plugin.sh -f ./ec2.conf -d InstanceId=i-9d0b4af1 -n AWS/EC2 -m CPUUtilization + +It will return a % numeric value of the metric "CPUUtilization" in the +instance i-9d0b4af1 + +For AWS/EC2 namespace, you can use -i option instead -d, like; + + ./ec2_cloudwatch_plugin.sh -f ./ec2.conf -i i-9d0b4af1 -n AWS/EC2 -m CPUUtilization + + *** *** *** + +This package also includes ec2_describe_instance.sh to get some +information about EC2 intances. + +For example, you can get the AMI Id of the instance, by the command +below; + + ./ec2_describe_instance.sh -f ./ec2.conf -i i-9d0b4af1 -n ami-id + +You can get the following information by this command; + + ami-id + public-dns + private-dns + type + available-zone + public-ip + private-ip + block-devices + security-group + + +To install you will need: +------------------------- + +1. To have a running JAVA setup, and now its JAVA home directory. In + the Pandora FMS Appliance (Vmware/Image) is set in /usr/ + +2. Put the whole package on a dir in the server, for example: + + /usr/share/pandora_server/util/plugin/ec2/ + +3. Create a Credential file. This package includes a template file + Credential.template. + +4. Set the following variables in the configuration file 'ec2.conf'. + +4.1 AWS_CLOUDWATCH_HOME + + Set the path of Cloudwatch Command Line Tools, that is located at + CloudWatch subdirectory in this package. Foe example, you may set + it; + + AWS_CLOUDWATCH_HOME=/usr/share/pandora_server/util/plugin/ec2/CloudWatch + +4.2 EC2_HOME + + Set the path of EC2 API Tools, that is located at ec2-api-tools + subdirectory in this package. You may set it; + + EC2_HOME=/usr/share/pandora_server/util/plugin/ec2/ec2-api-tools + +4.3 EC2_REGION + + Set the region that the targets belong to. This is used to specify + 'CloundWatch Monitoring URL' for CloudWatch API tools, and 'EC2 URL' + for EC2 API tools. You may set it; + + EC2_REGION=ap-northeast-1 + +4.4 AWS_CREDENTIAL_FILE + + Set the path of the Credential file. You may set it; + + AWS_CREDENTIAL_FILE=/path-to/Credential.txt + +5. If you have doubts about if it's correctly installed, execute + directly this command: + + /path-to/ec2_cloudwatch_plugin.sh -f /path-to/ec2.conf -l + + should return something like; +--------------8<------------------------8<---------------- +AWS/EBS VolumeId=vol-65z53747 VolumeIdleTime +AWS/EBS VolumeId=vol-65z53747 VolumeQueueLength +AWS/EBS VolumeId=vol-65z53747 VolumeReadBytes +AWS/EBS VolumeId=vol-65z53747 VolumeReadOps +AWS/EBS VolumeId=vol-65z53747 VolumeTotalReadTime +AWS/EBS VolumeId=vol-65z53747 VolumeTotalWriteTime +AWS/EBS VolumeId=vol-65z53747 VolumeWriteBytes +AWS/EBS VolumeId=vol-65z53747 VolumeWriteOps +AWS/EC2 InstanceId=i-9d0b4af1 CPUUtilization +AWS/EC2 InstanceId=i-9d0b4af1 DiskReadBytes +AWS/EC2 InstanceId=i-9d0b4af1 DiskReadOps +AWS/EC2 InstanceId=i-9d0b4af1 DiskWriteBytes +AWS/EC2 InstanceId=i-9d0b4af1 DiskWriteOps +AWS/EC2 InstanceId=i-9d0b4af1 NetworkIn +AWS/EC2 InstanceId=i-9d0b4af1 NetworkOut +AWS/EC2 InstanceId=i-9d0b4af1 StatusCheckFailed +AWS/EC2 InstanceId=i-9d0b4af1 StatusCheckFailed_Instance +AWS/EC2 InstanceId=i-9d0b4af1 StatusCheckFailed_System +---------------------------------------------------------- + +If you get such result, you're ready to use the plugin. + + +Files: +------ + +The plugin has several files: + + ./ec2_cloudwatch_plugin.sh - EC2 Cloud Watch Plugin + ./ec2_describe_instance.sh - EC2 API Tools Plugin + + ./ec2.conf - configuration file. + + ./eCredential.template - Credentail file template. + + ./CloudWatch/* - Components of Amazon CloudWatch (Monitoring) + Command Line Tools, included in this bundle. This + scripts are distributed under the Apache Licence. + + ./ec2-api-tools/* - Components of Amazon EC2 API Tools, included in + this bundle. This scripts are distributed under + the Apache Licence. + + diff --git a/pandora_plugins/EC2/ec2-api-tools/THIRDPARTYLICENSE.TXT b/pandora_plugins/EC2/ec2-api-tools/THIRDPARTYLICENSE.TXT new file mode 100644 index 0000000000..72e9596e34 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/THIRDPARTYLICENSE.TXT @@ -0,0 +1,974 @@ + +%% The following software may be included in this product: + xalan-j2-2.7.0.jar + +Use of any of this software is governed by the terms of the license below: + + ========================================================================= + == NOTICE file corresponding to section 4(d) of the Apache License, == + == Version 2.0, in this case for the Apache Xalan serializer == + == distribution. == + ========================================================================= + + This product includes software developed by IBM Corporation (http://www.ibm.com) + and The Apache Software Foundation (http://www.apache.org/). + + Portions of this software was originally based on the following: + - software copyright (c) 1999-2002, Lotus Development Corporation., + http://www.lotus.com. + - software copyright (c) 2001-2002, Sun Microsystems., + http://www.sun.com. + - software copyright (c) 2003, IBM Corporation., http://www.ibm.com. + + + + +%% The following software may be included in this product: + commons-cli-1.1.jar + commons-codec-1.3.jar + commons-discovery-0.2.jar + commons-httpclient-3.0.jar + commons-logging-1.0.4.jar + jets3t-0.8.0.jar + log4j.jar + stax-api-1.0.1.jar + wss4j-1.5.1.jar + wstx-asl-3.2.0.jar + xalan-j2-serializer.jar + xmlsec-1.3.0.jar + java-xmlbuilder-0.4-SNAPSHOT.jar + +Use of any of this software is governed by the terms of the license below: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + +%% The following software may be included in this product: + xfire-all-1.2.6.jar + xfire-jsr181-api-1.0-M1.jar + +Use of any of this software is governed by the terms of the license below: + + Copyright (c) 2005 Envoi Solutions LLC + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + +%% The following software may be included in this product: + jdom-1.0.jar + +Use of any of this software is governed by the terms of the license below: + + Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact . + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management . + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter and + Brett McLaughlin . For more information + on the JDOM Project, please see . + + + + +%% The following software may be included in this product: + bcprov.jar + +Use of any of this software is governed by the terms of the license below: + +Copyright (c) 2000 - 2008 The Legion Of The Bouncy Castle +(http://www.bouncycastle.org) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + + + +%% The following software may be included in this product: + activation-1.1.jar + jaxb-api-2.0.jar + jaxb-impl-2.0.1.jar + jaxws-api-2.0.jar + mail-1.4.jar + +These are released under dual license consisting of the CDDL v1.0 and GPL v2 with "CLASSPATH" EXCEPTION. + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. "Contributor" means each individual or entity that +creates or contributes to the creation of Modifications. + +1.2. "Contributor Version" means the combination of the +Original Software, prior Modifications used by a +Contributor (if any), and the Modifications made by that +particular Contributor. + +1.3. "Covered Software" means (a) the Original Software, or +(b) Modifications, or (c) the combination of files +containing Original Software with files containing +Modifications, in each case including portions thereof. + +1.4. "Executable" means the Covered Software in any form +other than Source Code. + +1.5. "Initial Developer" means the individual or entity +that first makes Original Software available under this +License. + +1.6. "Larger Work" means a work which combines Covered +Software or portions thereof with code not governed by the +terms of this License. + +1.7. "License" means this document. + +1.8. "Licensable" means having the right to grant, to the +maximum extent possible, whether at the time of the initial +grant or subsequently acquired, any and all of the rights +conveyed herein. + +1.9. "Modifications" means the Source Code and Executable +form of any of the following: + +A. Any file that results from an addition to, +deletion from or modification of the contents of a +file containing Original Software or previous +Modifications; + +B. Any new file that contains any part of the +Original Software or previous Modification; or + +C. Any new file that is contributed or otherwise made +available under the terms of this License. + +1.10. "Original Software" means the Source Code and +Executable form of computer software code that is +originally released under this License. + +1.11. "Patent Claims" means any patent claim(s), now owned +or hereafter acquired, including without limitation, +method, process, and apparatus claims, in any patent +Licensable by grantor. + +1.12. "Source Code" means (a) the common form of computer +software code in which modifications are made and (b) +associated documentation included in or with such code. + +1.13. "You" (or "Your") means an individual or a legal +entity exercising rights under, and complying with all of +the terms of, this License. For legal entities, "You" +includes any entity which controls, is controlled by, or is +under common control with You. For purposes of this +definition, "control" means (a) the power, direct or +indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (b) ownership +of more than fifty percent (50%) of the outstanding shares +or beneficial ownership of such entity. + +2. License Grants. + +2.1. The Initial Developer Grant. + +Conditioned upon Your compliance with Section 3.1 below and +subject to third party intellectual property claims, the +Initial Developer hereby grants You a world-wide, +royalty-free, non-exclusive license: + +(a) under intellectual property rights (other than +patent or trademark) Licensable by Initial Developer, +to use, reproduce, modify, display, perform, +sublicense and distribute the Original Software (or +portions thereof), with or without Modifications, +and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, +using or selling of Original Software, to make, have +made, use, practice, sell, and offer for sale, and/or +otherwise dispose of the Original Software (or +portions thereof). + +(c) The licenses granted in Sections 2.1(a) and (b) +are effective on the date Initial Developer first +distributes or otherwise makes the Original Software +available to a third party under the terms of this +License. + +(d) Notwithstanding Section 2.1(b) above, no patent +license is granted: (1) for code that You delete from +the Original Software, or (2) for infringements +caused by: (i) the modification of the Original +Software, or (ii) the combination of the Original +Software with other software or devices. + +2.2. Contributor Grant. + +Conditioned upon Your compliance with Section 3.1 below and +subject to third party intellectual property claims, each +Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than +patent or trademark) Licensable by Contributor to +use, reproduce, modify, display, perform, sublicense +and distribute the Modifications created by such +Contributor (or portions thereof), either on an +unmodified basis, with other Modifications, as +Covered Software and/or as part of a Larger Work; and + +(b) under Patent Claims infringed by the making, +using, or selling of Modifications made by that +Contributor either alone and/or in combination with +its Contributor Version (or portions of such +combination), to make, use, sell, offer for sale, +have made, and/or otherwise dispose of: (1) +Modifications made by that Contributor (or portions +thereof); and (2) the combination of Modifications +made by that Contributor with its Contributor Version +(or portions of such combination). + +(c) The licenses granted in Sections 2.2(a) and +2.2(b) are effective on the date Contributor first +distributes or otherwise makes the Modifications +available to a third party. + +(d) Notwithstanding Section 2.2(b) above, no patent +license is granted: (1) for any code that Contributor +has deleted from the Contributor Version; (2) for +infringements caused by: (i) third party +modifications of Contributor Version, or (ii) the +combination of Modifications made by that Contributor +with other software (except as part of the +Contributor Version) or other devices; or (3) under +Patent Claims infringed by Covered Software in the +absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. + +Any Covered Software that You distribute or otherwise make +available in Executable form must also be made available in +Source Code form and that Source Code form must be +distributed only under the terms of this License. You must +include a copy of this License with every copy of the +Source Code form of the Covered Software You distribute or +otherwise make available. You must inform recipients of any +such Covered Software in Executable form as to how they can +obtain such Covered Software in Source Code form in a +reasonable manner on or through a medium customarily used +for software exchange. + +3.2. Modifications. + +The Modifications that You create or to which You +contribute are governed by the terms of this License. You +represent that You believe Your Modifications are Your +original creation(s) and/or You have sufficient rights to +grant the rights conveyed by this License. + +3.3. Required Notices. + +You must include a notice in each of Your Modifications +that identifies You as the Contributor of the Modification. +You may not remove or alter any copyright, patent or +trademark notices contained within the Covered Software, or +any notices of licensing or any descriptive text giving +attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. + +You may not offer or impose any terms on any Covered +Software in Source Code form that alters or restricts the +applicable version of this License or the recipients' +rights hereunder. You may choose to offer, and to charge a +fee for, warranty, support, indemnity or liability +obligations to one or more recipients of Covered Software. +However, you may do so only on Your own behalf, and not on +behalf of the Initial Developer or any Contributor. You +must make it absolutely clear that any such warranty, +support, indemnity or liability obligation is offered by +You alone, and You hereby agree to indemnify the Initial +Developer and every Contributor for any liability incurred +by the Initial Developer or such Contributor as a result of +warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. + +You may distribute the Executable form of the Covered +Software under the terms of this License or under the terms +of a license of Your choice, which may contain terms +different from this License, provided that You are in +compliance with the terms of this License and that the +license for the Executable form does not attempt to limit +or alter the recipient's rights in the Source Code form +from the rights set forth in this License. If You +distribute the Covered Software in Executable form under a +different license, You must make it absolutely clear that +any terms which differ from this License are offered by You +alone, not by the Initial Developer or Contributor. You +hereby agree to indemnify the Initial Developer and every +Contributor for any liability incurred by the Initial +Developer or such Contributor as a result of any such terms +You offer. + +3.6. Larger Works. + +You may create a Larger Work by combining Covered Software +with other code not governed by the terms of this License +and distribute the Larger Work as a single product. In such +a case, You must make sure the requirements of this License +are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. + +Sun Microsystems, Inc. is the initial license steward and +may publish revised and/or new versions of this License +from time to time. Each version will be given a +distinguishing version number. Except as provided in +Section 4.3, no one other than the license steward has the +right to modify this License. + +4.2. Effect of New Versions. + +You may always continue to use, distribute or otherwise +make the Covered Software available under the terms of the +version of the License under which You originally received +the Covered Software. If the Initial Developer includes a +notice in the Original Software prohibiting it from being +distributed or otherwise made available under any +subsequent version of the License, You must distribute and +make the Covered Software available under the terms of the +version of the License under which You originally received +the Covered Software. Otherwise, You may also choose to +use, distribute or otherwise make the Covered Software +available under the terms of any subsequent version of the +License published by the license steward. + +4.3. Modified Versions. + +When You are an Initial Developer and You want to create a +new license for Your Original Software, You may create and +use a modified version of this License if You: (a) rename +the license and remove any references to the name of the +license steward (except to note that the license differs +from this License); and (b) otherwise make it clear that +the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" +BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED +SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR +PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY +COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE +INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF +ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF +WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF +ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS +DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will +terminate automatically if You fail to comply with terms +herein and fail to cure such breach within 30 days of +becoming aware of the breach. Provisions which, by their +nature, must remain in effect beyond the termination of +this License shall survive. + +6.2. If You assert a patent infringement claim (excluding +declaratory judgment actions) against Initial Developer or +a Contributor (the Initial Developer or Contributor against +whom You assert such claim is referred to as "Participant") +alleging that the Participant Software (meaning the +Contributor Version where the Participant is a Contributor +or the Original Software where the Participant is the +Initial Developer) directly or indirectly infringes any +patent, then any and all rights granted directly or +indirectly to You by such Participant, the Initial +Developer (if the Initial Developer is not the Participant) +and all Contributors under Sections 2.1 and/or 2.2 of this +License shall, upon 60 days notice from Participant +terminate prospectively and automatically at the expiration +of such 60 day notice period, unless if within such 60 day +period You withdraw Your claim with respect to the +Participant Software against such Participant either +unilaterally or pursuant to a written agreement with +Participant. + +6.3. In the event of termination under Sections 6.1 or 6.2 +above, all end user licenses that have been validly granted +by You or any distributor hereunder prior to termination +(excluding licenses granted to You by any distributor) +shall survive termination. + +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT +(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE +INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF +COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE +LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR +CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT +LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK +STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER +COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN +INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF +LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL +INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT +APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO +NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR +CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT +APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a "commercial item," as that term is +defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial +computer software" (as that term is defined at 48 C.F.R. ¤ +252.227-7014(a)(1)) and "commercial computer software +documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. +1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 +through 227.7202-4 (June 1995), all U.S. Government End Users +acquire Covered Software with only those rights set forth herein. +This U.S. Government Rights clause is in lieu of, and supersedes, +any other FAR, DFAR, or other clause or provision that addresses +Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the +extent necessary to make it enforceable. This License shall be +governed by the law of the jurisdiction specified in a notice +contained within the Original Software (except to the extent +applicable law, if any, provides otherwise), excluding such +jurisdiction's conflict-of-law provisions. Any litigation +relating to this License shall be subject to the jurisdiction of +the courts located in the jurisdiction and venue specified in a +notice contained within the Original Software, with the losing +party responsible for costs, including, without limitation, court +costs and reasonable attorneys' fees and expenses. The +application of the United Nations Convention on Contracts for the +International Sale of Goods is expressly excluded. Any law or +regulation which provides that the language of a contract shall +be construed against the drafter shall not apply to this License. +You agree that You alone are responsible for compliance with the +United States export administration regulations (and the export +control laws and regulation of any other countries) when You use, +distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is +responsible for claims and damages arising, directly or +indirectly, out of its utilization of rights under this License +and You agree to work with Initial Developer and Contributors to +distribute such responsibility on an equitable basis. Nothing +herein is intended or shall be deemed to constitute any admission +of liability. + + + + +%% The following software may be included in this product: + wsdl4j-1.6.1.jar + +Use of any of this software is governed by the terms of the license below: + +Common Public License Version 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial code and +documentation distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + + i) changes to the Program, and + + ii) additions to the Program; + + where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not +derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when +combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, +including all Contributors. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to +reproduce, prepare derivative works of, publicly display, publicly perform, +distribute and sublicense the Contribution of such Contributor, if any, and such +derivative works, in source code and object code form. + + b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations +which include the Contribution. No hardware per se is licensed hereunder. + + c) Recipient understands that although each Contributor grants the licenses +to its Contributions set forth herein, no assurances are provided by any +Contributor that the Program does not infringe the patent or other intellectual +property rights of any other entity. Each Contributor disclaims any liability to +Recipient for claims brought by any other entity based on infringement of +intellectual property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes sole +responsibility to secure any other intellectual property rights needed, if any. +For example, if a third party patent license is required to allow Recipient to +distribute the Program, it is Recipient's responsibility to acquire that license +before distributing the Program. + + d) Each Contributor represents that to its knowledge it has sufficient +copyright rights in its Contribution, if any, to grant the copyright license set +forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its +own license agreement, provided that: + + a) it complies with the terms and conditions of this Agreement; and + + b) its license agreement: + + i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and +fitness for a particular purpose; + + ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential +damages, such as lost profits; + + iii) states that any provisions which differ from this Agreement are offered +by that Contributor alone and not by any other party; and + + iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable manner on or +through a medium customarily used for software exchange. + +When the Program is made available in source code form: + + a) it must be made available under this Agreement; and + + b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the +Program. + +Each Contributor must identify itself as the originator of its Contribution, if +any, in a manner that reasonably allows subsequent Recipients to identify the +originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, if +a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, damages +and costs (collectively "Losses") arising from claims, lawsuits and other legal +actions brought by a third party against the Indemnified Contributor to the +extent caused by the acts or omissions of such Commercial Contributor in +connection with its distribution of the Program in a commercial product +offering. The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. In order +to qualify, an Indemnified Contributor must: a) promptly notify the Commercial +Contributor in writing of such claim, and b) allow the Commercial Contributor to +control, and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may participate in +any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its exercise of +rights under this Agreement, including but not limited to the risks and costs of +program errors, compliance with applicable laws, damage to or loss of data, +programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such +provision valid and enforceable. + +If Recipient institutes patent litigation against a Contributor with respect to +a patent applicable to software (including a cross-claim or counterclaim in a +lawsuit), then any patent licenses granted by that Contributor to such Recipient +under this Agreement shall terminate as of the date such litigation is filed. In +addition, if Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under +Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and +survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +IBM is the initial Agreement Steward. IBM may assign the responsibility to serve +as the Agreement Steward to a suitable separate entity. Each new version of the +Agreement will be given a distinguishing version number. The Program (including +Contributions) may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the Agreement +is published, Contributor may elect to distribute the Program (including its +Contributions) under the new version. Except as expressly stated in Sections +2(a) and 2(b) above, Recipient receives no rights or licenses to the +intellectual property of any Contributor under this Agreement, whether +expressly, by implication, estoppel or otherwise. All rights in the Program not +expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in +any resulting litigation. diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-activate-license b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-activate-license new file mode 100755 index 0000000000..9e43e8f211 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-activate-license @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ActivateLicense "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-activate-license.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-activate-license.cmd new file mode 100644 index 0000000000..e63fcf6614 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-activate-license.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ActivateLicense %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-group b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-group new file mode 100755 index 0000000000..fe132c0b88 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-group @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AddGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-group.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-group.cmd new file mode 100644 index 0000000000..95c9cf792f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-group.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AddGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-keypair b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-keypair new file mode 100755 index 0000000000..eaca16ee96 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-keypair @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateKeyPair "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-keypair.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-keypair.cmd new file mode 100644 index 0000000000..8af3736f78 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-add-keypair.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateKeyPair %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-allocate-address b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-allocate-address new file mode 100755 index 0000000000..e5ad590a99 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-allocate-address @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AllocateAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-allocate-address.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-allocate-address.cmd new file mode 100644 index 0000000000..515f73ccbb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-allocate-address.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AllocateAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-assign-private-ip-addresses b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-assign-private-ip-addresses new file mode 100755 index 0000000000..9c19694117 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-assign-private-ip-addresses @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssignPrivateIPAddresses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-assign-private-ip-addresses.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-assign-private-ip-addresses.cmd new file mode 100644 index 0000000000..e6a8ee3007 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-assign-private-ip-addresses.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssignPrivateIPAddresses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-address b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-address new file mode 100755 index 0000000000..71bac9a039 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-address @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssociateAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-address.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-address.cmd new file mode 100644 index 0000000000..7282aad076 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-address.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssociateAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-dhcp-options b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-dhcp-options new file mode 100755 index 0000000000..90e817ce0a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-dhcp-options @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssociateDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-dhcp-options.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-dhcp-options.cmd new file mode 100644 index 0000000000..f2700e63f4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-dhcp-options.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssociateDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-route-table b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-route-table new file mode 100755 index 0000000000..ae05a62121 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-route-table @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssociateRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-route-table.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-route-table.cmd new file mode 100644 index 0000000000..b470b9e07d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-associate-route-table.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssociateRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-internet-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-internet-gateway new file mode 100755 index 0000000000..f200bb7f6d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-internet-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-internet-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-internet-gateway.cmd new file mode 100644 index 0000000000..fbd57d01a8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-internet-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-network-interface b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-network-interface new file mode 100755 index 0000000000..38adf55b32 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-network-interface @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-network-interface.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-network-interface.cmd new file mode 100644 index 0000000000..c59e581a70 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-network-interface.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-volume b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-volume new file mode 100755 index 0000000000..ef528b2ae5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-volume @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-volume.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-volume.cmd new file mode 100644 index 0000000000..da3cb63fa0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-volume.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-vpn-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-vpn-gateway new file mode 100755 index 0000000000..33553b3756 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-vpn-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-vpn-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-vpn-gateway.cmd new file mode 100644 index 0000000000..7cee686690 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-attach-vpn-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-authorize b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-authorize new file mode 100755 index 0000000000..105c65c19f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-authorize @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AuthorizeGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-authorize.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-authorize.cmd new file mode 100644 index 0000000000..f44cf8a5f8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-authorize.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AuthorizeGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-bundle-instance b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-bundle-instance new file mode 100755 index 0000000000..c8dab0b793 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-bundle-instance @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd BundleInstance "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-bundle-instance.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-bundle-instance.cmd new file mode 100644 index 0000000000..391fb6d6c4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-bundle-instance.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" BundleInstance %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-bundle-task b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-bundle-task new file mode 100755 index 0000000000..b735de3f5b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-bundle-task @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelBundleTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-bundle-task.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-bundle-task.cmd new file mode 100644 index 0000000000..b95c160356 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-bundle-task.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelBundleTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-conversion-task b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-conversion-task new file mode 100755 index 0000000000..808bb991d7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-conversion-task @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelConversionTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-conversion-task.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-conversion-task.cmd new file mode 100644 index 0000000000..bbaf87f71f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-conversion-task.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelConversionTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-export-task b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-export-task new file mode 100755 index 0000000000..ae73dd09ad --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-export-task @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelExportTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-export-task.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-export-task.cmd new file mode 100644 index 0000000000..08a94182f3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-export-task.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelExportTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-reserved-instances-listing b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-reserved-instances-listing new file mode 100755 index 0000000000..7d147e7617 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-reserved-instances-listing @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelReservedInstancesListing "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-reserved-instances-listing.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-reserved-instances-listing.cmd new file mode 100644 index 0000000000..51312daaa7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-reserved-instances-listing.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelReservedInstancesListing %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-spot-instance-requests b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-spot-instance-requests new file mode 100755 index 0000000000..f0463aefbe --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-spot-instance-requests @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelSpotInstanceRequests "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-spot-instance-requests.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-spot-instance-requests.cmd new file mode 100644 index 0000000000..355f578feb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cancel-spot-instance-requests.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelSpotInstanceRequests %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cmd new file mode 100755 index 0000000000..691422e2f1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cmd @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# Copyright 2006-2009 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +# This script "concentrates" all of our Java invocations into a single location +# for maintainability. + +# 'Globals' +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:-EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +LIBDIR="${EC2_HOME}/lib" + +# Check our Java env +JAVA_HOME=${JAVA_HOME:?JAVA_HOME is not set} + +# If a classpath exists preserve it +CP="${CLASSPATH}" + +# Check for cygwin bash so we use the correct path separator +case "`uname`" in + CYGWIN*) cygwin=true;; +esac + +# ---- Start of Cygwin test ---- + +cygprop="" + +# And add our own libraries too +if [ "${cygwin}" == "true" ] ; then + cygprop="-Dec2.cygwin=true" + + # Make sure that when using Cygwin we use Unix + # Semantics for EC2_HOME + if [ -n "${EC2_HOME}" ] + then + if echo "${EC2_HOME}"|egrep -q '[[:alpha:]]:\\' + then + echo + echo " *INFO* Your EC2_HOME variable needs to specified as a Unix path under Cygwin" + echo + fi + fi + +# ---- End of Cygwin Tests ---- + + for jar in "${LIBDIR}"/*.jar ; do + cygjar=$(cygpath -w -a "${jar}") + CP="${CP};${cygjar}" + done +else + for jar in "${LIBDIR}"/*.jar ; do + CP="${CP}:${jar}" + done +fi + +CMD=$1 +shift +"${JAVA_HOME}/bin/java" ${EC2_JVM_ARGS} ${cygprop} -classpath "${CP}" "com.amazon.aes.webservices.client.cmd.${CMD}" $EC2_DEFAULT_ARGS "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cmd.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cmd.cmd new file mode 100644 index 0000000000..301007e4e8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-cmd.cmd @@ -0,0 +1,94 @@ +@echo off + +setlocal + +REM Copyright 2006-2009 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_JAVA_HOME=_%JAVA_HOME% +set CHK_EC2_HOME=_%EC2_HOME% + +if "%CHK_EC2_HOME:"=%" == "_" goto EC2_HOME_MISSING +if "%CHK_JAVA_HOME:"=%" == "_" goto JAVA_HOME_MISSING + +REM If a classpath exists preserve it +SET CP="%CLASSPATH%" + +REM Brute force +set CP=%CP%;%EC2_HOME%\lib\AWSEC2JavaClient-1.2ux.jar +set CP=%CP%;%EC2_HOME%\lib\AWSJavaClientRuntime-1.1.jar +set CP=%CP%;%EC2_HOME%\lib\BlockDeviceLib-1.0.jar +set CP=%CP%;%EC2_HOME%\lib\EC2CltJavaClient-1.0.jar +set CP=%CP%;%EC2_HOME%\lib\EC2ConversionLib-1.0.jar +set CP=%CP%;%EC2_HOME%\lib\EC2WsdlJavaClient-1.0.jar +set CP=%CP%;%EC2_HOME%\lib\HttpClientSslContrib-1.0.jar +set CP=%CP%;%EC2_HOME%\lib\XmlSchema-1.4.5.jar +set CP=%CP%;%EC2_HOME%\lib\activation-1.1.jar +set CP=%CP%;%EC2_HOME%\lib\bcprov-jdk15-145.jar +set CP=%CP%;%EC2_HOME%\lib\commons-cli-1.1.jar +set CP=%CP%;%EC2_HOME%\lib\commons-codec-1.4.jar +set CP=%CP%;%EC2_HOME%\lib\commons-discovery.jar +set CP=%CP%;%EC2_HOME%\lib\commons-httpclient-3.1.jar +set CP=%CP%;%EC2_HOME%\lib\commons-logging-adapters-1.1.1.jar +set CP=%CP%;%EC2_HOME%\lib\commons-logging-api-1.1.1.jar +set CP=%CP%;%EC2_HOME%\lib\ec2-api-tools-1.6.7.2.jar +set CP=%CP%;%EC2_HOME%\lib\httpclient-4.2.jar +set CP=%CP%;%EC2_HOME%\lib\httpcore-4.2.jar +set CP=%CP%;%EC2_HOME%\lib\j2ee_mail.jar +set CP=%CP%;%EC2_HOME%\lib\java-xmlbuilder-0.4.jar +set CP=%CP%;%EC2_HOME%\lib\jaxb-api.jar +set CP=%CP%;%EC2_HOME%\lib\jaxb-impl.jar +set CP=%CP%;%EC2_HOME%\lib\jaxws-api.jar +set CP=%CP%;%EC2_HOME%\lib\jdom.jar +set CP=%CP%;%EC2_HOME%\lib\jets3t-0.9.0.jar +set CP=%CP%;%EC2_HOME%\lib\jets3t-gui-0.9.0.jar +set CP=%CP%;%EC2_HOME%\lib\log4j-1.2.14.jar +set CP=%CP%;%EC2_HOME%\lib\serializer.jar +set CP=%CP%;%EC2_HOME%\lib\stax2-api-3.0.1.jar +set CP=%CP%;%EC2_HOME%\lib\woodstox-core-asl-4.0.5.jar +set CP=%CP%;%EC2_HOME%\lib\wsdl4j.jar +set CP=%CP%;%EC2_HOME%\lib\wss4j-1.5.3.jar +set CP=%CP%;%EC2_HOME%\lib\xalan.jar +set CP=%CP%;%EC2_HOME%\lib\xercesImpl.jar +set CP=%CP%;%EC2_HOME%\lib\xfire-all-1.2.6.jar +set CP=%CP%;%EC2_HOME%\lib\xfire-jsr181-api-1.0-M1.jar +set CP=%CP%;%EC2_HOME%\lib\xml-apis.jar +set CP=%CP%;%EC2_HOME%\lib\xmlsec.jar + +REM Grab the class name +SET CMD=%1 + +REM SHIFT doesn't affect %* so we need this clunky hack +SET ARGV=%2 +SHIFT +SHIFT +:ARGV_LOOP +IF (%1) == () GOTO ARGV_DONE +REM Get around strange quoting bug +SET ARG=%1 +SET ARG=%ARG:"=% +SET ARGV=%ARGV% "%ARG%" +SHIFT +GOTO ARGV_LOOP +:ARGV_DONE + +"%JAVA_HOME:"=%"\bin\java %EC2_JVM_ARGS% -classpath "%CP:"=%" "com.amazon.aes.webservices.client.cmd.%CMD%" %EC2_DEFAULT_ARGS% %ARGV% +goto DONE + +:JAVA_HOME_MISSING +echo JAVA_HOME is not set +exit /b 1 + +:EC2_HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE +endlocal diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-confirm-product-instance b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-confirm-product-instance new file mode 100755 index 0000000000..c48eb77119 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-confirm-product-instance @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ConfirmProductInstance "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-confirm-product-instance.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-confirm-product-instance.cmd new file mode 100644 index 0000000000..47ce3d62b1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-confirm-product-instance.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ConfirmProductInstance %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-image b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-image new file mode 100755 index 0000000000..eb3c519f89 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-image @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CopyImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-image.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-image.cmd new file mode 100644 index 0000000000..79e6f37924 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-image.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CopyImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-snapshot b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-snapshot new file mode 100755 index 0000000000..1b632a841b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-snapshot @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CopySnapshot "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-snapshot.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-snapshot.cmd new file mode 100644 index 0000000000..c84c802f14 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-copy-snapshot.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CopySnapshot %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-customer-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-customer-gateway new file mode 100755 index 0000000000..902bb1d2ec --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-customer-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateCustomerGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-customer-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-customer-gateway.cmd new file mode 100644 index 0000000000..2df480cc3a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-customer-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateCustomerGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-dhcp-options b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-dhcp-options new file mode 100755 index 0000000000..f46e3d4817 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-dhcp-options @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-dhcp-options.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-dhcp-options.cmd new file mode 100644 index 0000000000..3c0295667d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-dhcp-options.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-group b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-group new file mode 100755 index 0000000000..fe132c0b88 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-group @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AddGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-group.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-group.cmd new file mode 100644 index 0000000000..95c9cf792f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-group.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AddGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-image b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-image new file mode 100755 index 0000000000..ecf273b777 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-image @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-image.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-image.cmd new file mode 100644 index 0000000000..925363eb95 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-image.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-instance-export-task b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-instance-export-task new file mode 100755 index 0000000000..427132c7fe --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-instance-export-task @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateInstanceExportTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-instance-export-task.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-instance-export-task.cmd new file mode 100644 index 0000000000..833b9102ae --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-instance-export-task.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateInstanceExportTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-internet-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-internet-gateway new file mode 100755 index 0000000000..16cd42a42f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-internet-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-internet-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-internet-gateway.cmd new file mode 100644 index 0000000000..3103341036 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-internet-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-keypair b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-keypair new file mode 100755 index 0000000000..eaca16ee96 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-keypair @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateKeyPair "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-keypair.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-keypair.cmd new file mode 100644 index 0000000000..8af3736f78 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-keypair.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateKeyPair %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl new file mode 100755 index 0000000000..86f042bb80 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateNetworkAcl "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl-entry b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl-entry new file mode 100755 index 0000000000..1652ec61ef --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl-entry @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateNetworkAclEntry "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl-entry.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl-entry.cmd new file mode 100644 index 0000000000..3c5be46075 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl-entry.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateNetworkAclEntry %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl.cmd new file mode 100644 index 0000000000..5f98b74a38 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-acl.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateNetworkAcl %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-interface b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-interface new file mode 100755 index 0000000000..d4dc1a4f7a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-interface @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-interface.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-interface.cmd new file mode 100644 index 0000000000..3b06ea93a2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-network-interface.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-placement-group b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-placement-group new file mode 100755 index 0000000000..586e8b9d5a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-placement-group @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreatePlacementGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-placement-group.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-placement-group.cmd new file mode 100644 index 0000000000..80915b9406 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-placement-group.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreatePlacementGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-reserved-instances-listing b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-reserved-instances-listing new file mode 100755 index 0000000000..cf342b3b32 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-reserved-instances-listing @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateReservedInstancesListing "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-reserved-instances-listing.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-reserved-instances-listing.cmd new file mode 100644 index 0000000000..b37633e81d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-reserved-instances-listing.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateReservedInstancesListing %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route new file mode 100755 index 0000000000..184fccacdf --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route-table b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route-table new file mode 100755 index 0000000000..ec4af52236 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route-table @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route-table.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route-table.cmd new file mode 100644 index 0000000000..c8d747bac1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route-table.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route.cmd new file mode 100644 index 0000000000..676dc56e2b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-route.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-snapshot b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-snapshot new file mode 100755 index 0000000000..44850ae6df --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-snapshot @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateSnapshot "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-snapshot.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-snapshot.cmd new file mode 100644 index 0000000000..13805adece --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-snapshot.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateSnapshot %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-spot-datafeed-subscription b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-spot-datafeed-subscription new file mode 100755 index 0000000000..5c7cb1768b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-spot-datafeed-subscription @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateSpotDatafeedSubscription "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-spot-datafeed-subscription.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-spot-datafeed-subscription.cmd new file mode 100644 index 0000000000..2a70d5821a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-spot-datafeed-subscription.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateSpotDatafeedSubscription %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-subnet b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-subnet new file mode 100755 index 0000000000..0e9336b766 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-subnet @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateSubnet "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-subnet.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-subnet.cmd new file mode 100644 index 0000000000..fba3c7d36d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-subnet.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateSubnet %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-tags b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-tags new file mode 100755 index 0000000000..32da9ee617 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-tags @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateTags "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-tags.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-tags.cmd new file mode 100644 index 0000000000..c42aead081 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-tags.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateTags %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-volume b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-volume new file mode 100755 index 0000000000..23c09fac67 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-volume @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-volume.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-volume.cmd new file mode 100644 index 0000000000..5b26b57b82 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-volume.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpc b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpc new file mode 100755 index 0000000000..557b9fc8bf --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpc "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpc.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpc.cmd new file mode 100644 index 0000000000..3bd673c96a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpc.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpc %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection new file mode 100755 index 0000000000..3ebb8d2b0b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpnConnection "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection-route b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection-route new file mode 100755 index 0000000000..5125c3de95 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection-route @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpnConnectionRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection-route.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection-route.cmd new file mode 100644 index 0000000000..b5fe9104a6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection-route.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpnConnectionRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection.cmd new file mode 100644 index 0000000000..874b187bd9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-connection.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpnConnection %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-gateway new file mode 100755 index 0000000000..847a654958 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-gateway.cmd new file mode 100644 index 0000000000..e0be1f7cba --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-create-vpn-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deactivate-license b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deactivate-license new file mode 100755 index 0000000000..1b93b7066e --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deactivate-license @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeactivateLicense "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deactivate-license.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deactivate-license.cmd new file mode 100644 index 0000000000..dbb0a65405 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deactivate-license.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeactivateLicense %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-customer-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-customer-gateway new file mode 100755 index 0000000000..0f67ec9b5a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-customer-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteCustomerGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-customer-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-customer-gateway.cmd new file mode 100644 index 0000000000..212ccf6a13 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-customer-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteCustomerGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-dhcp-options b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-dhcp-options new file mode 100755 index 0000000000..d3485902a9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-dhcp-options @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-dhcp-options.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-dhcp-options.cmd new file mode 100644 index 0000000000..93b9ed7ab2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-dhcp-options.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-disk-image b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-disk-image new file mode 100755 index 0000000000..ea41bd747f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-disk-image @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteDiskImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-disk-image.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-disk-image.cmd new file mode 100644 index 0000000000..5a3a9205a0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-disk-image.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteDiskImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-group b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-group new file mode 100755 index 0000000000..ddf97c4678 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-group @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-group.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-group.cmd new file mode 100644 index 0000000000..ae152d04c3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-group.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-internet-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-internet-gateway new file mode 100755 index 0000000000..1cd5e57f3f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-internet-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-internet-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-internet-gateway.cmd new file mode 100644 index 0000000000..af825336f1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-internet-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-keypair b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-keypair new file mode 100755 index 0000000000..137e730c81 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-keypair @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteKeyPair "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-keypair.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-keypair.cmd new file mode 100644 index 0000000000..1aa456ea20 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-keypair.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteKeyPair %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl new file mode 100755 index 0000000000..48b59160f9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteNetworkAcl "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl-entry b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl-entry new file mode 100755 index 0000000000..381b147560 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl-entry @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteNetworkAclEntry "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl-entry.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl-entry.cmd new file mode 100644 index 0000000000..e75e368f58 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl-entry.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteNetworkAclEntry %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl.cmd new file mode 100644 index 0000000000..c611693d62 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-acl.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteNetworkAcl %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-interface b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-interface new file mode 100755 index 0000000000..1ef6731423 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-interface @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-interface.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-interface.cmd new file mode 100644 index 0000000000..21cfe17792 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-network-interface.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-placement-group b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-placement-group new file mode 100755 index 0000000000..935fc7d0fb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-placement-group @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeletePlacementGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-placement-group.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-placement-group.cmd new file mode 100644 index 0000000000..e4d4906c82 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-placement-group.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeletePlacementGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route new file mode 100755 index 0000000000..c24e6e767f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route-table b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route-table new file mode 100755 index 0000000000..e0804c16bd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route-table @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route-table.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route-table.cmd new file mode 100644 index 0000000000..893a9f3c79 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route-table.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route.cmd new file mode 100644 index 0000000000..3a89bd5412 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-route.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-snapshot b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-snapshot new file mode 100755 index 0000000000..5ca925233c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-snapshot @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteSnapshot "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-snapshot.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-snapshot.cmd new file mode 100644 index 0000000000..b9049c28df --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-snapshot.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteSnapshot %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-spot-datafeed-subscription b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-spot-datafeed-subscription new file mode 100755 index 0000000000..2efc102d1c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-spot-datafeed-subscription @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteSpotDatafeedSubscription "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-spot-datafeed-subscription.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-spot-datafeed-subscription.cmd new file mode 100644 index 0000000000..246ac9a393 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-spot-datafeed-subscription.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteSpotDatafeedSubscription %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-subnet b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-subnet new file mode 100755 index 0000000000..35297d2fe0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-subnet @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteSubnet "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-subnet.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-subnet.cmd new file mode 100644 index 0000000000..040aed7114 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-subnet.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteSubnet %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-tags b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-tags new file mode 100755 index 0000000000..d8abe111cc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-tags @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteTags "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-tags.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-tags.cmd new file mode 100644 index 0000000000..b75c19f505 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-tags.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteTags %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-volume b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-volume new file mode 100755 index 0000000000..136a8e69b1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-volume @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-volume.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-volume.cmd new file mode 100644 index 0000000000..ee89bc15c8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-volume.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpc b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpc new file mode 100755 index 0000000000..fb2e3784dd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpc "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpc.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpc.cmd new file mode 100644 index 0000000000..d1cd551917 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpc.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpc %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection new file mode 100755 index 0000000000..d08651b1b7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpnConnection "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection-route b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection-route new file mode 100755 index 0000000000..ab9a0e8760 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection-route @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpnConnectionRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection-route.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection-route.cmd new file mode 100644 index 0000000000..7003ca23c2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection-route.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpnConnectionRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection.cmd new file mode 100644 index 0000000000..cd5e64e19d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-connection.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpnConnection %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-gateway new file mode 100755 index 0000000000..009c127510 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-gateway.cmd new file mode 100644 index 0000000000..4c44092140 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-delete-vpn-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deregister b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deregister new file mode 100755 index 0000000000..cfccbc474d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deregister @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeregisterImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deregister.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deregister.cmd new file mode 100644 index 0000000000..ddf82632f1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-deregister.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeregisterImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-account-attributes b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-account-attributes new file mode 100755 index 0000000000..784ba1dac1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-account-attributes @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeAccountAttributes "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-account-attributes.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-account-attributes.cmd new file mode 100644 index 0000000000..f0fc95a3f2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-account-attributes.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeAccountAttributes %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-addresses b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-addresses new file mode 100755 index 0000000000..c0d921fa4d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-addresses @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeAddresses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-addresses.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-addresses.cmd new file mode 100644 index 0000000000..670ee8de9c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-addresses.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeAddresses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-availability-zones b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-availability-zones new file mode 100755 index 0000000000..85aede10ea --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-availability-zones @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeAvailabilityZones "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-availability-zones.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-availability-zones.cmd new file mode 100644 index 0000000000..c9aac8ee51 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-availability-zones.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeAvailabilityZones %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-bundle-tasks b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-bundle-tasks new file mode 100755 index 0000000000..c389aa9747 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-bundle-tasks @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeBundleTasks "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-bundle-tasks.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-bundle-tasks.cmd new file mode 100644 index 0000000000..0eb209822f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-bundle-tasks.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeBundleTasks %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-conversion-tasks b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-conversion-tasks new file mode 100755 index 0000000000..eb324a5074 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-conversion-tasks @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeConversionTasks "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-conversion-tasks.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-conversion-tasks.cmd new file mode 100644 index 0000000000..7167fd29fc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-conversion-tasks.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeConversionTasks %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-customer-gateways b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-customer-gateways new file mode 100755 index 0000000000..b58f47c5e9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-customer-gateways @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeCustomerGateways "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-customer-gateways.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-customer-gateways.cmd new file mode 100644 index 0000000000..aa6c306642 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-customer-gateways.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeCustomerGateways %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-dhcp-options b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-dhcp-options new file mode 100755 index 0000000000..cb192205f5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-dhcp-options @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-dhcp-options.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-dhcp-options.cmd new file mode 100644 index 0000000000..c036a24491 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-dhcp-options.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-export-tasks b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-export-tasks new file mode 100755 index 0000000000..4e66d8c906 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-export-tasks @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeExportTasks "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-export-tasks.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-export-tasks.cmd new file mode 100644 index 0000000000..12240e3bd9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-export-tasks.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeExportTasks %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-group b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-group new file mode 100755 index 0000000000..99156d177b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-group @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeGroups "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-group.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-group.cmd new file mode 100644 index 0000000000..554048fd2a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-group.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeGroups %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-image-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-image-attribute new file mode 100755 index 0000000000..17ef557481 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-image-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-image-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-image-attribute.cmd new file mode 100644 index 0000000000..2b7c4411c3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-image-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-images b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-images new file mode 100755 index 0000000000..f1891a88a8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-images @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeImages "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-images.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-images.cmd new file mode 100644 index 0000000000..6ef2c27a99 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-images.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeImages %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-attribute new file mode 100755 index 0000000000..c37a78cbfd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-attribute.cmd new file mode 100644 index 0000000000..35f61c64a1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-status b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-status new file mode 100755 index 0000000000..a9f4136e7f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-status @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInstanceStatus "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-status.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-status.cmd new file mode 100644 index 0000000000..9f8776b4b4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instance-status.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstanceStatus %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instances new file mode 100755 index 0000000000..4aaf64c5b8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instances.cmd new file mode 100644 index 0000000000..c702d5a904 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-internet-gateways b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-internet-gateways new file mode 100755 index 0000000000..45ad9128c0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-internet-gateways @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInternetGateways "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-internet-gateways.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-internet-gateways.cmd new file mode 100644 index 0000000000..67b62537ac --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-internet-gateways.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInternetGateways %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-keypairs b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-keypairs new file mode 100755 index 0000000000..8384b73e69 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-keypairs @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeKeyPairs "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-keypairs.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-keypairs.cmd new file mode 100644 index 0000000000..6e84eed8aa --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-keypairs.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeKeyPairs %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-licenses b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-licenses new file mode 100755 index 0000000000..78434ed6ee --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-licenses @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeLicenses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-licenses.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-licenses.cmd new file mode 100644 index 0000000000..f79cf98349 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-licenses.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeLicenses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-acls b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-acls new file mode 100755 index 0000000000..ec2582387f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-acls @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeNetworkAcls "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-acls.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-acls.cmd new file mode 100644 index 0000000000..fe6bc9252f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-acls.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeNetworkAcls %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interface-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interface-attribute new file mode 100755 index 0000000000..46df87633a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interface-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeNetworkInterfaceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interface-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interface-attribute.cmd new file mode 100644 index 0000000000..3d16092691 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interface-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeNetworkInterfaceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interfaces b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interfaces new file mode 100755 index 0000000000..7b740f8fdc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interfaces @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeNetworkInterfaces "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interfaces.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interfaces.cmd new file mode 100644 index 0000000000..566a2db986 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-network-interfaces.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeNetworkInterfaces %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-placement-groups b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-placement-groups new file mode 100755 index 0000000000..9e430833bb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-placement-groups @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribePlacementGroups "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-placement-groups.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-placement-groups.cmd new file mode 100644 index 0000000000..38e2ba685c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-placement-groups.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribePlacementGroups %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-regions b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-regions new file mode 100755 index 0000000000..a4ca99aa70 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-regions @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeRegions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-regions.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-regions.cmd new file mode 100644 index 0000000000..68132ca652 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-regions.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeRegions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances new file mode 100755 index 0000000000..172c063261 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeReservedInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-listings b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-listings new file mode 100755 index 0000000000..dbf85627e5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-listings @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeReservedInstancesListings "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-listings.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-listings.cmd new file mode 100644 index 0000000000..3aaabff864 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-listings.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeReservedInstancesListings %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-offerings b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-offerings new file mode 100755 index 0000000000..4730941e37 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-offerings @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeReservedInstancesOfferings "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-offerings.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-offerings.cmd new file mode 100644 index 0000000000..b509f0b144 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances-offerings.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeReservedInstancesOfferings %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances.cmd new file mode 100644 index 0000000000..f7a4d66f3c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-reserved-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeReservedInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-route-tables b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-route-tables new file mode 100755 index 0000000000..9431963259 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-route-tables @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeRouteTables "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-route-tables.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-route-tables.cmd new file mode 100644 index 0000000000..29557d865d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-route-tables.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeRouteTables %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshot-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshot-attribute new file mode 100755 index 0000000000..28e390f15f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshot-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSnapshotAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshot-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshot-attribute.cmd new file mode 100644 index 0000000000..71974563ed --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshot-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSnapshotAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshots b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshots new file mode 100755 index 0000000000..a86227e3b1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshots @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSnapshots "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshots.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshots.cmd new file mode 100644 index 0000000000..accf2aa284 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-snapshots.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSnapshots %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-datafeed-subscription b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-datafeed-subscription new file mode 100755 index 0000000000..6a433f5399 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-datafeed-subscription @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSpotDatafeedSubscription "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-datafeed-subscription.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-datafeed-subscription.cmd new file mode 100644 index 0000000000..671b84a659 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-datafeed-subscription.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSpotDatafeedSubscription %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-instance-requests b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-instance-requests new file mode 100755 index 0000000000..a492a0d9ef --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-instance-requests @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSpotInstanceRequests "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-instance-requests.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-instance-requests.cmd new file mode 100644 index 0000000000..3eeaa949fd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-instance-requests.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSpotInstanceRequests %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-price-history b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-price-history new file mode 100755 index 0000000000..9c2e20f930 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-price-history @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSpotPriceHistory "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-price-history.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-price-history.cmd new file mode 100644 index 0000000000..915791ed76 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-spot-price-history.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSpotPriceHistory %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-subnets b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-subnets new file mode 100755 index 0000000000..49e5d9a49c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-subnets @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSubnets "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-subnets.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-subnets.cmd new file mode 100644 index 0000000000..dded55d087 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-subnets.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSubnets %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-tags b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-tags new file mode 100755 index 0000000000..c49eccbaa6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-tags @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeTags "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-tags.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-tags.cmd new file mode 100644 index 0000000000..3a86f1cad2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-tags.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeTags %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-attribute new file mode 100755 index 0000000000..1b0b2e2e2b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVolumeAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-attribute.cmd new file mode 100644 index 0000000000..a826213485 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVolumeAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-status b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-status new file mode 100755 index 0000000000..625fe3fc9f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-status @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVolumeStatus "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-status.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-status.cmd new file mode 100644 index 0000000000..2fc39aceef --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volume-status.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVolumeStatus %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volumes b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volumes new file mode 100755 index 0000000000..65c7e8a293 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volumes @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVolumes "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volumes.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volumes.cmd new file mode 100644 index 0000000000..c3d84fd378 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-volumes.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVolumes %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpc-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpc-attribute new file mode 100755 index 0000000000..f1ea7ee695 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpc-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpcAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpc-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpc-attribute.cmd new file mode 100644 index 0000000000..44a9836e30 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpc-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpcAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpcs b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpcs new file mode 100755 index 0000000000..dd60d8826a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpcs @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpcs "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpcs.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpcs.cmd new file mode 100644 index 0000000000..4284c94f4c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpcs.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpcs %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-connections b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-connections new file mode 100755 index 0000000000..b841ae0909 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-connections @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpnConnections "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-connections.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-connections.cmd new file mode 100644 index 0000000000..e08a3b0cd7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-connections.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpnConnections %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-gateways b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-gateways new file mode 100755 index 0000000000..671fe031bd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-gateways @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpnGateways "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-gateways.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-gateways.cmd new file mode 100644 index 0000000000..a20f5d61e5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-describe-vpn-gateways.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpnGateways %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-internet-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-internet-gateway new file mode 100755 index 0000000000..8691d665a1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-internet-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-internet-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-internet-gateway.cmd new file mode 100644 index 0000000000..d46cf91b4e --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-internet-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-network-interface b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-network-interface new file mode 100755 index 0000000000..386f7ac6b3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-network-interface @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-network-interface.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-network-interface.cmd new file mode 100644 index 0000000000..719c9c5484 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-network-interface.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-volume b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-volume new file mode 100755 index 0000000000..50eb1f7ceb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-volume @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-volume.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-volume.cmd new file mode 100644 index 0000000000..dca3779da3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-volume.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-vpn-gateway b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-vpn-gateway new file mode 100755 index 0000000000..8a8c36e501 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-vpn-gateway @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-vpn-gateway.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-vpn-gateway.cmd new file mode 100644 index 0000000000..961e335973 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-detach-vpn-gateway.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disable-vgw-route-propagation b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disable-vgw-route-propagation new file mode 100755 index 0000000000..9d47844404 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disable-vgw-route-propagation @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DisableVgwRoutePropagation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disable-vgw-route-propagation.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disable-vgw-route-propagation.cmd new file mode 100644 index 0000000000..b59f286449 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disable-vgw-route-propagation.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DisableVgwRoutePropagation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-address b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-address new file mode 100755 index 0000000000..52ffeac9d1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-address @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DisassociateAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-address.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-address.cmd new file mode 100644 index 0000000000..197b2662e1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-address.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DisassociateAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-route-table b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-route-table new file mode 100755 index 0000000000..923f055eab --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-route-table @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DisassociateRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-route-table.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-route-table.cmd new file mode 100644 index 0000000000..727742d425 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-disassociate-route-table.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DisassociateRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-vgw-route-propagation b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-vgw-route-propagation new file mode 100755 index 0000000000..321872ce52 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-vgw-route-propagation @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd EnableVgwRoutePropagation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-vgw-route-propagation.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-vgw-route-propagation.cmd new file mode 100644 index 0000000000..e5256b7f00 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-vgw-route-propagation.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" EnableVgwRoutePropagation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-volume-io b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-volume-io new file mode 100755 index 0000000000..9eccbfaa28 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-volume-io @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd EnableVolumeIO "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-volume-io.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-volume-io.cmd new file mode 100644 index 0000000000..cb0b54e8c6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-enable-volume-io.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" EnableVolumeIO %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-fingerprint-key b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-fingerprint-key new file mode 100755 index 0000000000..ab1fac7245 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-fingerprint-key @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd FingerprintKey "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-fingerprint-key.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-fingerprint-key.cmd new file mode 100644 index 0000000000..995eaf096b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-fingerprint-key.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" FingerprintKey %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-console-output b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-console-output new file mode 100755 index 0000000000..f762dc6cc7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-console-output @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd GetConsoleOutput "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-console-output.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-console-output.cmd new file mode 100644 index 0000000000..cd6bc2ba1f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-console-output.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" GetConsoleOutput %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-password b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-password new file mode 100755 index 0000000000..901e8ac175 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-password @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd GetPassword "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-password.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-password.cmd new file mode 100644 index 0000000000..31c48df9b4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-get-password.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" GetPassword %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-instance b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-instance new file mode 100755 index 0000000000..7c35d3a4b9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-instance @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportInstance "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-instance.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-instance.cmd new file mode 100644 index 0000000000..1b28057e43 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-instance.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportInstance %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-keypair b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-keypair new file mode 100755 index 0000000000..8269590e3b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-keypair @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportKeyPair "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-keypair.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-keypair.cmd new file mode 100644 index 0000000000..3d2391f291 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-keypair.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportKeyPair %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-volume b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-volume new file mode 100755 index 0000000000..7e761691cd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-volume @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-volume.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-volume.cmd new file mode 100644 index 0000000000..7c4e4eae41 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-import-volume.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-migrate-image b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-migrate-image new file mode 100755 index 0000000000..41d6d7fb21 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-migrate-image @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd MigrateBundle "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-migrate-image.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-migrate-image.cmd new file mode 100644 index 0000000000..221a1991e7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-migrate-image.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" MigrateBundle %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-image-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-image-attribute new file mode 100755 index 0000000000..e9695cb2a2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-image-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-image-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-image-attribute.cmd new file mode 100644 index 0000000000..b4d85cb341 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-image-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-instance-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-instance-attribute new file mode 100755 index 0000000000..57955546d4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-instance-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-instance-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-instance-attribute.cmd new file mode 100644 index 0000000000..027d025c55 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-instance-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-network-interface-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-network-interface-attribute new file mode 100755 index 0000000000..9a528246dd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-network-interface-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyNetworkInterfaceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-network-interface-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-network-interface-attribute.cmd new file mode 100644 index 0000000000..826ff4369a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-network-interface-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyNetworkInterfaceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-snapshot-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-snapshot-attribute new file mode 100755 index 0000000000..b6bc26e4b5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-snapshot-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifySnapshotAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-snapshot-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-snapshot-attribute.cmd new file mode 100644 index 0000000000..f1a90fb367 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-snapshot-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifySnapshotAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-volume-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-volume-attribute new file mode 100755 index 0000000000..6809d12387 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-volume-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyVolumeAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-volume-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-volume-attribute.cmd new file mode 100644 index 0000000000..095000243b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-volume-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyVolumeAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-vpc-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-vpc-attribute new file mode 100755 index 0000000000..c93dcfe7f7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-vpc-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyVpcAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-vpc-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-vpc-attribute.cmd new file mode 100644 index 0000000000..ea63e0a664 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-modify-vpc-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyVpcAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-monitor-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-monitor-instances new file mode 100755 index 0000000000..de82612e20 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-monitor-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd MonitorInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-monitor-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-monitor-instances.cmd new file mode 100644 index 0000000000..572a6b5efa --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-monitor-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" MonitorInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-purchase-reserved-instances-offering b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-purchase-reserved-instances-offering new file mode 100755 index 0000000000..72786b22d2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-purchase-reserved-instances-offering @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd PurchaseReservedInstancesOffering "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-purchase-reserved-instances-offering.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-purchase-reserved-instances-offering.cmd new file mode 100644 index 0000000000..a0ca0e85ae --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-purchase-reserved-instances-offering.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" PurchaseReservedInstancesOffering %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reboot-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reboot-instances new file mode 100755 index 0000000000..b0342cd9af --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reboot-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RebootInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reboot-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reboot-instances.cmd new file mode 100644 index 0000000000..4b4fadf5bf --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reboot-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RebootInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-register b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-register new file mode 100755 index 0000000000..ba6edde941 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-register @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RegisterImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-register.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-register.cmd new file mode 100644 index 0000000000..8c07c0cf39 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-register.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RegisterImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-release-address b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-release-address new file mode 100755 index 0000000000..2a129b8157 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-release-address @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReleaseAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-release-address.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-release-address.cmd new file mode 100644 index 0000000000..9c16555949 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-release-address.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReleaseAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-association b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-association new file mode 100755 index 0000000000..146a43e2e1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-association @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceNetworkAclAssociation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-association.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-association.cmd new file mode 100644 index 0000000000..f49109271c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-association.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceNetworkAclAssociation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-entry b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-entry new file mode 100755 index 0000000000..b36dd60618 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-entry @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceNetworkAclEntry "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-entry.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-entry.cmd new file mode 100644 index 0000000000..995e49447a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-network-acl-entry.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceNetworkAclEntry %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route new file mode 100755 index 0000000000..fc09596869 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route-table-association b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route-table-association new file mode 100755 index 0000000000..8cf9770d3d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route-table-association @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceRouteTableAssociation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route-table-association.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route-table-association.cmd new file mode 100644 index 0000000000..ea149579e7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route-table-association.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceRouteTableAssociation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route.cmd new file mode 100644 index 0000000000..a1dfe2c69e --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-replace-route.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-report-instance-status b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-report-instance-status new file mode 100755 index 0000000000..039a4a8489 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-report-instance-status @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReportInstanceStatus "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-report-instance-status.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-report-instance-status.cmd new file mode 100644 index 0000000000..4d29c3ab3a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-report-instance-status.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReportInstanceStatus %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-request-spot-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-request-spot-instances new file mode 100755 index 0000000000..6dd9b772ba --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-request-spot-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RequestSpotInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-request-spot-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-request-spot-instances.cmd new file mode 100644 index 0000000000..2b91fa0069 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-request-spot-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RequestSpotInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-image-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-image-attribute new file mode 100755 index 0000000000..c3d7e41586 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-image-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-image-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-image-attribute.cmd new file mode 100644 index 0000000000..8f16319a8c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-image-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-instance-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-instance-attribute new file mode 100755 index 0000000000..9595bacbb5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-instance-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-instance-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-instance-attribute.cmd new file mode 100644 index 0000000000..39e2e248cc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-instance-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-network-interface-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-network-interface-attribute new file mode 100755 index 0000000000..b6f1a744d3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-network-interface-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetNetworkInterfaceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-network-interface-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-network-interface-attribute.cmd new file mode 100644 index 0000000000..b20b1c23ae --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-network-interface-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetNetworkInterfaceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-snapshot-attribute b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-snapshot-attribute new file mode 100755 index 0000000000..9c6b5e99fc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-snapshot-attribute @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetSnapshotAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-snapshot-attribute.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-snapshot-attribute.cmd new file mode 100644 index 0000000000..ec60739056 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-reset-snapshot-attribute.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetSnapshotAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-resume-import b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-resume-import new file mode 100755 index 0000000000..041e7364b6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-resume-import @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResumeImport "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-resume-import.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-resume-import.cmd new file mode 100644 index 0000000000..2251f189dc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-resume-import.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResumeImport %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-revoke b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-revoke new file mode 100755 index 0000000000..4bdd3c510f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-revoke @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RevokeGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-revoke.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-revoke.cmd new file mode 100644 index 0000000000..95da8963da --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-revoke.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RevokeGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-run-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-run-instances new file mode 100755 index 0000000000..a5ffff8b4d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-run-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RunInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-run-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-run-instances.cmd new file mode 100644 index 0000000000..24538d0cc5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-run-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RunInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-start-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-start-instances new file mode 100755 index 0000000000..cee02ea3a6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-start-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd StartInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-start-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-start-instances.cmd new file mode 100644 index 0000000000..4ad5cf7f41 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-start-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" StartInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-stop-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-stop-instances new file mode 100755 index 0000000000..9efe52c801 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-stop-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd StopInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-stop-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-stop-instances.cmd new file mode 100644 index 0000000000..f746962114 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-stop-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" StopInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-terminate-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-terminate-instances new file mode 100755 index 0000000000..1e4636ef70 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-terminate-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd TerminateInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-terminate-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-terminate-instances.cmd new file mode 100644 index 0000000000..1a01066d53 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-terminate-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" TerminateInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unassign-private-ip-addresses b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unassign-private-ip-addresses new file mode 100755 index 0000000000..3653bc8752 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unassign-private-ip-addresses @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd UnassignPrivateIPAddresses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unassign-private-ip-addresses.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unassign-private-ip-addresses.cmd new file mode 100644 index 0000000000..d1e631a3eb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unassign-private-ip-addresses.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" UnassignPrivateIPAddresses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unmonitor-instances b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unmonitor-instances new file mode 100755 index 0000000000..dcab91a6c1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unmonitor-instances @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd UnmonitorInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unmonitor-instances.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unmonitor-instances.cmd new file mode 100644 index 0000000000..b57dd1521b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-unmonitor-instances.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" UnmonitorInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-upload-disk-image b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-upload-disk-image new file mode 100755 index 0000000000..549c90f8de --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-upload-disk-image @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd UploadDiskImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-upload-disk-image.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-upload-disk-image.cmd new file mode 100644 index 0000000000..c342fec834 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-upload-disk-image.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" UploadDiskImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-version b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-version new file mode 100755 index 0000000000..4ec4762abd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-version @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ShowVersion "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2-version.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-version.cmd new file mode 100644 index 0000000000..b6dadd1232 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2-version.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ShowVersion %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2actlic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2actlic new file mode 100755 index 0000000000..9e43e8f211 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2actlic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ActivateLicense "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2actlic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2actlic.cmd new file mode 100644 index 0000000000..e63fcf6614 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2actlic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ActivateLicense %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addcgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addcgw new file mode 100755 index 0000000000..902bb1d2ec --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addcgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateCustomerGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addcgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addcgw.cmd new file mode 100644 index 0000000000..2df480cc3a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addcgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateCustomerGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2adddopt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2adddopt new file mode 100755 index 0000000000..f46e3d4817 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2adddopt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2adddopt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2adddopt.cmd new file mode 100644 index 0000000000..3c0295667d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2adddopt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addgrp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addgrp new file mode 100755 index 0000000000..fe132c0b88 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addgrp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AddGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addgrp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addgrp.cmd new file mode 100644 index 0000000000..95c9cf792f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addgrp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AddGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addigw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addigw new file mode 100755 index 0000000000..16cd42a42f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addigw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addigw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addigw.cmd new file mode 100644 index 0000000000..3103341036 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addigw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addixt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addixt new file mode 100755 index 0000000000..427132c7fe --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addixt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateInstanceExportTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addixt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addixt.cmd new file mode 100644 index 0000000000..833b9102ae --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addixt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateInstanceExportTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addkey b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addkey new file mode 100755 index 0000000000..eaca16ee96 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addkey @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateKeyPair "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addkey.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addkey.cmd new file mode 100644 index 0000000000..8af3736f78 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addkey.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateKeyPair %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnacl b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnacl new file mode 100755 index 0000000000..86f042bb80 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnacl @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateNetworkAcl "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnacl.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnacl.cmd new file mode 100644 index 0000000000..5f98b74a38 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnacl.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateNetworkAcl %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnae b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnae new file mode 100755 index 0000000000..1652ec61ef --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnae @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateNetworkAclEntry "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnae.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnae.cmd new file mode 100644 index 0000000000..3c5be46075 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnae.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateNetworkAclEntry %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnic new file mode 100755 index 0000000000..d4dc1a4f7a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnic.cmd new file mode 100644 index 0000000000..3b06ea93a2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addnic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addpgrp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addpgrp new file mode 100755 index 0000000000..586e8b9d5a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addpgrp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreatePlacementGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addpgrp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addpgrp.cmd new file mode 100644 index 0000000000..80915b9406 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addpgrp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreatePlacementGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrt new file mode 100755 index 0000000000..184fccacdf --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrt.cmd new file mode 100644 index 0000000000..676dc56e2b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrtb b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrtb new file mode 100755 index 0000000000..ec4af52236 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrtb @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrtb.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrtb.cmd new file mode 100644 index 0000000000..c8d747bac1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addrtb.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsds b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsds new file mode 100755 index 0000000000..5c7cb1768b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsds @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateSpotDatafeedSubscription "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsds.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsds.cmd new file mode 100644 index 0000000000..2a70d5821a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsds.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateSpotDatafeedSubscription %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsnap b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsnap new file mode 100755 index 0000000000..44850ae6df --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsnap @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateSnapshot "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsnap.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsnap.cmd new file mode 100644 index 0000000000..13805adece --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsnap.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateSnapshot %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsubnet b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsubnet new file mode 100755 index 0000000000..0e9336b766 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsubnet @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateSubnet "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsubnet.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsubnet.cmd new file mode 100644 index 0000000000..fba3c7d36d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addsubnet.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateSubnet %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addtag b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addtag new file mode 100755 index 0000000000..32da9ee617 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addtag @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateTags "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addtag.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addtag.cmd new file mode 100644 index 0000000000..c42aead081 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addtag.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateTags %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvgw new file mode 100755 index 0000000000..847a654958 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvgw.cmd new file mode 100644 index 0000000000..e0be1f7cba --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvol b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvol new file mode 100755 index 0000000000..23c09fac67 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvol @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvol.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvol.cmd new file mode 100644 index 0000000000..5b26b57b82 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvol.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpc b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpc new file mode 100755 index 0000000000..557b9fc8bf --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpc "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpc.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpc.cmd new file mode 100644 index 0000000000..3bd673c96a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpc.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpc %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpn b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpn new file mode 100755 index 0000000000..3ebb8d2b0b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpn @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpnConnection "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpn.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpn.cmd new file mode 100644 index 0000000000..874b187bd9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2addvpn.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpnConnection %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2allocaddr b/pandora_plugins/EC2/ec2-api-tools/bin/ec2allocaddr new file mode 100755 index 0000000000..e5ad590a99 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2allocaddr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AllocateAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2allocaddr.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2allocaddr.cmd new file mode 100644 index 0000000000..515f73ccbb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2allocaddr.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AllocateAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2apip b/pandora_plugins/EC2/ec2-api-tools/bin/ec2apip new file mode 100755 index 0000000000..9c19694117 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2apip @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssignPrivateIPAddresses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2apip.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2apip.cmd new file mode 100644 index 0000000000..e6a8ee3007 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2apip.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssignPrivateIPAddresses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocaddr b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocaddr new file mode 100755 index 0000000000..71bac9a039 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocaddr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssociateAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocaddr.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocaddr.cmd new file mode 100644 index 0000000000..7282aad076 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocaddr.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssociateAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocdopt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocdopt new file mode 100755 index 0000000000..90e817ce0a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocdopt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssociateDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocdopt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocdopt.cmd new file mode 100644 index 0000000000..f2700e63f4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocdopt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssociateDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocrtb b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocrtb new file mode 100755 index 0000000000..ae05a62121 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocrtb @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AssociateRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocrtb.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocrtb.cmd new file mode 100644 index 0000000000..b470b9e07d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2assocrtb.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AssociateRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attigw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attigw new file mode 100755 index 0000000000..f200bb7f6d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attigw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attigw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attigw.cmd new file mode 100644 index 0000000000..fbd57d01a8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attigw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attnic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attnic new file mode 100755 index 0000000000..38adf55b32 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attnic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attnic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attnic.cmd new file mode 100644 index 0000000000..c59e581a70 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attnic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvgw new file mode 100755 index 0000000000..33553b3756 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvgw.cmd new file mode 100644 index 0000000000..7cee686690 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvol b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvol new file mode 100755 index 0000000000..ef528b2ae5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvol @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AttachVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvol.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvol.cmd new file mode 100644 index 0000000000..da3cb63fa0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2attvol.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AttachVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2auth b/pandora_plugins/EC2/ec2-api-tools/bin/ec2auth new file mode 100755 index 0000000000..105c65c19f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2auth @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd AuthorizeGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2auth.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2auth.cmd new file mode 100644 index 0000000000..f44cf8a5f8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2auth.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" AuthorizeGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2bundle b/pandora_plugins/EC2/ec2-api-tools/bin/ec2bundle new file mode 100755 index 0000000000..c8dab0b793 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2bundle @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd BundleInstance "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2bundle.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2bundle.cmd new file mode 100644 index 0000000000..391fb6d6c4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2bundle.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" BundleInstance %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2caril b/pandora_plugins/EC2/ec2-api-tools/bin/ec2caril new file mode 100755 index 0000000000..7d147e7617 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2caril @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelReservedInstancesListing "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2caril.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2caril.cmd new file mode 100644 index 0000000000..51312daaa7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2caril.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelReservedInstancesListing %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cbun b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cbun new file mode 100755 index 0000000000..b735de3f5b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cbun @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelBundleTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cbun.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cbun.cmd new file mode 100644 index 0000000000..b95c160356 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cbun.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelBundleTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cct b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cct new file mode 100755 index 0000000000..808bb991d7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cct @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelConversionTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cct.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cct.cmd new file mode 100644 index 0000000000..bbaf87f71f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cct.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelConversionTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cim b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cim new file mode 100755 index 0000000000..ecf273b777 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cim @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cim.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cim.cmd new file mode 100644 index 0000000000..925363eb95 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cim.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpi b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpi new file mode 100755 index 0000000000..c48eb77119 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpi @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ConfirmProductInstance "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpi.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpi.cmd new file mode 100644 index 0000000000..47ce3d62b1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpi.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ConfirmProductInstance %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpimg b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpimg new file mode 100755 index 0000000000..eb3c519f89 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpimg @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CopyImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpimg.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpimg.cmd new file mode 100644 index 0000000000..79e6f37924 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpimg.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CopyImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpsnap b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpsnap new file mode 100755 index 0000000000..1b632a841b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpsnap @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CopySnapshot "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpsnap.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpsnap.cmd new file mode 100644 index 0000000000..c84c802f14 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cpsnap.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CopySnapshot %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2crril b/pandora_plugins/EC2/ec2-api-tools/bin/ec2crril new file mode 100755 index 0000000000..cf342b3b32 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2crril @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateReservedInstancesListing "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2crril.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2crril.cmd new file mode 100644 index 0000000000..b37633e81d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2crril.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateReservedInstancesListing %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2csir b/pandora_plugins/EC2/ec2-api-tools/bin/ec2csir new file mode 100755 index 0000000000..f0463aefbe --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2csir @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelSpotInstanceRequests "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2csir.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2csir.cmd new file mode 100644 index 0000000000..355f578feb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2csir.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelSpotInstanceRequests %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cvcr b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cvcr new file mode 100755 index 0000000000..5125c3de95 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cvcr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateVpnConnectionRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cvcr.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cvcr.cmd new file mode 100644 index 0000000000..b5fe9104a6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cvcr.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateVpnConnectionRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cxt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cxt new file mode 100755 index 0000000000..ae73dd09ad --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cxt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CancelExportTask "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2cxt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cxt.cmd new file mode 100644 index 0000000000..08a94182f3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2cxt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CancelExportTask %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2daa b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daa new file mode 100755 index 0000000000..784ba1dac1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daa @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeAccountAttributes "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2daa.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daa.cmd new file mode 100644 index 0000000000..f0fc95a3f2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daa.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeAccountAttributes %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2daddr b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daddr new file mode 100755 index 0000000000..c0d921fa4d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daddr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeAddresses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2daddr.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daddr.cmd new file mode 100644 index 0000000000..670ee8de9c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daddr.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeAddresses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2datt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2datt new file mode 100755 index 0000000000..17ef557481 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2datt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2datt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2datt.cmd new file mode 100644 index 0000000000..2b7c4411c3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2datt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2daz b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daz new file mode 100755 index 0000000000..85aede10ea --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daz @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeAvailabilityZones "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2daz.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daz.cmd new file mode 100644 index 0000000000..c9aac8ee51 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2daz.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeAvailabilityZones %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dbun b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dbun new file mode 100755 index 0000000000..c389aa9747 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dbun @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeBundleTasks "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dbun.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dbun.cmd new file mode 100644 index 0000000000..0eb209822f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dbun.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeBundleTasks %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dcgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dcgw new file mode 100755 index 0000000000..b58f47c5e9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dcgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeCustomerGateways "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dcgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dcgw.cmd new file mode 100644 index 0000000000..aa6c306642 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dcgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeCustomerGateways %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dct b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dct new file mode 100755 index 0000000000..eb324a5074 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dct @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeConversionTasks "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dct.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dct.cmd new file mode 100644 index 0000000000..7167fd29fc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dct.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeConversionTasks %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddi b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddi new file mode 100755 index 0000000000..ea41bd747f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddi @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteDiskImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddi.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddi.cmd new file mode 100644 index 0000000000..5a3a9205a0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddi.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteDiskImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddopt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddopt new file mode 100755 index 0000000000..cb192205f5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddopt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddopt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddopt.cmd new file mode 100644 index 0000000000..c036a24491 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ddopt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deactlic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deactlic new file mode 100755 index 0000000000..1b93b7066e --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deactlic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeactivateLicense "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deactlic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deactlic.cmd new file mode 100644 index 0000000000..dbb0a65405 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deactlic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeactivateLicense %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delcgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delcgw new file mode 100755 index 0000000000..0f67ec9b5a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delcgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteCustomerGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delcgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delcgw.cmd new file mode 100644 index 0000000000..212ccf6a13 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delcgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteCustomerGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deldopt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deldopt new file mode 100755 index 0000000000..d3485902a9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deldopt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteDhcpOptions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deldopt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deldopt.cmd new file mode 100644 index 0000000000..93b9ed7ab2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deldopt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteDhcpOptions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delgrp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delgrp new file mode 100755 index 0000000000..ddf97c4678 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delgrp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delgrp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delgrp.cmd new file mode 100644 index 0000000000..ae152d04c3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delgrp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deligw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deligw new file mode 100755 index 0000000000..1cd5e57f3f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deligw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deligw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deligw.cmd new file mode 100644 index 0000000000..af825336f1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deligw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delkey b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delkey new file mode 100755 index 0000000000..137e730c81 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delkey @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteKeyPair "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delkey.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delkey.cmd new file mode 100644 index 0000000000..1aa456ea20 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delkey.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteKeyPair %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnacl b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnacl new file mode 100755 index 0000000000..48b59160f9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnacl @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteNetworkAcl "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnacl.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnacl.cmd new file mode 100644 index 0000000000..c611693d62 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnacl.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteNetworkAcl %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnae b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnae new file mode 100755 index 0000000000..381b147560 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnae @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteNetworkAclEntry "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnae.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnae.cmd new file mode 100644 index 0000000000..e75e368f58 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnae.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteNetworkAclEntry %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnic new file mode 100755 index 0000000000..1ef6731423 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnic.cmd new file mode 100644 index 0000000000..21cfe17792 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delnic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delpgrp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delpgrp new file mode 100755 index 0000000000..935fc7d0fb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delpgrp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeletePlacementGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delpgrp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delpgrp.cmd new file mode 100644 index 0000000000..e4d4906c82 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delpgrp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeletePlacementGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrt new file mode 100755 index 0000000000..c24e6e767f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrt.cmd new file mode 100644 index 0000000000..3a89bd5412 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrtb b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrtb new file mode 100755 index 0000000000..e0804c16bd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrtb @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrtb.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrtb.cmd new file mode 100644 index 0000000000..893a9f3c79 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delrtb.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsds b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsds new file mode 100755 index 0000000000..2efc102d1c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsds @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteSpotDatafeedSubscription "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsds.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsds.cmd new file mode 100644 index 0000000000..246ac9a393 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsds.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteSpotDatafeedSubscription %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsnap b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsnap new file mode 100755 index 0000000000..5ca925233c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsnap @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteSnapshot "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsnap.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsnap.cmd new file mode 100644 index 0000000000..b9049c28df --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsnap.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteSnapshot %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsubnet b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsubnet new file mode 100755 index 0000000000..35297d2fe0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsubnet @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteSubnet "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsubnet.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsubnet.cmd new file mode 100644 index 0000000000..040aed7114 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delsubnet.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteSubnet %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deltag b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deltag new file mode 100755 index 0000000000..d8abe111cc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deltag @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteTags "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2deltag.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deltag.cmd new file mode 100644 index 0000000000..b75c19f505 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2deltag.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteTags %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvgw new file mode 100755 index 0000000000..009c127510 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvgw.cmd new file mode 100644 index 0000000000..4c44092140 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvol b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvol new file mode 100755 index 0000000000..136a8e69b1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvol @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvol.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvol.cmd new file mode 100644 index 0000000000..ee89bc15c8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvol.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpc b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpc new file mode 100755 index 0000000000..fb2e3784dd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpc "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpc.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpc.cmd new file mode 100644 index 0000000000..d1cd551917 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpc.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpc %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpn b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpn new file mode 100755 index 0000000000..d08651b1b7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpn @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpnConnection "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpn.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpn.cmd new file mode 100644 index 0000000000..cd5e64e19d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2delvpn.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpnConnection %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dereg b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dereg new file mode 100755 index 0000000000..cfccbc474d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dereg @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeregisterImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dereg.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dereg.cmd new file mode 100644 index 0000000000..ddf82632f1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dereg.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeregisterImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detigw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detigw new file mode 100755 index 0000000000..8691d665a1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detigw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachInternetGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detigw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detigw.cmd new file mode 100644 index 0000000000..d46cf91b4e --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detigw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachInternetGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detnic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detnic new file mode 100755 index 0000000000..386f7ac6b3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detnic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachNetworkInterface "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detnic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detnic.cmd new file mode 100644 index 0000000000..719c9c5484 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detnic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachNetworkInterface %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvgw new file mode 100755 index 0000000000..8a8c36e501 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachVpnGateway "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvgw.cmd new file mode 100644 index 0000000000..961e335973 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachVpnGateway %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvol b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvol new file mode 100755 index 0000000000..50eb1f7ceb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvol @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DetachVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvol.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvol.cmd new file mode 100644 index 0000000000..dca3779da3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2detvol.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DetachVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dgrp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dgrp new file mode 100755 index 0000000000..99156d177b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dgrp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeGroups "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dgrp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dgrp.cmd new file mode 100644 index 0000000000..554048fd2a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dgrp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeGroups %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2diatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2diatt new file mode 100755 index 0000000000..c37a78cbfd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2diatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2diatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2diatt.cmd new file mode 100644 index 0000000000..35f61c64a1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2diatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2digw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2digw new file mode 100755 index 0000000000..45ad9128c0 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2digw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInternetGateways "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2digw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2digw.cmd new file mode 100644 index 0000000000..67b62537ac --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2digw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInternetGateways %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dim b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dim new file mode 100755 index 0000000000..f1891a88a8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dim @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeImages "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dim.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dim.cmd new file mode 100644 index 0000000000..6ef2c27a99 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dim.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeImages %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dimatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dimatt new file mode 100755 index 0000000000..17ef557481 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dimatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dimatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dimatt.cmd new file mode 100644 index 0000000000..2b7c4411c3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dimatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2din b/pandora_plugins/EC2/ec2-api-tools/bin/ec2din new file mode 100755 index 0000000000..4aaf64c5b8 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2din @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2din.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2din.cmd new file mode 100644 index 0000000000..c702d5a904 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2din.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dinatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dinatt new file mode 100755 index 0000000000..c37a78cbfd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dinatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dinatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dinatt.cmd new file mode 100644 index 0000000000..35f61c64a1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dinatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dins b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dins new file mode 100755 index 0000000000..a9f4136e7f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dins @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeInstanceStatus "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dins.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dins.cmd new file mode 100644 index 0000000000..9f8776b4b4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dins.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeInstanceStatus %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2disaddr b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disaddr new file mode 100755 index 0000000000..52ffeac9d1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disaddr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DisassociateAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2disaddr.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disaddr.cmd new file mode 100644 index 0000000000..197b2662e1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disaddr.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DisassociateAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2disrtb b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disrtb new file mode 100755 index 0000000000..923f055eab --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disrtb @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DisassociateRouteTable "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2disrtb.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disrtb.cmd new file mode 100644 index 0000000000..727742d425 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2disrtb.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DisassociateRouteTable %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dkey b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dkey new file mode 100755 index 0000000000..8384b73e69 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dkey @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeKeyPairs "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dkey.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dkey.cmd new file mode 100644 index 0000000000..6e84eed8aa --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dkey.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeKeyPairs %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dlic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dlic new file mode 100755 index 0000000000..78434ed6ee --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dlic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeLicenses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dlic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dlic.cmd new file mode 100644 index 0000000000..f79cf98349 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dlic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeLicenses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnacl b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnacl new file mode 100755 index 0000000000..ec2582387f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnacl @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeNetworkAcls "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnacl.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnacl.cmd new file mode 100644 index 0000000000..fe6bc9252f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnacl.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeNetworkAcls %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnic b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnic new file mode 100755 index 0000000000..7b740f8fdc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnic @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeNetworkInterfaces "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnic.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnic.cmd new file mode 100644 index 0000000000..566a2db986 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnic.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeNetworkInterfaces %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnicatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnicatt new file mode 100755 index 0000000000..46df87633a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnicatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeNetworkInterfaceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnicatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnicatt.cmd new file mode 100644 index 0000000000..3d16092691 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dnicatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeNetworkInterfaceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dpgrp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dpgrp new file mode 100755 index 0000000000..9e430833bb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dpgrp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribePlacementGroups "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dpgrp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dpgrp.cmd new file mode 100644 index 0000000000..38e2ba685c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dpgrp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribePlacementGroups %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dre b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dre new file mode 100755 index 0000000000..a4ca99aa70 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dre @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeRegions "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dre.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dre.cmd new file mode 100644 index 0000000000..68132ca652 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dre.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeRegions %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dri b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dri new file mode 100755 index 0000000000..172c063261 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dri @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeReservedInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dri.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dri.cmd new file mode 100644 index 0000000000..f7a4d66f3c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dri.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeReservedInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dril b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dril new file mode 100755 index 0000000000..dbf85627e5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dril @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeReservedInstancesListings "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dril.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dril.cmd new file mode 100644 index 0000000000..3aaabff864 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dril.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeReservedInstancesListings %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2drio b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drio new file mode 100755 index 0000000000..4730941e37 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drio @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeReservedInstancesOfferings "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2drio.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drio.cmd new file mode 100644 index 0000000000..b509f0b144 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drio.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeReservedInstancesOfferings %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2drp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drp new file mode 100755 index 0000000000..9d47844404 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DisableVgwRoutePropagation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2drp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drp.cmd new file mode 100644 index 0000000000..b59f286449 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DisableVgwRoutePropagation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2drtb b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drtb new file mode 100755 index 0000000000..9431963259 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drtb @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeRouteTables "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2drtb.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drtb.cmd new file mode 100644 index 0000000000..29557d865d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2drtb.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeRouteTables %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsds b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsds new file mode 100755 index 0000000000..6a433f5399 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsds @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSpotDatafeedSubscription "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsds.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsds.cmd new file mode 100644 index 0000000000..671b84a659 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsds.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSpotDatafeedSubscription %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsir b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsir new file mode 100755 index 0000000000..a492a0d9ef --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsir @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSpotInstanceRequests "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsir.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsir.cmd new file mode 100644 index 0000000000..3eeaa949fd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsir.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSpotInstanceRequests %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnap b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnap new file mode 100755 index 0000000000..a86227e3b1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnap @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSnapshots "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnap.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnap.cmd new file mode 100644 index 0000000000..accf2aa284 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnap.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSnapshots %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnapatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnapatt new file mode 100755 index 0000000000..28e390f15f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnapatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSnapshotAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnapatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnapatt.cmd new file mode 100644 index 0000000000..71974563ed --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsnapatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSnapshotAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsph b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsph new file mode 100755 index 0000000000..9c2e20f930 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsph @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSpotPriceHistory "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsph.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsph.cmd new file mode 100644 index 0000000000..915791ed76 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsph.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSpotPriceHistory %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsubnet b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsubnet new file mode 100755 index 0000000000..49e5d9a49c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsubnet @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeSubnets "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsubnet.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsubnet.cmd new file mode 100644 index 0000000000..dded55d087 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dsubnet.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeSubnets %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dtag b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dtag new file mode 100755 index 0000000000..c49eccbaa6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dtag @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeTags "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dtag.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dtag.cmd new file mode 100644 index 0000000000..3a86f1cad2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dtag.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeTags %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dva b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dva new file mode 100755 index 0000000000..f1ea7ee695 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dva @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpcAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dva.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dva.cmd new file mode 100644 index 0000000000..44a9836e30 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dva.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpcAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvcr b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvcr new file mode 100755 index 0000000000..ab9a0e8760 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvcr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DeleteVpnConnectionRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvcr.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvcr.cmd new file mode 100644 index 0000000000..7003ca23c2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvcr.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DeleteVpnConnectionRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvgw b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvgw new file mode 100755 index 0000000000..671fe031bd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvgw @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpnGateways "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvgw.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvgw.cmd new file mode 100644 index 0000000000..a20f5d61e5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvgw.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpnGateways %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvol b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvol new file mode 100755 index 0000000000..65c7e8a293 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvol @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVolumes "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvol.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvol.cmd new file mode 100644 index 0000000000..c3d84fd378 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvol.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVolumes %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvolatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvolatt new file mode 100755 index 0000000000..1b0b2e2e2b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvolatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVolumeAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvolatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvolatt.cmd new file mode 100644 index 0000000000..a826213485 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvolatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVolumeAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpc b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpc new file mode 100755 index 0000000000..dd60d8826a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpcs "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpc.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpc.cmd new file mode 100644 index 0000000000..4284c94f4c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpc.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpcs %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpn b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpn new file mode 100755 index 0000000000..b841ae0909 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpn @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVpnConnections "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpn.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpn.cmd new file mode 100644 index 0000000000..e08a3b0cd7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvpn.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVpnConnections %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvs b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvs new file mode 100755 index 0000000000..625fe3fc9f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvs @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeVolumeStatus "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvs.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvs.cmd new file mode 100644 index 0000000000..2fc39aceef --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dvs.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeVolumeStatus %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dxt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dxt new file mode 100755 index 0000000000..4e66d8c906 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dxt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd DescribeExportTasks "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2dxt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dxt.cmd new file mode 100644 index 0000000000..12240e3bd9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2dxt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" DescribeExportTasks %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2erp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2erp new file mode 100755 index 0000000000..321872ce52 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2erp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd EnableVgwRoutePropagation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2erp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2erp.cmd new file mode 100644 index 0000000000..e5256b7f00 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2erp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" EnableVgwRoutePropagation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2evio b/pandora_plugins/EC2/ec2-api-tools/bin/ec2evio new file mode 100755 index 0000000000..9eccbfaa28 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2evio @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd EnableVolumeIO "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2evio.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2evio.cmd new file mode 100644 index 0000000000..cb0b54e8c6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2evio.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" EnableVolumeIO %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2fp b/pandora_plugins/EC2/ec2-api-tools/bin/ec2fp new file mode 100755 index 0000000000..ab1fac7245 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2fp @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd FingerprintKey "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2fp.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2fp.cmd new file mode 100644 index 0000000000..995eaf096b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2fp.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" FingerprintKey %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2gcons b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gcons new file mode 100755 index 0000000000..f762dc6cc7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gcons @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd GetConsoleOutput "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2gcons.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gcons.cmd new file mode 100644 index 0000000000..cd6bc2ba1f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gcons.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" GetConsoleOutput %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2gpass b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gpass new file mode 100755 index 0000000000..901e8ac175 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gpass @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd GetPassword "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2gpass.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gpass.cmd new file mode 100644 index 0000000000..31c48df9b4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2gpass.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" GetPassword %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ii b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ii new file mode 100755 index 0000000000..7c35d3a4b9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ii @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportInstance "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ii.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ii.cmd new file mode 100644 index 0000000000..1b28057e43 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ii.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportInstance %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2iin b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iin new file mode 100755 index 0000000000..7c35d3a4b9 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iin @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportInstance "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2iin.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iin.cmd new file mode 100644 index 0000000000..1b28057e43 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iin.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportInstance %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ikey b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ikey new file mode 100755 index 0000000000..8269590e3b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ikey @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportKeyPair "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ikey.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ikey.cmd new file mode 100644 index 0000000000..3d2391f291 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ikey.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportKeyPair %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2iv b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iv new file mode 100755 index 0000000000..7e761691cd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iv @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2iv.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iv.cmd new file mode 100644 index 0000000000..7c4e4eae41 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2iv.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ivol b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ivol new file mode 100755 index 0000000000..7e761691cd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ivol @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ImportVolume "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ivol.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ivol.cmd new file mode 100644 index 0000000000..7c4e4eae41 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ivol.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ImportVolume %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2kill b/pandora_plugins/EC2/ec2-api-tools/bin/ec2kill new file mode 100755 index 0000000000..1e4636ef70 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2kill @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd TerminateInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2kill.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2kill.cmd new file mode 100644 index 0000000000..1a01066d53 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2kill.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" TerminateInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2matt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2matt new file mode 100755 index 0000000000..e9695cb2a2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2matt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2matt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2matt.cmd new file mode 100644 index 0000000000..b4d85cb341 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2matt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2miatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2miatt new file mode 100755 index 0000000000..57955546d4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2miatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2miatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2miatt.cmd new file mode 100644 index 0000000000..027d025c55 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2miatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mim b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mim new file mode 100755 index 0000000000..41d6d7fb21 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mim @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd MigrateBundle "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mim.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mim.cmd new file mode 100644 index 0000000000..221a1991e7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mim.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" MigrateBundle %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mimatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mimatt new file mode 100755 index 0000000000..e9695cb2a2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mimatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mimatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mimatt.cmd new file mode 100644 index 0000000000..b4d85cb341 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mimatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2min b/pandora_plugins/EC2/ec2-api-tools/bin/ec2min new file mode 100755 index 0000000000..de82612e20 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2min @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd MonitorInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2min.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2min.cmd new file mode 100644 index 0000000000..572a6b5efa --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2min.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" MonitorInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2minatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2minatt new file mode 100755 index 0000000000..57955546d4 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2minatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2minatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2minatt.cmd new file mode 100644 index 0000000000..027d025c55 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2minatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mnicatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mnicatt new file mode 100755 index 0000000000..9a528246dd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mnicatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyNetworkInterfaceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mnicatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mnicatt.cmd new file mode 100644 index 0000000000..826ff4369a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mnicatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyNetworkInterfaceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2msnapatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2msnapatt new file mode 100755 index 0000000000..b6bc26e4b5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2msnapatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifySnapshotAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2msnapatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2msnapatt.cmd new file mode 100644 index 0000000000..f1a90fb367 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2msnapatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifySnapshotAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mva b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mva new file mode 100755 index 0000000000..c93dcfe7f7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mva @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyVpcAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mva.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mva.cmd new file mode 100644 index 0000000000..ea63e0a664 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mva.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyVpcAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mvolatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mvolatt new file mode 100755 index 0000000000..6809d12387 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mvolatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ModifyVolumeAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2mvolatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mvolatt.cmd new file mode 100644 index 0000000000..095000243b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2mvolatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ModifyVolumeAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2prio b/pandora_plugins/EC2/ec2-api-tools/bin/ec2prio new file mode 100755 index 0000000000..72786b22d2 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2prio @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd PurchaseReservedInstancesOffering "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2prio.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2prio.cmd new file mode 100644 index 0000000000..a0ca0e85ae --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2prio.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" PurchaseReservedInstancesOffering %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ratt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ratt new file mode 100755 index 0000000000..c3d7e41586 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ratt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ratt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ratt.cmd new file mode 100644 index 0000000000..8f16319a8c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ratt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reboot b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reboot new file mode 100755 index 0000000000..b0342cd9af --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reboot @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RebootInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reboot.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reboot.cmd new file mode 100644 index 0000000000..4b4fadf5bf --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reboot.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RebootInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reg b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reg new file mode 100755 index 0000000000..ba6edde941 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reg @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RegisterImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reg.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reg.cmd new file mode 100644 index 0000000000..8c07c0cf39 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reg.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RegisterImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reladdr b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reladdr new file mode 100755 index 0000000000..2a129b8157 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reladdr @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReleaseAddress "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reladdr.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reladdr.cmd new file mode 100644 index 0000000000..9c16555949 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reladdr.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReleaseAddress %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rep b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rep new file mode 100755 index 0000000000..039a4a8489 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rep @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReportInstanceStatus "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rep.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rep.cmd new file mode 100644 index 0000000000..4d29c3ab3a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rep.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReportInstanceStatus %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnaclassoc b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnaclassoc new file mode 100755 index 0000000000..146a43e2e1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnaclassoc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceNetworkAclAssociation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnaclassoc.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnaclassoc.cmd new file mode 100644 index 0000000000..f49109271c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnaclassoc.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceNetworkAclAssociation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnae b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnae new file mode 100755 index 0000000000..b36dd60618 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnae @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceNetworkAclEntry "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnae.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnae.cmd new file mode 100644 index 0000000000..995e49447a --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2repnae.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceNetworkAclEntry %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprt new file mode 100755 index 0000000000..fc09596869 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceRoute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprt.cmd new file mode 100644 index 0000000000..a1dfe2c69e --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceRoute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprtbassoc b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprtbassoc new file mode 100755 index 0000000000..8cf9770d3d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprtbassoc @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ReplaceRouteTableAssociation "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprtbassoc.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprtbassoc.cmd new file mode 100644 index 0000000000..ea149579e7 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2reprtbassoc.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ReplaceRouteTableAssociation %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2revoke b/pandora_plugins/EC2/ec2-api-tools/bin/ec2revoke new file mode 100755 index 0000000000..4bdd3c510f --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2revoke @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RevokeGroup "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2revoke.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2revoke.cmd new file mode 100644 index 0000000000..95da8963da --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2revoke.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RevokeGroup %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2riatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2riatt new file mode 100755 index 0000000000..9595bacbb5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2riatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2riatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2riatt.cmd new file mode 100644 index 0000000000..39e2e248cc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2riatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rim b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rim new file mode 100755 index 0000000000..041e7364b6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rim @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResumeImport "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rim.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rim.cmd new file mode 100644 index 0000000000..2251f189dc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rim.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResumeImport %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rimatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rimatt new file mode 100755 index 0000000000..c3d7e41586 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rimatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetImageAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rimatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rimatt.cmd new file mode 100644 index 0000000000..8f16319a8c --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rimatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetImageAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rinatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rinatt new file mode 100755 index 0000000000..9595bacbb5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rinatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetInstanceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rinatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rinatt.cmd new file mode 100644 index 0000000000..39e2e248cc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rinatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetInstanceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rnicatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rnicatt new file mode 100755 index 0000000000..b6f1a744d3 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rnicatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetNetworkInterfaceAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rnicatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rnicatt.cmd new file mode 100644 index 0000000000..b20b1c23ae --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rnicatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetNetworkInterfaceAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsi b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsi new file mode 100755 index 0000000000..6dd9b772ba --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsi @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RequestSpotInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsi.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsi.cmd new file mode 100644 index 0000000000..2b91fa0069 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsi.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RequestSpotInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsnapatt b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsnapatt new file mode 100755 index 0000000000..9c6b5e99fc --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsnapatt @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ResetSnapshotAttribute "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsnapatt.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsnapatt.cmd new file mode 100644 index 0000000000..ec60739056 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2rsnapatt.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ResetSnapshotAttribute %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2run b/pandora_plugins/EC2/ec2-api-tools/bin/ec2run new file mode 100755 index 0000000000..a5ffff8b4d --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2run @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd RunInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2run.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2run.cmd new file mode 100644 index 0000000000..24538d0cc5 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2run.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" RunInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2start b/pandora_plugins/EC2/ec2-api-tools/bin/ec2start new file mode 100755 index 0000000000..cee02ea3a6 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2start @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd StartInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2start.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2start.cmd new file mode 100644 index 0000000000..4ad5cf7f41 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2start.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" StartInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2stop b/pandora_plugins/EC2/ec2-api-tools/bin/ec2stop new file mode 100755 index 0000000000..9efe52c801 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2stop @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd StopInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2stop.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2stop.cmd new file mode 100644 index 0000000000..f746962114 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2stop.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" StopInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2tag b/pandora_plugins/EC2/ec2-api-tools/bin/ec2tag new file mode 100755 index 0000000000..32da9ee617 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2tag @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd CreateTags "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2tag.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2tag.cmd new file mode 100644 index 0000000000..c42aead081 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2tag.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" CreateTags %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2udi b/pandora_plugins/EC2/ec2-api-tools/bin/ec2udi new file mode 100755 index 0000000000..549c90f8de --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2udi @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd UploadDiskImage "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2udi.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2udi.cmd new file mode 100644 index 0000000000..c342fec834 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2udi.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" UploadDiskImage %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2umin b/pandora_plugins/EC2/ec2-api-tools/bin/ec2umin new file mode 100755 index 0000000000..dcab91a6c1 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2umin @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd UnmonitorInstances "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2umin.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2umin.cmd new file mode 100644 index 0000000000..b57dd1521b --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2umin.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" UnmonitorInstances %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2upip b/pandora_plugins/EC2/ec2-api-tools/bin/ec2upip new file mode 100755 index 0000000000..3653bc8752 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2upip @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd UnassignPrivateIPAddresses "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2upip.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2upip.cmd new file mode 100644 index 0000000000..d1e631a3eb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2upip.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" UnassignPrivateIPAddresses %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ver b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ver new file mode 100755 index 0000000000..4ec4762abd --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ver @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +# Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +# License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +# IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +# language governing permissions and limitations under the License. + +__ZIP_PREFIX__EC2_HOME="${EC2_HOME:?EC2_HOME is not set}" +__RPM_PREFIX__EC2_HOME=/usr/local/aes/cmdline +"${EC2_HOME}"/bin/ec2-cmd ShowVersion "$@" diff --git a/pandora_plugins/EC2/ec2-api-tools/bin/ec2ver.cmd b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ver.cmd new file mode 100644 index 0000000000..b6dadd1232 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/bin/ec2ver.cmd @@ -0,0 +1,25 @@ +@echo off + +setlocal + +REM Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +REM Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +REM License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +REM IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +REM language governing permissions and limitations under the License. + +REM Set intermediate env vars because the %VAR:x=y% notation below +REM (which replaces the string x with the string y in VAR) +REM doesn't handle undefined environment variables. This way +REM we're always dealing with defined variables in those tests. +set CHK_HOME=_%EC2_HOME% + +if "%CHK_HOME:"=%" == "_" goto HOME_MISSING + +"%EC2_HOME:"=%\bin\ec2-cmd" ShowVersion %* +goto DONE +:HOME_MISSING +echo EC2_HOME is not set +exit /b 1 + +:DONE diff --git a/pandora_plugins/EC2/ec2-api-tools/ec2-api.conf b/pandora_plugins/EC2/ec2-api-tools/ec2-api.conf new file mode 100755 index 0000000000..a9c03b0302 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/ec2-api.conf @@ -0,0 +1,23 @@ +### aws_plugin.conf + +# EC2 home +EC2_HOME=/home/kosaka/ec2-api-tools-1.6.7.2 +export EC2_HOME + +# 'Amzon Cloud Watch API' インストールディレクトリ +AWS_CLOUDWATCH_HOME=/usr/share/pandora_server/util/plugin/CloudWatch + +# Credential 情報を納めたファイルの在処 +AWS_CREDENTIAL_FILE=/usr/share/pandora_server/util/plugin/.AWS_Credential/Credential + +# 監視対象のアベイラビリティゾーンに対応した Cloud Watch monitoring URL +# e.g.) tokyo リージョンであれば、 "https://monitoring.ap-northeast-1.amazonaws.com" +AWS_CLOUDWATCH_URL=https://monitoring.ap-northeast-1.amazonaws.com + +# JAVA_HOME ($JAVA_HOME/bin に java コマンドが見えるように) +JAVA_HOME=/usr/ + +# これはオプション。必要に応じて +# SERVICE_JVM_ARGS= + +export AWS_CLOUDWATCH_HOME AWS_CREDENTIAL_FILE AWS_CLOUDWATCH_URL JAVA_HOME diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/AWSEC2JavaClient-1.2ux.jar b/pandora_plugins/EC2/ec2-api-tools/lib/AWSEC2JavaClient-1.2ux.jar new file mode 100644 index 0000000000..79281ef73b Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/AWSEC2JavaClient-1.2ux.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/AWSJavaClientRuntime-1.1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/AWSJavaClientRuntime-1.1.jar new file mode 100644 index 0000000000..ad853d6a94 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/AWSJavaClientRuntime-1.1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/BlockDeviceLib-1.0.jar b/pandora_plugins/EC2/ec2-api-tools/lib/BlockDeviceLib-1.0.jar new file mode 100644 index 0000000000..a53f992564 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/BlockDeviceLib-1.0.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/EC2CltJavaClient-1.0.jar b/pandora_plugins/EC2/ec2-api-tools/lib/EC2CltJavaClient-1.0.jar new file mode 100644 index 0000000000..ca497be9ff Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/EC2CltJavaClient-1.0.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/EC2ConversionLib-1.0.jar b/pandora_plugins/EC2/ec2-api-tools/lib/EC2ConversionLib-1.0.jar new file mode 100644 index 0000000000..50393ccf91 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/EC2ConversionLib-1.0.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/EC2WsdlJavaClient-1.0.jar b/pandora_plugins/EC2/ec2-api-tools/lib/EC2WsdlJavaClient-1.0.jar new file mode 100644 index 0000000000..96f54d348b Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/EC2WsdlJavaClient-1.0.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/HttpClientSslContrib-1.0.jar b/pandora_plugins/EC2/ec2-api-tools/lib/HttpClientSslContrib-1.0.jar new file mode 100644 index 0000000000..4fe7e4da01 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/HttpClientSslContrib-1.0.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/XmlSchema-1.4.5.jar b/pandora_plugins/EC2/ec2-api-tools/lib/XmlSchema-1.4.5.jar new file mode 100644 index 0000000000..4d4d7e4ed8 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/XmlSchema-1.4.5.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/activation-1.1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/activation-1.1.jar new file mode 100644 index 0000000000..53f82a1c4c Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/activation-1.1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/bcprov-jdk15-145.jar b/pandora_plugins/EC2/ec2-api-tools/lib/bcprov-jdk15-145.jar new file mode 100644 index 0000000000..409070b037 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/bcprov-jdk15-145.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/commons-cli-1.1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/commons-cli-1.1.jar new file mode 100644 index 0000000000..e633afbe68 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/commons-cli-1.1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/commons-codec-1.4.jar b/pandora_plugins/EC2/ec2-api-tools/lib/commons-codec-1.4.jar new file mode 100644 index 0000000000..458d432da8 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/commons-codec-1.4.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/commons-discovery.jar b/pandora_plugins/EC2/ec2-api-tools/lib/commons-discovery.jar new file mode 100644 index 0000000000..b88554847b Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/commons-discovery.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/commons-httpclient-3.1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/commons-httpclient-3.1.jar new file mode 100644 index 0000000000..7c59774aed Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/commons-httpclient-3.1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/commons-logging-adapters-1.1.1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/commons-logging-adapters-1.1.1.jar new file mode 100644 index 0000000000..2f23c350bb Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/commons-logging-adapters-1.1.1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/commons-logging-api-1.1.1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/commons-logging-api-1.1.1.jar new file mode 100644 index 0000000000..bd4511684b Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/commons-logging-api-1.1.1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/ec2-api-tools-1.6.7.2.jar b/pandora_plugins/EC2/ec2-api-tools/lib/ec2-api-tools-1.6.7.2.jar new file mode 100644 index 0000000000..8f59c087cc Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/ec2-api-tools-1.6.7.2.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/httpclient-4.2.jar b/pandora_plugins/EC2/ec2-api-tools/lib/httpclient-4.2.jar new file mode 100644 index 0000000000..9e0df5098c Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/httpclient-4.2.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/httpcore-4.2.jar b/pandora_plugins/EC2/ec2-api-tools/lib/httpcore-4.2.jar new file mode 100644 index 0000000000..8735ec703b Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/httpcore-4.2.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/j2ee_mail.jar b/pandora_plugins/EC2/ec2-api-tools/lib/j2ee_mail.jar new file mode 100644 index 0000000000..018d3e8637 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/j2ee_mail.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/java-xmlbuilder-0.4.jar b/pandora_plugins/EC2/ec2-api-tools/lib/java-xmlbuilder-0.4.jar new file mode 100644 index 0000000000..e5acf92818 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/java-xmlbuilder-0.4.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/jaxb-api.jar b/pandora_plugins/EC2/ec2-api-tools/lib/jaxb-api.jar new file mode 100644 index 0000000000..2b5dc7e398 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/jaxb-api.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/jaxb-impl.jar b/pandora_plugins/EC2/ec2-api-tools/lib/jaxb-impl.jar new file mode 100644 index 0000000000..f31db00a6b Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/jaxb-impl.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/jaxws-api.jar b/pandora_plugins/EC2/ec2-api-tools/lib/jaxws-api.jar new file mode 100644 index 0000000000..b91c91c432 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/jaxws-api.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/jdom.jar b/pandora_plugins/EC2/ec2-api-tools/lib/jdom.jar new file mode 100644 index 0000000000..288e64cb5c Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/jdom.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/jets3t-0.9.0.jar b/pandora_plugins/EC2/ec2-api-tools/lib/jets3t-0.9.0.jar new file mode 100644 index 0000000000..7c4946f835 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/jets3t-0.9.0.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/jets3t-gui-0.9.0.jar b/pandora_plugins/EC2/ec2-api-tools/lib/jets3t-gui-0.9.0.jar new file mode 100644 index 0000000000..003228d19a Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/jets3t-gui-0.9.0.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/log4j-1.2.14.jar b/pandora_plugins/EC2/ec2-api-tools/lib/log4j-1.2.14.jar new file mode 100644 index 0000000000..6251307190 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/log4j-1.2.14.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/serializer.jar b/pandora_plugins/EC2/ec2-api-tools/lib/serializer.jar new file mode 100644 index 0000000000..7cd7405474 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/serializer.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/stax2-api-3.0.1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/stax2-api-3.0.1.jar new file mode 100644 index 0000000000..0f29ed3ccf Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/stax2-api-3.0.1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/woodstox-core-asl-4.0.5.jar b/pandora_plugins/EC2/ec2-api-tools/lib/woodstox-core-asl-4.0.5.jar new file mode 100644 index 0000000000..c61a59133f Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/woodstox-core-asl-4.0.5.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/wsdl4j.jar b/pandora_plugins/EC2/ec2-api-tools/lib/wsdl4j.jar new file mode 100644 index 0000000000..2877271ac7 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/wsdl4j.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/wss4j-1.5.3.jar b/pandora_plugins/EC2/ec2-api-tools/lib/wss4j-1.5.3.jar new file mode 100644 index 0000000000..63b9fe237c Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/wss4j-1.5.3.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/xalan.jar b/pandora_plugins/EC2/ec2-api-tools/lib/xalan.jar new file mode 100644 index 0000000000..1b498b07af Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/xalan.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/xercesImpl.jar b/pandora_plugins/EC2/ec2-api-tools/lib/xercesImpl.jar new file mode 100644 index 0000000000..0aaa990f3e Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/xercesImpl.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/xfire-all-1.2.6.jar b/pandora_plugins/EC2/ec2-api-tools/lib/xfire-all-1.2.6.jar new file mode 100644 index 0000000000..828b6805a0 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/xfire-all-1.2.6.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/xfire-jsr181-api-1.0-M1.jar b/pandora_plugins/EC2/ec2-api-tools/lib/xfire-jsr181-api-1.0-M1.jar new file mode 100644 index 0000000000..a43adb8fc7 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/xfire-jsr181-api-1.0-M1.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/xml-apis.jar b/pandora_plugins/EC2/ec2-api-tools/lib/xml-apis.jar new file mode 100644 index 0000000000..46733464fc Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/xml-apis.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/lib/xmlsec.jar b/pandora_plugins/EC2/ec2-api-tools/lib/xmlsec.jar new file mode 100644 index 0000000000..1ae0569856 Binary files /dev/null and b/pandora_plugins/EC2/ec2-api-tools/lib/xmlsec.jar differ diff --git a/pandora_plugins/EC2/ec2-api-tools/license.txt b/pandora_plugins/EC2/ec2-api-tools/license.txt new file mode 100644 index 0000000000..1d5c516979 --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/license.txt @@ -0,0 +1,40 @@ +Amazon Software License + +This Amazon Software License (“License”) governs your use, reproduction, and distribution of the accompanying software as specified below. +1. Definitions + +“Licensor” means any person or entity that distributes its Work. + +“Software” means the original work of authorship made available under this License. + +“Work” means the Software and any additions to or derivative works of the Software that are made available under this License. + +The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work. + +Works, including the Software, are “made available” under this License by including in or with the Work either (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this License. +2. License Grants + +2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form. + +2.2 Patent Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free patent license to make, have made, use, sell, offer for sale, import, and otherwise transfer its Work, in whole or in part. The foregoing license applies only to the patent claims licensable by Licensor that would be infringed by Licensor’s Work (or portion thereof) individually and excluding any combinations with any other materials or technology. +3. Limitations + +3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, (b) you include a complete copy of this License with your distribution, and© you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work. + +3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this License (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself. + +3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use with the web services, computing platforms or applications provided by Amazon.com, Inc. or its affiliates, including Amazon Web Services LLC. + +3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this License from such Licensor (including the grants in Sections 2.1 and 2.2) will terminate immediately. + +3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, logos, or trademarks, except as necessary to reproduce the notices described in this License. + +3.6 Termination. If you violate any term of this License, then your rights under this License (including the grants in Sections 2.1 and 2.2) will terminate immediately. +4. Disclaimer of Warranty. + +THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF M ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE. SOME STATES’ CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU. +5. Limitation of Liability. + +EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +Effective Date – April 18, 2008 © 2008 Amazon.com, Inc. or its affiliates. All rights reserved. diff --git a/pandora_plugins/EC2/ec2-api-tools/notice.txt b/pandora_plugins/EC2/ec2-api-tools/notice.txt new file mode 100644 index 0000000000..04bee1cbdb --- /dev/null +++ b/pandora_plugins/EC2/ec2-api-tools/notice.txt @@ -0,0 +1,5 @@ +Copyright 2006-2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the +Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of the +License is located at http://aws.amazon.com/asl or in the "license" file accompanying this file. This file is distributed on an "AS +IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific +language governing permissions and limitations under the License. diff --git a/pandora_plugins/EC2/ec2.conf b/pandora_plugins/EC2/ec2.conf new file mode 100755 index 0000000000..543ef2ddcf --- /dev/null +++ b/pandora_plugins/EC2/ec2.conf @@ -0,0 +1,28 @@ +### sample of aws_plugin.conf + +# 'Amazon CloudWatch API' installation directory +AWS_CLOUDWATCH_HOME=/usr/share/pandora_server/util/plugin/CloudWatch + +# 'Amazon EC2 API' installation directory +EC2_HOME=/usr/share/pandora_server/util/plugin/ec2-api-tools + +# Path to the file that includes AWS Credential information +AWS_CREDENTIAL_FILE=/usr/share/pandora_server/util/plugin/ec2_credential + +# Region that the targets belong to +EC2_REGION=ap-northeast-1 + +# Crresponding CloudWatch URL (set if different from default) +# default is "http://monitoring.${EC2_REGION}.amazonaws.com +#AWS_CLOUDWATCH_URL=https://monitoring.ap-northeast-1.amazonaws.com + +# Corresponding EC2 URL (set if different from default) +# default is "http://ec2.${EC2_REGION}.amazonaws.com +#EC2_URL=https://ec2.ap-northeast-1.amazonaws.com + +# JAVA_HOME (you could see java command at $JAVA_HOME/bin/) +JAVA_HOME=/usr/ + +# Option settings (if needed) +# SERVICE_JVM_ARGS= + diff --git a/pandora_plugins/EC2/ec2_cloudwatch_plugin.sh b/pandora_plugins/EC2/ec2_cloudwatch_plugin.sh new file mode 100755 index 0000000000..87ead65bd5 --- /dev/null +++ b/pandora_plugins/EC2/ec2_cloudwatch_plugin.sh @@ -0,0 +1,279 @@ +#!/bin/bash +# Amazon EC2 Pandora FMS Server plugin +# (c) Sancho Lerena 2011 + +# .. Config + +# location of default config file +default_config_file=/usr/share/pandora_server/util/plugin/aws_plugin.conf +default_java_home=/usr + + +# .. Functions + +function help { + + echo -e "Amazon EC2 Plugin for Pandora FMS Plugin server. http://pandorafms.com" + echo " " + echo "This plugin is used to check performance of Volumes and Instances in the EC2 Cloud" + echo "Syntax:" + echo -e "\t\t-A Access KEY ID, p.e AKIAILTVJ3S26GTKLD4A" + echo -e "\t\t-S Secret Access Key, p.e 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" + echo -e "\t\t-R Region, p.e us-east-1" + echo -e "\t\t-m Metric to gather (see doc for a metric list) " + echo -e "\t\t-n Namespace (p.e: AWS/EC2, AWS/EBS) " + echo -e "\t\t-i Target Instance or Target LB name (p.e: i-9d0b4af1) " + echo -e "\t\t-a Availability Zone option for AWS/ELB (p.e: us-west-1b) " + echo -e "\t\t-z Show default metrics " + echo -e "\t\t-h Show this messages " + echo "Samples:" + echo " ./ec2_plugin.sh -A AKIAILTVJ3S26GTKLD4A -S CgmQ6DxUWES05txfe+juJLoM57acDudHogkLotWk -i i-9d0b4af1 -n AWS/EC2 -m CPUUtilization" + echo + + exit 0 +} + +function check_required_variables { + _result=OK; + +# .. AWS_CLOUDWATCH_HOME + if [ ! -d "$AWS_CLOUDWATCH_HOME" ] || [ ! -x $AWS_CLOUDWATCH_HOME/bin/mon-get-stats ] + then + echo "You need to define AWS_CLOUDWATCH_HOME settings." + _result=NG; + fi + export AWS_CLOUDWATCH_HOME + +# .. JAVA_HOME + if [ -z "$JAVA_HOME" ] && [ -d "$default_java_home" ] && [ -x "$default_java_home/bin/java" ] + then + JAVA_HOME=$default_java_home + fi + if [ ! -d "$JAVA_HOME" ] || [ ! -x "$JAVA_HOME/bin/java" ] + then + echo "You need to define JAVA_HOME settings." + _result=NG; + fi + export JAVA_HOME + +# .. AWS_CREDENTIAL_FILE + if [ ! -f "$AWS_CREDENTIAL_FILE" ] || [ ! -r "$AWS_CREDENTIAL_FILE" ] + then + echo "You need to define AWS_CREDENTIAL_FILE settings." + _result=NG; + fi + export AWS_CREDENTIAL_FILE + +# .. EC2_REGION or AWS_CLOUDWATCH_URL + if [ -z "$AWS_CLOUDWATCH_URL" ] && [ -z "$EC2_REGION" ] + then + echo "You need to define EC2_REGION or AWS_CLOUDWATCH_URL settings." + _result=NG; + fi + if [ -z "$AWS_CLOUDWATCH_URL" ] + then + AWS_CLOUDWATCH_URL="http://monitoring.${EC2_REGION}.amazonaws.com" + fi + export AWS_CLOUDWATCH_URL + +# check the result and abort if shomething wrong + + if [ "$_result" != "OK" ] + then + echo "Please read the documentation." + echo "aborting..." + exit 1; + fi + + # optional settings... + + [ -n "$SERVICE_JVM_ARGS" ] && export SERVICE_JVM_ARGS +} + +function list_available_metrics { + + if [ -n "$list_metrics_in_raw_format" ] + then + ${AWS_CLOUDWATCH_HOME}/bin/mon-list-metrics -show-long ${OPT_REGION} ${OPT_ACCESS_KEY} ${OPT_SECRET_KEY} + else + ${AWS_CLOUDWATCH_HOME}/bin/mon-list-metrics -show-long ${OPT_REGION} ${OPT_ACCESS_KEY} ${OPT_SECRET_KEY} | + sed -e 's/\([^,]*\),\([^,]*\),{*\([^{}]*\)}.*/\2 \3 \1/' | sort + fi + + exit +} + +function help_metrics { + echo -e "Amazon EC2 Plugin for Pandora FMS Plugin server. http://pandorafms.com" + echo " " + echo -e "This the default metric list, you can use any metric available these are the default" + + echo " " + echo "For AWS/EC2 Namespace" + echo " " + echo "CPUUtilization" + echo "DiskReadBytes" + echo "DiskReadOps" + echo "DiskWriteBytes" + echo "DiskWriteOps" + echo "NetworkIn" + echo "NetworkOut " + + echo " " + echo "For AWS/EBS Namespace" + echo " " + echo "VolumeIdleTime" + echo "VolumeQueueLength" + echo "VolumeReadBytes" + echo "VolumeReadOps" + echo "VolumeTotalReadTime" + echo "VolumeTotalWriteTime" + echo "VolumeWriteBytes" + echo "VolumeWriteOps" + + echo " " + echo "For AWS/RDS Namespace" + echo " " + echo "CPUUtilization" + echo "DatabaseConnections" + echo "DiskQueueDepth" + echo "FreeStorageSpace" + echo "FreeableMemory" + echo "ReadIOPS" + echo "ReadLatency" + echo "ReadThroughput" + echo "SwapUsage" + echo "WriteIOPS" + echo "WriteLatency" + echo "WriteThroughput" + + echo " " + echo "For AWS/ELB Namespace" + echo " " + echo "HTTPCode_Backend_2XX" + echo "HTTPCode_Backend_3XX" + echo "HTTPCode_Backend_4XX" + echo "HTTPCode_Backend_5XX" + echo "HTTPCode_ELB_4XX" + echo "HTTPCode_ELB_5XX" + echo "HealthyHostCount" + echo "Latency" + echo "RequestCount" + echo "UnHealthyHostCount" + + echo " " + exit +} + + +if [ $# -eq 0 ] +then + help +fi + +TIMEOUT_CHECK=0 +DOMAIN_CHECK="" +IP_CHECK="" +DNS_CHECK="" + + +# Main parsing code +while getopts ":zhlLf:d:i:n:m:A:S:R:a:C:" optname + do + case "$optname" in + "f") + arg_config_file="$OPTARG" ;; + "h") + help ;; + "l") + list_metrics=1 ;; + "L") + list_metrics_in_raw_format="yes" + list_metrics=1 ;; + "z") + help_metrics ;; + "A") + OPT_ACCESS_KEY="--I $OPTARG" ;; + "S") + OPT_SECRET_KEY="--S $OPTARG" ;; + "R") + OPT_REGION="--region $OPTARG" ;; + "n") + NAMESPACE=$OPTARG ;; + "d") + arg_dimensions="$OPTARG" ;; + "i") + INSTANCE=$OPTARG ;; + "m") + METRIC=$OPTARG ;; + "a") + ZONE=$OPTARG ;; + "C") + CACHENODEID=$OPTARG ;; + *) + help ;; + esac +done + +config_file=${arg_config_file:-$default_config_file} +# Read config file +if [ -f "$config_file" ] && [ -r "$config_file" ] +then + . $config_file +else + echo "Cannot read $config_file." +fi + +check_required_variables + +if [ ! -z $list_metrics ] +then + list_available_metrics +fi +if [ -z "$METRIC" ] +then + help +fi +if [ -z "$NAMESPACE" ] +then + help +fi + +case "$NAMESPACE" in + AWS/RDS) + DIMENSIONS="${arg_dimensions:-DBInstanceIdentifier=$INSTANCE}" ;; + AWS/ElastiCache) + DIMENSIONS=${arg_dimensions:-"CacheClusterId=$INSTANCE,CacheNodeId=$CACHENODEID"} ;; + AWS/ELB) + if [ ! -z "$arg_dimensions" ] + then + DIMENSIONS=${arg_dimensions}; + else + if [ ! -z "$INSTANCE" ] + then + DIMENSIONS="LoadBalancerName=$INSTANCE" + fi + if [ ! -z "$ZONE" ] + then + DIMENSIONS="${DIMENSIONS:+$DIMENSIONS,}AvailabilityZone=$ZONE" + fi + fi + ;; + *) + DIMENSIONS= + #${arg_dimensions:-"InstanceId=$INSTANCE"} + ;; +esac + +if [ "$DIMENSIONS" == "" ]; then + ${AWS_CLOUDWATCH_HOME}/bin/mon-get-stats ${METRIC} --namespace $NAMESPACE \ + ${OPT_REGION} ${OPT_ACCESS_KEY} ${OPT_SECRET_KEY} -s Average --period 300 | \ + tail -1 | \ + awk '$3 ~ /^[-]?[0-9]+[.][0-9]+[Ee][+-]?[0-9]+$/{$3 = sprintf("%.3f",$3)} {print $3}' +else + ${AWS_CLOUDWATCH_HOME}/bin/mon-get-stats ${METRIC} --namespace $NAMESPACE \ + ${OPT_REGION} ${OPT_ACCESS_KEY} ${OPT_SECRET_KEY} -s Average --period 300 \ + --dimensions "$DIMENSIONS" | tail -1 | \ + awk '$3 ~ /^[-]?[0-9]+[.][0-9]+[Ee][+-]?[0-9]+$/{$3 = sprintf("%.3f",$3)} {print $3}' +fi + diff --git a/pandora_plugins/EC2/ec2_describe_instance.sh b/pandora_plugins/EC2/ec2_describe_instance.sh new file mode 100755 index 0000000000..b18bd30aad --- /dev/null +++ b/pandora_plugins/EC2/ec2_describe_instance.sh @@ -0,0 +1,190 @@ +#!/bin/bash +# Amazon EC2 Pandora FMS Server plugin +# (c) Sancho Lerena 2011 + +# .. Config + +# location of default config file +default_config_file=/usr/share/pandora_server/util/plugin/aws_plugin.conf +default_java_home=/usr +progname=`basename $0` + +# .. Functions + +function help { + + echo -e "Amazon EC2 Plugin for Pandora FMS Plugin server. http://pandorafms.com" + echo " " + echo "This plugin is used to get EC2 instance information via EC2 API" + echo "Syntax:" + echo " ./$progname [-A access-key -S secret-key][-R region] -f config -i instance-id -n field-name" + echo -e "\t\t-f path of configu file" + echo -e "\t\t-R Region, p.e us-east-1" + echo -e "\t\t-A Access KEY ID, p.e AKIAILTVJ3S26GTKLD4A" + echo -e "\t\t-S Secret Access Key, p.e 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" + echo -e "\t\t-i Instance ID, p.e i-9d0b4af1" + echo -e "\t\t-n Field Name, p.e type, public-dns, .." + echo -e "\t\t-h Show this messages" + echo " " + echo -e "\t\t field-nmae is one of following;" + echo -e "\t\t\tami-id, public-dns, private-dns, state, type, available-zone," + echo -e "\t\t\tpublic-ip, private-ip, block-devices, security-groups," + echo -e "\t\t\ttag:\${your-tag-name}" + echo "Samples:" + echo " ./$progname -f /usr/share/pandora/util/plugin/ec2_plugin.conf -i i-9d0b4af1 -n public-dns" + echo " ./$progname -f /usr/share/pandora/util/plugin/ec2_plugin.conf -i i-9d0b4af1 -n tag:Name" + echo + + exit 0 +} + +function check_required_variables { + _result=OK; + +# .. EC2_HOME + if [ ! -d "$EC2_HOME" ] || [ ! -x $EC2_HOME/bin/ec2-describe-instances ] + then + echo "You need to define EC2_HOME settings." + _result=NG; + fi + export EC2_HOME + +# .. JAVA_HOME + if [ -z "$JAVA_HOME" ] && [ -d "$default_java_home" ] && [ -x "$default_java_home/bin/java" ] + then + JAVA_HOME=$default_java_home + fi + if [ ! -d "$JAVA_HOME" ] || [ ! -x "$JAVA_HOME/bin/java" ] + then + echo "You need to define JAVA_HOME settings." + _result=NG; + fi + export JAVA_HOME + +# .. AWS_CREDENTIAL_FILE (or specify AWS_ACCESS_KEY/OPT_SECRET_KEY pair) + if [ -z "${OPT_ACCESS_KEY}" ] && [ -z "${OPT_SECRET_KEY}" ] + then + if [ ! -f "$AWS_CREDENTIAL_FILE" ] || [ ! -r "$AWS_CREDENTIAL_FILE" ] + then + echo "You need to specify AWS_ACCESS_KEY/OPT_SECRET_KEY pair or define AWS_CREDENTIAL_FILE settings." + _result=NG; + else + AWS_ACCESS_KEY=`sed -n -e '/^AWSAccessKeyId=/{s/^AWSAccessKeyId=\([^ ]*\).*$/\1/p;q}' $AWS_CREDENTIAL_FILE` + AWS_SECRET_KEY=`sed -n -e '/^AWSSecretKey=/{s/^AWSSecretKey=\([^ ]*\).*$/\1/p;q}' $AWS_CREDENTIAL_FILE` + export AWS_ACCESS_KEY AWS_SECRET_KEY + fi + else + if [ -z "${OPT_ACCESS_KEY}" ] || [ -z "${OPT_SECRET_KEY}" ] + then + echo "You need to specify AWS_ACCESS_KEY/OPT_SECRET_KEY pair or define AWS_CREDENTIAL_FILE settings." + _result=NG; + fi + fi + +# .. EC2_REGION or EC2_URL + if [ -z "$EC2_URL" ] && [ -z "$EC2_REGION" ] + then + echo "You need to define EC2_REGION or EC2_URL settings." + _result=NG; + fi + if [ -z "$EC2_URL" ] + then + EC2_URL="http://ec2.${EC2_REGION}.amazonaws.com" + fi + export EC2_URL + +# check the result and abort if shomething wrong + + if [ "$_result" != "OK" ] + then + echo "Please read the documentation." + echo "aborting..." + exit 1; + fi + + # optional settings... + + [ -n "$SERVICE_JVM_ARGS" ] && export SERVICE_JVM_ARGS +} + + +if [ $# -eq 0 ] +then + help +fi + +TIMEOUT_CHECK=0 +DOMAIN_CHECK="" +IP_CHECK="" +DNS_CHECK="" + + +# Main parsing code +while getopts ":hf:A:S:R:i:n:" optname + do + case "$optname" in + "h") + help ;; + "f") + arg_config_file="$OPTARG" ;; + "A") + OPT_ACCESS_KEY="--I $OPTARG" ;; + "S") + OPT_SECRET_KEY="--S $OPTARG" ;; + "R") + OPT_REGION="--region $OPTARG" ;; + "i") + target="$OPTARG" ;; + "n") + field="$OPTARG" ;; + *) + help ;; + esac +done + +shift `expr $OPTIND - 1` + +config_file=${arg_config_file:-$default_config_file} +# Read config file +if [ -f "$config_file" ] && [ -r "$config_file" ] +then + . $config_file +else + echo "Cannot read $config_file." +fi + +check_required_variables + +if [ -z "$field" ] || [ -z "$target" ] +then + help +fi + +description_lines=`${EC2_HOME}/bin/ec2-describe-instances ${OPT_ACCESS_KEY} ${OPT_SECRET_KEY} ${OPT_REGION} --show-empty-fields $target 2> /dev/null` + +case $field in +ami-id|ami) + echo "$description_lines" | grep "^INSTANCE" | cut -f 3;; +public-dns) + echo "$description_lines" | grep "^INSTANCE" | cut -f 4;; +private-dns) + echo "$description_lines" | grep "^INSTANCE" | cut -f 5;; +state) + echo "$description_lines" | grep "^INSTANCE" | cut -f 6;; +type) + echo "$description_lines" | grep "^INSTANCE" | cut -f 10;; +available-zone|zone) + echo "$description_lines" | grep "^INSTANCE" | cut -f 12;; +public-ip) + echo "$description_lines" | grep "^INSTANCE" | cut -f 17;; +private-ip) + echo "$description_lines" | grep "^INSTANCE" | cut -f 18;; +block-devices) + echo "$description_lines" | grep "^BLOCKDEVICE" | cut -f 2,3;; +security-groups|groups) + echo "$description_lines" | grep "^RESERVATION" | cut -f 4;; +tag:*) + target_tag=${field/tag:/} + echo "$description_lines" | grep -i "^TAG instance $target $target_tag" | cut -f 5;; +esac + diff --git a/pandora_plugins/FTP/ftp_plugin/ftp.conf b/pandora_plugins/FTP/ftp_plugin/ftp.conf new file mode 100644 index 0000000000..ff418cdcfb --- /dev/null +++ b/pandora_plugins/FTP/ftp_plugin/ftp.conf @@ -0,0 +1,45 @@ +# Example of configuration file for FTP Agent/Plugin for Pandora FMS. + +#====================================================================== +#---------- FTP access parameters / General parameters -------------- +#====================================================================== + +# User and password for FTP connection +conf_ftp_user mario + +# Use "" if your password is in blank +conf_ftp_pass pulido + +# Configure complete name of ftp file --> upload (Local) +conf_ftp_putfile /home/mariopc/Descargas/ejemplo.zip + +# Configure name of ftp file --> upload (FTP server) +conf_ftp_putname prueba.zip + +# Configure Ip for FTP Connection +conf_ftp_host localhost + +# Configure name of ftp file --> download (FTP server) +conf_ftp_getfile prueba.zip + +# Configure complete name os ftp file --> download (Local) +conf_ftp_getname prueba.zip + +# Configure Operating System (Unix or Windows) +conf_operating_system Unix + +# Opcion para los archivos que se vayan a comparar. +# 1.- Si desea modificar el nombre del archivo que se descarga antiguo por el nuevo en el caso de que hayan cambiado escriba write +# 2.- si desea que no se modifiquen escribe notwrite +conf_ftp_compare write + + +conf_ftp_compare_file prueba.zip + + +conf_local_comp_file prueba.zip + + +conf_local_downcomp_file /tmp/prueba.zip + + diff --git a/pandora_plugins/FTP/ftp_plugin/plugin_ftp.pl b/pandora_plugins/FTP/ftp_plugin/plugin_ftp.pl new file mode 100644 index 0000000000..0aa463e597 --- /dev/null +++ b/pandora_plugins/FTP/ftp_plugin/plugin_ftp.pl @@ -0,0 +1,266 @@ +#!/usr/bin/perl +# Pandora FMS Agent Plugin for Monitoring FTP servers +# Mario Pulido (c) Artica Soluciones Tecnologicas 2012 +# v1.0, 18 Jun 2012 +# ------------------------------------------------------------------------ + +use strict; +use warnings; +use Data::Dumper; +use Net::FTP; +use Time::HiRes qw ( gettimeofday ); + +my $archivo_cfg = $ARGV[0]; + +# Hash with this plugin setup +my %plugin_setup; + +# FLUSH in each IO +$| = 1; + +my $version = "v1r1"; + + +# ---------------------------------------------------------------------------- +# This cleans DOS-like line and cleans ^M character. VERY Important when you process .conf edited from DOS +# ---------------------------------------------------------------------------- + +sub parse_dosline ($) +{ + my $str = $_[0]; + + $str =~ s/\r//g; + return $str; +} + +sub clean_blank($) +{ + my $input = $_[0]; + $input =~ s/[\s\r\n]*//g; + return $input; +} + +# ---------------------------------------------------------------------------- +# print_module +# +# This function return a pandora FMS valid module fiven name, type, value, description +# ---------------------------------------------------------------------------- + +sub print_module ($$$$) +{ + my $MODULE_NAME = $_[0]; + my $MODULE_TYPE = $_[1]; + my $MODULE_VALUE = $_[2]; + my $MODULE_DESC = $_[3]; + + # If not a string type, remove all blank spaces! + if ($MODULE_TYPE !~ m/string/) + { + $MODULE_VALUE = clean_blank($MODULE_VALUE); + } + + print "\n"; + print "\n"; + print "$MODULE_TYPE\n"; + print "\n"; + print "\n"; + print "\n"; + +} + +# ---------------------------------------------------------------------------- +# load_external_setup +# +# Load external file containing configuration +# ---------------------------------------------------------------------------- + +sub load_external_setup ($); # Declaration due a recursive call to itself on includes +sub load_external_setup ($) +{ + + my $archivo_cfg = $_[0]; + my $buffer_line; + my @config_file; + my $parametro = ""; + + # Collect items from config file and put in an array + if (! open (CFG, "< $archivo_cfg")) { + print "[ERROR] Error opening configuration file $archivo_cfg: $!.\n"; + exit 1; + } + + while (){ + $buffer_line = parse_dosline ($_); + # Parse configuration file, this is specially difficult because can contain SQL code, with many things + if ($buffer_line !~ /^\#/){ # begins with anything except # (for commenting) + if ($buffer_line =~ m/(.+)\s(.*)/){ + push @config_file, $buffer_line; + } + } + } + close (CFG); + + foreach (@config_file) + { + $parametro = $_; + + if ($parametro =~ m/^conf\_ftp\_user\s(.*)/i) { + $plugin_setup{"conf_ftp_user"} = $1; + } + + if ($parametro =~ m/^conf\_ftp\_pass\s(.*)/i) { + $plugin_setup{"conf_ftp_pass"} = $1; + } + + if ($parametro =~ m/^conf\_ftp\_host\s(.*)/i) { + $plugin_setup{"conf_ftp_host"} = $1; + } + + if ($parametro =~ m/^conf\_ftp\_putfile\s(.*)/i) { + $plugin_setup{"conf_ftp_putfile"} = $1; + } + + if ($parametro =~ m/^conf\_ftp\_getfile\s(.*)/i) { + $plugin_setup{"conf_ftp_getfile"} = $1; + } + + if ($parametro =~ m/^conf\_ftp\_putname\s(.*)/i) { + $plugin_setup{"conf_ftp_putname"} = $1; + } + + if ($parametro =~ m/^conf\_ftp\_getname\s(.*)/i) { + $plugin_setup{"conf_ftp_getname"} = $1; + } + + if ($parametro =~ m/^conf\_ftp\_compare_file\s(.*)/i) { + $plugin_setup{"conf_ftp_compare_file"} = $1; + } + + if ($parametro =~ m/^conf\_local\_comp_file\s(.*)/i) { + $plugin_setup{"conf_local_comp_file"} = $1; + } + + if ($parametro =~ m/^conf\_local\_downcomp_file\s(.*)/i) { + $plugin_setup{"conf_local_downcomp_file"} = $1; + } + + if ($parametro =~ m/^conf\_operating\_system\s(.*)/i) { + $plugin_setup{"conf_operating_system"} = $1; + } + if ($parametro =~ m/^conf\_ftp\_compare\s(.*)/i) { + $plugin_setup{"conf_ftp_compare"} = $1; + } + + } +} + + +#------------------------------------------------------------------------- +# +# Main function +# +#-------------------------------------------------------------------------- + +# Parse external configuration file + +# Load config file from command line +if ($#ARGV == -1 ) +{ + print "I need at least one parameter: Complete path to external configuration file \n"; + print "\n"; + print "Pandora_Plugin_FTP Version $version\n"; + exit; +} + +# Check for file +if ( ! -f $archivo_cfg ) +{ + printf "\n [ERROR] Cannot open configuration file at $archivo_cfg. \n\n"; + exit 1; +} + +load_external_setup ($archivo_cfg); + +#------------------------------------------------------------------------- +# Start session in FTP server +#-------------------------------------------------------------------------- + +my $ftp = Net::FTP->new($plugin_setup{"conf_ftp_host"}) or die("Unable to connect to server: $!");#Connect FTP server +$ftp->login($plugin_setup{"conf_ftp_user"},$plugin_setup{"conf_ftp_pass"}) or die("Failed Login: $!");# Login at FTP server +#print_module ( "Disp_FTP_$plugin_setup{conf_ftp_host}" , "generic_proc", 1, " Determines whether FTP login to $plugin_setup{conf_ftp_host} has been successful or not" ); +#------------------------------------------------------------------------- +# Returns the module that shows the time and transfer rate.(Upload a file) +#-------------------------------------------------------------------------- + + my $clock0 = gettimeofday(); + $ftp->put($plugin_setup{"conf_ftp_putfile"},$plugin_setup{"conf_ftp_putname"});# Upload file at FTP server + my $clock1 = gettimeofday(); + my $clockd = $clock1 - $clock0;# Calculate upload transfer time + $ftp->size($plugin_setup{"conf_ftp_putname"});# File size + my $putrate = $ftp->size($plugin_setup{"conf_ftp_putname"})/$clockd;# Calculate rate transfer + my $time_puftp=sprintf("%.2f",$clockd); + my $rate_puftp=sprintf("%.2f",$putrate); + + print_module ( "PUT_file_transfer_time_$plugin_setup{conf_ftp_putname}" , "generic_data" , $time_puftp , " Show the time it takes to upload $plugin_setup{conf_ftp_putname} , at FTP server "); + print_module ( "PUT_file_transfer_rate_$plugin_setup{conf_ftp_putname}" , "generic_data", $rate_puftp , " Show rate transfer to upload $plugin_setup{conf_ftp_putname} , at FTP server in B/s "); + +#------------------------------------------------------------------------- +# Returns the module that shows the time and transfer rate (Download a file) +#-------------------------------------------------------------------------- + + my $clock2 = gettimeofday(); + $ftp->get($plugin_setup{"conf_ftp_getfile"},$plugin_setup{"conf_ftp_getname"}); + my $clock3 = gettimeofday(); + my $clockg = $clock3 - $clock2; + $ftp->size($plugin_setup{"conf_ftp_getname"}); + my $getrate = $ftp->size($plugin_setup{"conf_ftp_getname"})/$clockg; + my $time_getftp=sprintf("%.2f",$clockg); + my $rate_getftp=sprintf("%.2f",$getrate); + + print_module ( "GET_file_transfer_time_$plugin_setup{conf_ftp_getfile}" , "generic_data" , $time_getftp , " Show the time it takes to download $plugin_setup{conf_ftp_getfile} , at FTP server " ); + print_module ( "GET_file_transfer_rate_$plugin_setup{conf_ftp_getfile}" , "generic_data", $rate_getftp, " Show rate transfer to download $plugin_setup{conf_ftp_getfile} , at FTP server in B/s " ); + +#------------------------------------------------------------------------- +# Returns the module that compares file changes between a server_file and local_file +#-------------------------------------------------------------------------- + +my $compare_unix; +my $compare_wdos; + +# Download file server +$ftp->get($plugin_setup{"conf_ftp_compare_file"},$plugin_setup{"conf_local_downcomp_file"}); + +# Compare file between server_file and local_file + if ( $plugin_setup{"conf_operating_system"} eq "Unix"){ + $compare_unix = `cmp $plugin_setup{"conf_local_downcomp_file"} $plugin_setup{"conf_local_comp_file"} ; echo \$?`; + if ( $compare_unix == 0){ + print_module ( "FTP_Maching_files" , "generic_proc", 1 , " Compare a server file and a local file " ); + } + else{ + print_module ( "FTP_Maching_files" , "generic_proc", 0 , " Compare a server file and a local file $plugin_setup{conf_ftp_compare_file} " ); + if ( $plugin_setup{"conf_ftp_compare"} eq "write" ){ + my $write_option = `mv $plugin_setup{conf_local_downcomp_file} $plugin_setup{conf_local_comp_file}`; + } + } +} + if ( $plugin_setup{"conf_operating_system"} eq "Windows"){ + my $compare_wdos = `fc $plugin_setup{"conf_local_downcomp_file"} $plugin_setup{"conf_local_comp_file"} > diff.txt`; + my $archivo = "diff.txt"; + my $peso = -s $archivo; + if ($peso > 79){ + print_module ( "FTP_Maching_files" , "generic_proc", 0 , " Compare a server file and a local file $plugin_setup{conf_ftp_compare_file} " ); + if ( $plugin_setup{"conf_ftp_compare"} eq "write" ){ + my $write_option = `move /Y $plugin_setup{conf_local_downcomp_file} $plugin_setup{conf_local_comp_file}`; + } + }else{ + print_module ( "FTP_Maching_files" , "generic_proc", 1 , " Compare a server file and a local file " ) + } + + + } + + + + + + diff --git a/pandora_plugins/FTP/ftp_plugin_list/ftp_plugin_list.conf b/pandora_plugins/FTP/ftp_plugin_list/ftp_plugin_list.conf new file mode 100644 index 0000000000..7ce0aa4a4d --- /dev/null +++ b/pandora_plugins/FTP/ftp_plugin_list/ftp_plugin_list.conf @@ -0,0 +1,32 @@ +# Configuration for ftp_plugin_list + +# remote ftp server +ftp_server=ftp.secyt.gov.ar + +# ftp port +ftp_port=21 + +# ftp user +ftp_user=anonymous + +# ftp user's password +ftp_pass= + +# remote directory to be listed +ftp_directory=. + +# log file +log=/tmp/ftp_plugin_list.log + +# tmp dir +tmp=/tmp + + +## Pandora module customization +## Custom module checks +#MODULE_GROUP=Networking +## Define comma separated tag list +#MODULE_TAG_LIST= +## Uncomment to set module interval +#MODULE_INTERVAL=2 + diff --git a/pandora_plugins/FTP/ftp_plugin_list/ftp_plugin_list.pl b/pandora_plugins/FTP/ftp_plugin_list/ftp_plugin_list.pl new file mode 100644 index 0000000000..ce50feff77 --- /dev/null +++ b/pandora_plugins/FTP/ftp_plugin_list/ftp_plugin_list.pl @@ -0,0 +1,346 @@ +#!/usr/bin/perl +# +# Pandora FMS FTP plugin for ftp listing +# +# +# 2016-04-01 v1 +# (c) Fco de Borja Sanchez +# + + +use strict; +use warnings; + +use Scalar::Util qw(looks_like_number); +use Time::HiRes qw(time); +use POSIX qw(strftime setsid floor); + +### defines +my $DEFAULT_GROUP = "FTP"; +my $MODULE_GROUP = "Networking"; +my $MODULE_TAGS = ""; +my $GLOBAL_log = "/tmp/ftp_plugin_list.log"; + +my %config; + + + + + +#################################### +###### COMMON FUNCTIONS BEGIN ###### +#################################### + +##### +## Get current time (milis) +#################################### +sub getCurrentUTimeMilis(){ + #return trim (`date +"%s%3N"`); # returns 1449681679712 + return floor(time*1000); +} + +#### +# Erase blank spaces before and after the string +#################################################### +sub trim($){ + my $string = shift; + if (empty ($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp ($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + +##### +# Empty +################################### +sub empty($){ + my $str = shift; + + if (! (defined ($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + +##### +# print_module +################################### +sub print_module ($;$){ + my $data = shift; + my $not_print_flag = shift; + + if ((ref($data) ne "HASH") || (!defined $data->{name})) { + return undef; + } + + my $xml_module = ""; + # If not a string type, remove all blank spaces! + if ($data->{type} !~ m/string/){ + $data->{value} = trim($data->{value}); + } + + $data->{tags} = $data->{tags}?$data->{tags}:($config{MODULE_TAG_LIST}?$config{MODULE_TAG_LIST}:undef); + $data->{interval} = $data->{interval}?$data->{interval}:($config{MODULE_INTERVAL}?$config{MODULE_INTERVAL}:undef); + $data->{module_group} = $data->{module_group}?$data->{module_group}:($config{MODULE_GROUP}?$config{MODULE_GROUP}:$MODULE_GROUP); + + $xml_module .= "\n"; + $xml_module .= "\t{name} . "]]>\n"; + $xml_module .= "\t" . $data->{type} . "\n"; + $xml_module .= "\t{value} . "]]>\n"; + + if ( !(empty($data->{desc}))) { + $xml_module .= "\t{desc} . "]]>\n"; + } + if ( !(empty ($data->{unit})) ) { + $xml_module .= "\t{unit} . "]]>\n"; + } + if (! (empty($data->{interval})) ) { + $xml_module .= "\t{interval} . "]]>\n"; + } + if (! (empty($data->{tags})) ) { + $xml_module .= "\t" . $data->{tags} . ">\n"; + } + if (! (empty($data->{module_group})) ) { + $xml_module .= "\t" . $data->{module_group} . "\n"; + } + if (! (empty($data->{wmin})) ) { + $xml_module .= "\t{wmin} . "]]>\n"; + } + if (! (empty($data->{wmax})) ) { + $xml_module .= "\t{wmax} . "]]>\n"; + } + if (! (empty ($data->{cmin})) ) { + $xml_module .= "\t{cmin} . "]]>\n"; + } + if (! (empty ($data->{cmax})) ){ + $xml_module .= "\t{cmax} . "]]>\n"; + } + if (! (empty ($data->{wstr}))) { + $xml_module .= "\t{cstr} . "]]>\n"; + } + if (! (empty ($data->{cstr}))) { + $xml_module .= "\t{cstr} . "]]>\n"; + } + + $xml_module .= "\n"; + + if (empty ($not_print_flag)) { + print $xml_module; + } + + return $xml_module; +} + +##### +## Module warning +## - tag: name +## - value: severity (default 0) +## - msg: description of the message +########################################### +sub print_warning($$;$){ + my ($tag, $msg, $value) = @_; + + if (!(isEnabled($config{informational_modules}))) { + return 0; + } + + if (!(isEnabled($config{informational_monitors}))) { + $value = 0; + } + + my %module; + $module{name} = "Plugin message" . ( $tag?" " . $tag:""); + $module{type} = "generic_data"; + $module{value} = defined($value)?$value:0; + $module{desc} = $msg; + $module{wmin} = 1; + $module{cmin} = 3; + print_module(\%module); +} + + +##### +## Plugin devolution in case of error +####################################### +sub print_error($){ + my $msg = shift; + my %module; + $module{name} = "Plugin execution error"; + $module{type} = "generic_proc"; + $module{value} = 0; + $module{desc} = $msg; + print_module(\%module); + exit -1; +} + +##### +## Log data +######################## +my $log_aux_flag = 0; +sub logger ($$) { + my ($tag, $message) = @_; + my $file = $config{log}; + defined $file or $file = $GLOBAL_log; + + # Log rotation + if (-e $file && (stat($file))[7] > 32000) { + rename ($file, $file.'.old'); + } + if ($log_aux_flag == 0) { + # Log starts + if (! open (LOGFILE, "> $file")) { + print_error "[ERROR] Could not open logfile '$file'"; + } + $log_aux_flag = 1; + } + else { + if (! open (LOGFILE, ">> $file")) { + print_error "[ERROR] Could not open logfile '$file'"; + } + } + + $message = "[" . $tag . "] " . $message if ((defined $tag) && ($tag ne "")); + + if (!(empty($config{agent_name}))){ + $message = "[" . $config{agent_xml_name} . "] " . $message; + } + + print LOGFILE strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " - " . $message . "\n"; + close (LOGFILE); +} + +##### +## is Enabled +################# +sub isEnabled($){ + my $value = shift; + + if ((defined ($value)) && ($value > 0)){ + # return true + return 1; + } + #return false + return 0; + +} + +##### +## General configuration file parser +## +## log=/PATH/TO/LOG/FILE +## +####################################### +sub parse_configuration($){ + my $conf_file = shift; + my %_config; + + open (_CFILE,"<", "$conf_file") or return undef; + + while (<_CFILE>){ + if (($_ =~ /^ *$/) + || ($_ =~ /^#/ )){ + # skip blank lines and comments + next; + } + my @parsed = split /=/, $_, 2; + $_config{trim($parsed[0])} = trim($parsed[1]); + } + close (_CFILE); + + return %_config; +} + +################################## +###### COMMON FUNCTIONS END ###### +################################## + + +#### +# Creates a response file for FTP +################################## +sub ftp_create_response_file($){ + my ($file_name) = @_; + + my $file = $config{tmp} . "/" . $file_name; + + if (! open (TFTP_OUT_FILE, "> $file")) { + print_error "[ERROR] Could not open logfile '$file'"; + } + + if (empty($config{ftp_pass})){ + logger("user", "password not set, use 'none'"); + $config{ftp_pass} = "none"; + } + + print TFTP_OUT_FILE "open " . $config{ftp_server} . " " . $config{ftp_port} . "\n"; + print TFTP_OUT_FILE "user \"" . $config{ftp_user} . "\" " . $config{ftp_pass} . "\n"; + print TFTP_OUT_FILE "ls " . $config{ftp_directory} . "\n"; + print TFTP_OUT_FILE "bye\n"; + close(TFTP_OUT_FILE); + + return $file; +} + + +################################################################## +# +# +# ---------------------------- MAIN ---------------------------- +# +# +################################################################## +logger("start", ""); +if ($#ARGV < 0){ + print STDERR "Usage: $0 ftp_plugin_list.conf\n"; + exit 1; +} + +%config = parse_configuration($ARGV[0]); + +my $file_name = getCurrentUTimeMilis() . "T" . (sprintf "%04.0f", rand()*1000); +my $file = ftp_create_response_file($file_name); + + +my $tstart = getCurrentUTimeMilis(); +my $nitems = -1; +logger("run", "running"); +$nitems = `ftp -n < $file 2>>$config{log} | wc -l`; + +my $tend = getCurrentUTimeMilis(); + + +print_module({ + name => "FTP listing items", + type => "generic_data", + value => $nitems, + description => "items in $config{ftp_server} $config{ftp_directory}" +}); + +print_module({ + name => "FTP listing: timing", + type => "generic_data", + value => ($tend - $tstart)/1000, + description => "Time used to list items in $config{ftp_server}", + unit => "s" +}); + + +if (-e $file){ + unlink ($file); +} +logger("end", ""); diff --git a/pandora_plugins/ICMP_latency_Win/Pandora_ICMP_latency_Win.ps1 b/pandora_plugins/ICMP_latency_Win/Pandora_ICMP_latency_Win.ps1 new file mode 100644 index 0000000000..afe03cf21a --- /dev/null +++ b/pandora_plugins/ICMP_latency_Win/Pandora_ICMP_latency_Win.ps1 @@ -0,0 +1,234 @@ +# Plugin for monitoring devices via ICMP. + +# Pandora FMS Agent Plugin for ICMP Monitoring +# (c) Toms Palacios 2012 +# v1.1, 02 Aug 2012 - 21:40:00 +# ------------------------------------------------------------------------ + +# Configuration Parameters + +param ([string]$w = "w", [string]$n = "n", [string]$select = "select", [string]$list = "list", [string]$onlyxml = "onlyxml", [string]$onlyvalue = "onlyvalue") + +$host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(512,50); + + if ($select -eq "select") { + + echo "`nPandora FMS Agent Plugin for ICMP Monitoring`n" + + echo "(c) Toms Palacios 2012 v1.1, 02 Aug 2012 - 21:40:00`n" + + echo "Parameters:`n" + + echo " -w Timeout in milliseconds to wait for each reply (Default timeout is 1000 milliseconds)`n" + + echo " -n Number of echo requests to send (Default is 4 echo requests)`n" + + echo " -select all All operations are executed`n" + + echo " -select host-alive Only operations to check host status (responding or not)`n" + + echo " -select host-latency Only operations to check host latency (returns -1 if not available)`n" + + echo " -list Provides an absolute path to a list of hosts to check (not to be used with -only-value)`n" + + echo " -onlyxml Provides a single host to check returning the value in XML format`n" + + echo " -onlyvalue Provides a single host to check returning the value in standard format (useless for -list or -select all)`n" + + echo "Usage example: .\Pandora_Plugin_Ping_v1.0.ps1 -w 1000 -n 4 -select all -list C:\Users\Pandora\hosts.txt 2> plugin_error.log`n" + } + + else { + + $server = hostname + +#############################CODE BEGINS HERE############################### + +# Funcin para sacar los mdulos en formato XML en el output + + function print_module { + + param ([string]$module_name,[string]$module_type,[string]$module_value,[string]$module_description) + + echo "" + echo "" + echo "$module_type" + echo "" + echo "" + echo "" + echo "" + echo "" + + } + + +# Error si no se selecciona ninguna tarea a realizar + + if ( $list -eq "list" -and $onlyxml -eq "onlyxml" -and $onlyvalue -eq "onlyvalue" ) { + + Write-Error "Error: A list or a single host must be provided as a parameter first." -category InvalidArgument + + } else { + +# Definir valores por defecto de timeout y peticiones echo + + if ( $w -eq "w" ) { + + $w = 1000 -as [int] + + } + + else { + + $w = $w -as [int] + + } + + if ($n -eq "n" ) { + + $n = 4 -as [int] + + } + + else { + + $n = $n -as [int] + + } + +# Restringiendo el uso de select onlyvalue a una sola tarea y host + + if ( $onlyvalue -ne "onlyvalue" -and $select -eq "all" ) { + + Write-Error "Error: Cannot select all operations for parameter -select onlyvalue" -category InvalidArgument + + } + + if ( $onlyvalue -ne "onlyvalue" -and $list -ne "list" ) { + + Write-Error "Error: Cannot use a host list for parameter -select onlyvalue" -category InvalidArgument + + } + +# MAIN CODE + + if ( $onlyvalue -ne "onlyvalue" -and $list -eq "list" -and $select -ne "all" ) { + + $commandc = `ping $onlyvalue -w $w -n $n | grep "ms,"; + + $commandc | foreach-object { + + $unformattedvalue = `echo $_ | gawk '{ print $NF }' | gawk -F ms '{ print $1 }'; + + if ( $select -eq "host-latency" -and $unformattedvalue ) { + + echo "$unformattedvalue" + + } + + if ( $select -eq "host-latency" -and !$unformattedvalue ) { + + echo "-1" + + } + + if ( $select -eq "host-alive" -and $unformattedvalue ) { + + echo "1" + + } + + if ( $select -eq "host-alive" -and !$unformattedvalue ) { + + echo "0" + + } + + } + + } + + if ( $onlyxml -ne "onlyxml" ) { + + $command = `ping $onlyxml -w $w -n $n | grep "ms,"; + + $command | foreach-object { + + $value = `echo $_ | gawk '{ print $NF }' | gawk -F ms '{ print $1 }'; + + if ( $select -eq "all" -and $value -or $select -eq "host-latency" -and $value ) { + + print_module "Host Latency - $onlyxml" "generic_data" "$value" "$_" + + } + + if ( $select -eq "all" -and !$value -or $select -eq "host-latency" -and !$value ) { + + print_module "Host Latency - $onlyxml" "generic_data" "-1" "Unable to ping location" + + } + + if ( $select -eq "all" -and $value -or $select -eq "host-alive" -and $value ) { + + print_module "Host Alive - $onlyxml" "generic_proc" "1" "Host is alive" + + } + + if ( $select -eq "all" -and !$value -or $select -eq "host-alive" -and !$value ) { + + print_module "Host Alive - $onlyxml" "generic_proc" "0" "Unable to ping location" + + } + + } + + } + + if ( $list -ne "list" -and $onlyvalue -eq "onlyvalue" ) { + + get-content $list | foreach-object { + + $hostcheck = $_ + + $command2= `ping $hostcheck -w $w -n $n | grep "ms,"; + + $command2 | foreach-object { + + $value = `echo $_ | gawk '{ print $NF }' | gawk -F ms '{ print $1 }'; + + if ( $select -eq "all" -and $value -or $select -eq "host-latency" -and $value ) { + + print_module "Host Latency - $hostcheck" "generic_data" "$value" "$_" + + } + + if ( $select -eq "all" -and !$value -or $select -eq "host-latency" -and !$value ) { + + print_module "Host Latency - $hostcheck" "generic_data" "-1" "Unable to ping location" + + } + + if ( $select -eq "all" -and $value -or $select -eq "host-alive" -and $value ) { + + print_module "Host Alive - $hostcheck" "generic_proc" "1" "Host is alive" + + } + + if ( $select -eq "all" -and !$value -or $select -eq "host-alive" -and !$value ) { + + print_module "Host Alive - $hostcheck" "generic_proc" "0" "Unable to ping location" + + } + + } + + } + + } + + } + +} + + diff --git a/pandora_plugins/IMAP/pandora_imap.pl b/pandora_plugins/IMAP/pandora_imap.pl new file mode 100644 index 0000000000..362ea62f0c --- /dev/null +++ b/pandora_plugins/IMAP/pandora_imap.pl @@ -0,0 +1,247 @@ +#!/usr/bin/perl +# Pandora FMS Agent Plugin for Monitoring IMAP mails +# Mario Pulido (c) Artica Soluciones Tecnologicas 2013 +# v1.0, 03 Jul 2013 +# ------------------------------------------------------------------------ +use strict; +exit unless load_modules(qw/Getopt::Long Mail::IMAPClient/); + +BEGIN { + if( grep { /^--hires$/ } @ARGV ) { + eval "use Time::HiRes qw(time);"; + warn "Time::HiRes not installed\n" if $@; + } +} +######################################################################## +# Get options from parameters +######################################################################## + +Getopt::Long::Configure("bundling"); +my $verbose = 0; +my $help_usage = ""; +my $imap_server = ""; +my $default_imap_port = "143"; +my $default_imap_ssl_port = "993"; +my $imap_port = ""; +my $username = ""; +my $password = ""; +my $capture_data = ""; +my $mailbox = "INBOX"; +my @search = (); +my $delete = 0; +my $timeout = 30; +my $max_retries = 1; +my $interval = ""; +my $ssl = 0; +my $ssl_ca_file = ""; +my $tls = 0; +my $time_hires = ""; +my $version = "v1r3"; +my $ok; +$ok = Getopt::Long::GetOptions( + "v|verbose=i"=>\$verbose,"h|help"=>\$help_usage, + "t|timeout=i"=>\$timeout, + # imap settings + "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port, + "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox, + "imap-check-interval=i"=>\$interval,"imap-retries=i"=>\$max_retries, + "ssl!"=>\$ssl, "ssl-ca-file=s"=>\$ssl_ca_file, "tls!"=>\$tls, + # search settings + "capture-data=s"=>\$capture_data, + "s|search=s"=>\@search, + "d|deleted=i"=>\$delete, + # Time + "hires"=>\$time_hires, + ); + + +my @required_module = (); +push @required_module, 'IO::Socket::SSL' if $ssl || $tls; +exit unless load_modules(@required_module); +######################################################################### +# Show if all parameters are not setting. +######################################################################### +if( $help_usage + || + ( $imap_server eq "" || $username eq "" || $password eq "" || scalar(@search)==0 ) + ) { + print "Usage: $0 -H host [-p port] -U username -P password -s ( FROM | BODY | SUBJECT | TEXT | YOUNGER | OLDER ) -s 'string' \n"; + print " [-m mailbox][ --capture-data XXXX ][-d 0][--ssl --ssl-ca-files XXX --tls ][--imap-retries ]\n"; + print "Version $version\n"; + print "PandoraFMS Plugin IMAP Monitoring"; + exit ; +} + +######################################################################## +# Initialize +######################################################################## + +my $report = {}; +my $time_start = time; + +######################################################################## +# Connect to IMAP server +######################################################################## + +print "connecting to server $imap_server\n" if $verbose > 2; +my $imap; +eval { + local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm` + alarm $timeout; + + if( $ssl || $tls ) { + $imap_port = $default_imap_ssl_port unless $imap_port; + my %ssl_args = (); + if( length($ssl_ca_file) > 0 ) { + $ssl_args{SSL_verify_mode} = 1; + $ssl_args{SSL_ca_file} = $ssl_ca_file; + $ssl_args{SSL_verifycn_scheme} = 'imap'; + $ssl_args{SSL_verifycn_name} = $imap_server; + } + my $socket = IO::Socket::SSL->new(PeerAddr=>"$imap_server:$imap_port", %ssl_args); + die IO::Socket::SSL::errstr() . " (if you get this only when using both --ssl and --ssl-ca-file, but not when using just --ssl, the server SSL certificate failed validation)" unless $socket; + $socket->autoflush(1); + $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 ); + $imap->State(Mail::IMAPClient->Connected); + $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works + $imap->User($username); + $imap->Password($password); + $imap->login() or die "Cannot login: $@"; + } + else { + $imap_port = $default_imap_port unless $imap_port; + $imap = Mail::IMAPClient->new(Debug => 0 ); + $imap->Server("$imap_server:$imap_port"); + $imap->User($username); + $imap->Password($password); + $imap->connect() or die "$@"; + } + + + $imap->Ignoresizeerrors(1); + + alarm 0; +}; +if( $@ ) { + chomp $@; + print "Could not connect to $imap_server port $imap_port: $@\n"; + exit; +} +unless( $imap ) { + print "Could not connect to $imap_server port $imap_port: $@\n"; + exit; +} +my $time_connected = time;+ + +######################################################################## +# Selecting a mailbox. By default INBOX +######################################################################## + +print "selecting mailbox $mailbox\n" if $verbose > 2; +unless( $imap->select($mailbox) ) { + print "IMAP RECEIVE CRITICAL - Could not select $mailbox: $@ $!\n"; + if( $verbose > 2 ) { + print "Mailbox list:\n" . join("\n", $imap->folders) . "\n"; + print "Mailbox separator: " . $imap->separator . "\n"; + } + $imap->logout(); + exit; +} + +########################################################################## +# Searching emails +########################################################################### + +my $tries = 0; +my @msgs; +until( scalar(@msgs) != 0 || $tries >= $max_retries ) { + eval { + $imap->select( $mailbox ); + print "searching on server\n" if $verbose > 2; + @msgs = $imap->search(@search); + die "Invalid search parameters: $@" if $@; + + }; + if( $@ ) { + chomp $@; + print "Cannot search messages: $@\n"; + $imap->close(); + $imap->logout(); + exit; + } + $report->{found} = scalar(@msgs); + $tries++; + sleep $interval unless (scalar(@msgs) != 0 || $tries >= $max_retries); +} + +######################################################################## +# Capture data in messages +######################################################################## + +my $captured_max_id = ""; +if( $capture_data ) { + my $max = undef; + my %captured = (); + for (my $i=0;$i < scalar(@msgs); $i++) { + my $message = $imap->message_string($msgs[$i]); + if( $message =~ m/$capture_data/ ) { + if( !defined($max) || $1 > $max ) { + $captured{ $i } = 1; + $max = $1; + $captured_max_id = $msgs[$i]; + print $1; + } + } + } +} +else{ + ######################################################################### + # Calculate mail number matching + ########################################################################## + + $report->{found} = 0 unless defined $report->{found}; + print "$report->{found} \n"; +} +######################################################################### +# Deleting messages +######################################################################### + +if( $delete ) { + print "deleting matching messages\n" if $verbose > 2; + my $deleted = 0; + for (my $i=0;$i < scalar(@msgs); $i++) { + $imap->delete_message($msgs[$i]); + $deleted++; + } + $report->{deleted} = $deleted; + $imap->expunge() if $deleted; +} +else { + print "Auto deletion disabled\n" if $verbose > 3; +} + +########################################################################## +# Deselecting the mailbox and disconnecting the IMAP server +######################################################################### + +$imap->close(); +print "disconnecting from server\n" if $verbose > 2; +$imap->logout(); + +######################################################################### +# Load required modules. +######################################################################### + +sub load_modules { + my @missing_modules = (); + foreach( @_ ) { + eval "require $_"; + push @missing_modules, $_ if $@; + } + if( @missing_modules ) { + print "Missing perl modules: @missing_modules\n"; + return 0; + } + return 1; +} + diff --git a/pandora_plugins/IPTraf/passive.collector.conf b/pandora_plugins/IPTraf/passive.collector.conf new file mode 100644 index 0000000000..e5ce2d2620 --- /dev/null +++ b/pandora_plugins/IPTraf/passive.collector.conf @@ -0,0 +1,67 @@ +############################################################################# +# Collector Parameters +# Passive Collector +# Version 0.1 +############################################################################# + +# Pandora data in path + +incomingdir /home/dario/incoming_iptraf/ + +# Interval + +interval 300 + +# Interface where the IPTraf will search. 'interface all' for search on all interfaces + +iface all + +# Min size of each register of the log that will be stored + +min_size 0 + +# IPTraf log file full path. This log will be deleted and created again in each execution + +log_path /var/log/iptraf-ng/ip_traffic-1.log + +############################################################################# +# Rules +############################################################################# +# Process rules: +# This rules will process all the packages that match with anyone of them +# +# Discard rules: +# This rules will discard all the packages that match with anyone of them +# +# Side of search: +# IPs and Ports could be searched in source or destination. Prefix 'src_' is +# to search on source and prefix 'dst_' is to search on destination. +# +# Ip match: +# The IP after 'dst_ip' or 'src_ip' will be searched. If the Ip is followed +# by '/' and a net mask, all of the IPs of this net will searched +# +# Port match: +# The Port after 'dst_port' or 'src_port' will be searched. +# If appear various ports separated by ',' (i.e.: 8080,80,21,22), all the +# list ports will be searched. +# If appear two ports separated by '-' (i.e.: 21-80), all the ports of this +# range will be searched. +# +# Negation: +# Is possible to negate a condition with the symbol '!' before the following +# strings: 'src_ip' and 'dst_ip' to negate the ip condition or 'src_port' +# and 'dst_port' to negate the port condition. +# +# Rules examples: +# +# discard src_ip 192.168.80.0/24 !src_port 8080 +# process !dst_ip 192.168.40.23 src_port 8080 +# process !dst_ip 192.168.50.1/32 !dst_port 21 +# +############################################################################# + +# Process rules + +process src_ip 192.168.70.0/24 !src_port 0 protocol TCP,UDP + diff --git a/pandora_plugins/IPTraf/passive.pl b/pandora_plugins/IPTraf/passive.pl new file mode 100644 index 0000000000..8d17ec2db3 --- /dev/null +++ b/pandora_plugins/IPTraf/passive.pl @@ -0,0 +1,487 @@ +#!/usr/bin/perl + +############################################################################### +# Passive collector +############################################################################### + +use NetAddr::IP; + +# Define variables + +my %months = ('Jan' => 1, 'Feb' => 2, 'Mar' => 3, 'Apr' => 4, 'May' => 5, 'Jun' => 6, + 'Jul' => 7, 'Aug' => 8, 'Sep' => 9, 'Oct' => 10, 'Nov' => 11, 'Dec' => 12); + +########## +## INFO ## +########## + +# WHEN SPLIT A LOGFILE LINE, THIS IS THE RESULT + # Hour: $packages[3] + # Date: $packages[2]-$packages[1]-$packages[4] + # Protocol: $packages[5] + # Interface: $packages[6] + # Bytes: $packages[7] + # From: $packages[10] (Format -> IP:Port) + # To: $packages[12] (Format -> IP:Port) + # Info: All after $packages[12] ('To') + +# Main code + +check_root(); + +# Load config file from command line or show help +help_screen () if ($#ARGV < 0 || $ARGV[0] =~ m/--*h/i); + +my $conf_file = $ARGV[0]; + +if(!-e $conf_file) { + print "[ERROR] Configuration file $conf_file not exists.\n\n"; + exit; +} + +help_screen () if ($ARGV[1] =~ m/--*h/i); + +my $config = load_config($conf_file); + + +passive_collector_main($config); + +############################################################################## +# Print a help screen and exit. +############################################################################## +sub help_screen{ + print "Usage: $0 []\n\n"; + print "Available options:\n"; + print "\t-h: Display help\n\n"; + exit; +} + +########################################################################## +# Write a data XML on pandora incoming dir +########################################################################## +sub writexml($$$) { + my ($ip, $xmlmessage, $config) = @_; + + my $hostname = "IP_".$ip; + my $interval = $config->{'interval'}; + my $file = $config->{'incomingdir'}.$hostname.".".time().".data"; + + open (FILEXML, ">> $file") or die "[FATAL] Cannot write to XML '$file'"; + + print FILEXML "\n"; + print FILEXML $xmlmessage; + print FILEXML ""; + + close (FILEXML); +} + +########################################################################## +# Add module info to XML passed +########################################################################## +sub add_module_to_xml($$$$) { + my ($config, $module_name, $description, $data) = @_; + my $xml = "\n"; + $xml .= "$module_name\n"; + $xml .= "async_data\n"; + $xml .= "$description\n"; + $xml .= "".$config->{'interval'}."\n"; + $xml .= "$data\n"; + $xml .= "\n"; + return $xml; +} + +################################################################################ +# Load config file parameters +################################################################################ +sub load_config ($) { + my $config_file = shift; + my $interface; + my @process_rules; + my @discard_rules; + my %config; + + open (FILE, $config_file); + while () { + my ($line) = split("\t"); + if($line =~ /^iface/) { + $config{'interface'} = (split(' ', $line))[1]; + } + elsif($line =~ /^log_path/) { + $config{'log_path'} = (split(' ', $line))[1]; + } + elsif($line =~ /^process/) { + push(@process_rules, $line); + } + elsif($line =~ /^discard/) { + push(@discard_rules, $line); + } + elsif($line =~ /^interval/) { + $config{'interval'} = (split(' ', $line))[1]; + } + elsif($line =~ /^incomingdir/) { + $config{'incomingdir'} = (split(' ', $line))[1]; + } + elsif($line =~ /^min_size/) { + $config{'min_size'} = (split(' ', $line))[1]; + } + } + + $config{'process_rules'} = \@process_rules; + $config{'discard_rules'} = \@discard_rules; + + return \%config; +} + +################################################################################ +# Check if the script is running with root privileges +################################################################################ +sub check_root () { + if ($> != 0) { + print "\nThis program can be run only by the system administrator\n\n"; + exit + } +} + +################################################################################ +# Check the rules with specific source and destination IPs and PORTs. +################################################################################ +sub check_rules ($$$$) { + my ($from_addr, $to_addr, $protocol, $rules_info) = @_; + + my @from = split(':',$from_addr); + my @to = split(':',$to_addr); + my @rules_info = @{$rules_info}; + + my %success_info; + + $success_info{'success'} = 0; + for(my $i = 0; $i <= $#rules_info; $i++) { + if(@rules_info[$i]->{'ip_side'} eq 'src') { + $success_info{'match_ip'} = $from[0]; + $success_info{'other_ip'} = $to[0]; + } + else { + $success_info{'match_ip'} = $to[0]; + $success_info{'other_ip'} = $from[0]; + } + + if(@rules_info[$i]->{'port_side'} eq 'src') { + $success_info{'match_port'} = $from[1]; + } + else { + $success_info{'match_port'} = $to[1]; + } + + # If the port is not specified we set wilcard as port + if($success_info{'match_port'} eq '') { + $success_info{'match_port'} = "*"; + } + + $success_info{'protocol'} = $protocol; + + my $ip_found = 0; + # Check if the address match with the rule + if($success_info{'match_ip'} =~ @rules_info[$i]->{'addrs_re'}) { + $ip_found = 1; + } + + my $port_found = 0; + # Check if the port exists in the hash table + if(defined($rules_info[$i]->{'ports'}->{$uccess_info{'match_port'}})) { + $port_found = 1; + } + + my $protocol_found = 0; + # Check if the protocol exists in the hash table or is all + if(defined($rules_info[$i]->{'protocols'}->{$success_info{'protocol'}}) || defined($rules_info[$i]->{'protocols'}->{'all'})) { + $protocol_found = 1; + } + + # If found and negative or not found and possitive are the bad combinations + # The results cant be 1 + $ip_success = $rules_info[$i]->{'ip_sign'} + $ip_found; + $port_success = $rules_info[$i]->{'port_sign'} + $port_found; + $protocol_success = $rules_info[$i]->{'protocol_sign'} + $protocol_found; + + if($ip_success == 1 || $port_success == 1 || $protocol_success == 1) { + next; + } + else { + if($rules_info[$i]->{'rule_type'} eq 'process') { + $success_info{'success'} = 1; + } + else { + $success_info{'success'} = 0; + } + last; + } + } + + return \%success_info; +} + +################################################################################ +# Parse rules and return a data structure with the rules parameters. +################################################################################ +sub parse_rules ($) { + my $rules = shift; + my @rules = @{$rules}; + + my @rules_info; + for(my $i = 0; $i <= $#rules; $i++) { + @rules_info[$i] = $rules[$i]; + + my @rule_parts = split(" ", $rules[$i]); + + my $net_addr = new NetAddr::IP ($rule_parts[2]); + + @rules_info[$i]->{'addrs_re'} = $net_addr->re(); + + my %ports; + + my @ports_enumeration = split(",", $rule_parts[4]); + + for(my $i = 0; $i<=$#ports_enumeration; $i++) { + my @ports_interval = split("-", $ports_enumeration[$i]); + # If the format is [port1]-[port2] we store the interval + if($#ports_interval == 1) { + for(my $j = $ports_interval[0]; $j<=$ports_interval[1]; $j++) { + $ports{$j} = 1; + } + } + else { + # If the format is not interval, is single port + $ports{$ports_enumeration[$i]} = 1; + } + } + + @rules_info[$i]->{'ports'} = \%ports; + + my %protocols; + + my @protocols_enumeration = split(",", $rule_parts[6]); + + for(my $i = 0; $i<=$#protocols_enumeration; $i++) { + $protocols{$protocols_enumeration[$i]} = 1; + } + + @rules_info[$i]->{'protocols'} = \%protocols; + + # SIGN OF THE IP RULE # + #0 if the ip rule is negate, 1 if not + if($rule_parts[1] =~ /^!.*/) { + @rules_info[$i]->{'ip_sign'} = 0; + } + else { + @rules_info[$i]->{'ip_sign'} = 1; + } + + # SIGN OF THE SIDE OF THE IP RULE # + #src for source; dst for destination + if($rule_parts[1] =~ /(!)*src.*/) { + $ip_side = 'src'; + @rules_info[$i]->{'ip_side'} = 'src'; + } + else { + $ip_side = 'dst'; + @rules_info[$i]->{'ip_side'} = 'dst'; + } + + # SIGN OF THE PORT RULE # + #0 if the port rule is negate, 1 if not + if($rule_parts[3] =~ /^!.*/) { + @rules_info[$i]->{'port_sign'} = 0; + } + else { + @rules_info[$i]->{'port_sign'} = 1; + } + + # SIGN OF THE SIDE OF THE PORT RULE # + #src for source; dst for destination + if($rule_parts[3] =~ /(!)*src.*/) { + @rules_info[$i]->{'port_side'} = 'src'; + } + else { + @rules_info[$i]->{'port_side'} = 'dst'; + } + + # SIGN OF THE PROTOCOL RULE # + #0 if the protocol rule is negate, 1 if not + if($rule_parts[5] =~ /^!.*/) { + @rules_info[$i]->{'protocol_sign'} = 0; + } + else { + @rules_info[$i]->{'protocol_sign'} = 1; + } + + # TYPE OF THE RULE # + #'process' for store the matches and 'discard' for avoid it + @rules_info[$i]->{'rule_type'} = $rule_parts[0]; + } + + return \@rules_info; +} + +########################################################################## +## Main function +########################################################################## + +sub passive_collector_main ($) { + my ($config) = @_; + + my $log_path = $config->{'log_path'}; + + my %tree; + my $start_date; + my $start_hour; + + my @rules = (@{$config->{'discard_rules'}}, @{$config->{'process_rules'}}); + + ################### + # PARSE THE RULES # + ################### + + my @rules_info = @{parse_rules(\@rules)}; + + ################## + # PARSE THE FILE # + ################## + + open (FILE, $log_path); + my $descarted1 = 0; + my $descarted2 = 0; + my $descarted3 = 0; + my $processed = 0; + my $superprocessed = 0; + + while () { + my ($line) = split("\t"); + + # Keep the original line to future changes + $orig_line = $line; + + # Remove ; from the line + $line =~ s/;//g; + + # Split the line into array + my @packages = split(" ", $line); + + # Get the numeric month + $packages[1] = $months{$packages[1]}; + + ####################### + # CHECK SPECIAL CASES # + ####################### + + # The first line of the execution is a header with the start date and hour + if($packages[5] eq '********') { + $start_date = "$packages[2]-$packages[1]-$packages[4]"; + $start_hour = $packages[3]; + next; + } + + # Special case with the 'Connection' script in the interface place + # has a different structure. Discard this case. + + my $from_addr; + my $to_addr; + my $info; + + # Get the substring from the clean line after the destination to keep the extra info + if ( $orig_line =~ /$packages[12];\s(.*?)\n/ ) + { + $info = $1; + } + + # Discard the ACKs and other Synchronization packages + if ($info =~ /FIN/ || $info =~ /SYN/ || $info =~ /reset/) { + next; + } + + # Discard the connections tries + if($packages[6] eq 'Connection') { + next; + } + + # Check the min size to discard little packages + if($config->{'min_size'} > $packages[7]) { + next; + } + + # Store the Addresses + $from_addr = $packages[10]; + $to_addr = $packages[12]; + $protocol = $packages[5]; + + ################### + # CHECK THE RULES # + ################### + + my %success_info = %{check_rules($from_addr, $to_addr, $protocol, \@rules_info)}; + + if($success_info{'success'} == 0) { + next; + } + + ###################### + # STORE THE PACKAGES # + ###################### + $tree{$success_info{'match_ip'}}[0]->{$success_info{'match_port'}}->{'total'} += $packages[7]; + $tree{$success_info{'match_ip'}}[0]->{$success_info{'match_port'}}->{$success_info{'protocol'}} += $packages[7]; + $tree{$success_info{'match_ip'}}[1]->{$success_info{'other_ip'}}->{'total'} += $packages[7]; + $tree{$success_info{'match_ip'}}[1]->{$success_info{'other_ip'}}->{$success_info{'match_port'}} += $packages[7]; + $tree{$success_info{'match_ip'}}[2]->{$success_info{'protocol'}}->{'total'} += $packages[7]; + + # Registers counter + $tree{$success_info{'match_ip'}}[3] ++; + # Total Bytes + $tree{$success_info{'match_ip'}}[4] += $packages[7]; + } + close(FILE); + + ########################################## + # BUILD XML AND WRITE IT # + ########################################## + my $total_bytes = 0; + my $total_regs = 0; + my $total_ips = 0; + + foreach $k (keys (%tree)) + { + my $xmlmessage = ''; + + foreach $i (keys (%{$tree{$k}[0]})) + { + $xmlmessage .= add_module_to_xml ($config, "Port_".$i, "Total bytes of port ".$i, $tree{$k}[0]->{$i}->{'total'}); + foreach $j (keys (%{$tree{$k}[0]->{$i}})) + { + if($j eq 'total') { + next; + } + $xmlmessage .= add_module_to_xml ($config, "Port_".$i."_Protocol_".$j, "Total bytes of port ".$i." for protocol ".$j, $tree{$k}[0]->{$i}->{$j}); + } + } + foreach $i (keys (%{$tree{$k}[1]})) + { + $xmlmessage .= add_module_to_xml ($config, "IP_".$i, "Total bytes of IP ".$i, $tree{$k}[1]->{$i}->{'total'}); + foreach $j (keys (%{$tree{$k}[1]->{$i}})) + { + if($j eq 'total') { + next; + } + $xmlmessage .= add_module_to_xml ($config, "IP_".$i."_Port_".$j, "Total bytes of IP ".$i." for port ".$j, $tree{$k}[1]->{$i}->{$j}); + } + } + foreach $i (keys (%{$tree{$k}[2]})) + { + $xmlmessage .= add_module_to_xml ($config, "Protocol_".$i, "Total bytes of Protocol ".$i, $tree{$k}[2]->{$i}->{'total'}); + } + + # Store statistics in the future + $total_regs += $tree{$k}[3]; + $total_bytes += $tree{$k}[4]; + $total_ips ++; + + writexml($k, $xmlmessage, $config); + } +} diff --git a/pandora_plugins/Linux/pandora_du.pl b/pandora_plugins/Linux/pandora_du.pl new file mode 100644 index 0000000000..3a3b2c6aa7 --- /dev/null +++ b/pandora_plugins/Linux/pandora_du.pl @@ -0,0 +1,183 @@ +#!/usr/bin/perl + + + +use strict; +use warnings; + +use Scalar::Util qw(looks_like_number); + +### defines +my $DEFAULT_GROUP = ""; +my $MODULE_GROUP = ""; +my $MODULE_TAGS = ""; +my $GLOBAL_LOG_FILE = ""; + +my %config; + + +### Custom configuration +$config{MODULE_INTERVAL} = 1; +$config{MODULE_TAG_LIST} = ""; + + +######################################################################################## +# Erase blank spaces before and after the string +######################################################################################## +sub trim($){ + my $string = shift; + if (empty ($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp ($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + +######################################################################################## +# Empty +######################################################################################## +sub empty($){ + my $str = shift; + + if (! (defined ($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + +######################################################################################## +# print_module +######################################################################################## +sub print_module ($;$){ + my $data = shift; + my $not_print_flag = shift; + + if ((ref($data) ne "HASH") || (!defined $data->{name})) { + return undef; + } + + my $xml_module = ""; + # If not a string type, remove all blank spaces! + if ($data->{type} !~ m/string/){ + $data->{value} = trim($data->{value}); + } + + $data->{tags} = $data->{tags}?$data->{tags}:($config{MODULE_TAG_LIST}?$config{MODULE_TAG_LIST}:undef); + $data->{interval} = $data->{interval}?$data->{interval}:($config{MODULE_INTERVAL}?$config{MODULE_INTERVAL}:undef); + $data->{module_group} = $data->{module_group}?$data->{module_group}:($config{MODULE_GROUP}?$config{MODULE_GROUP}:$MODULE_GROUP); + + $xml_module .= "\n"; + $xml_module .= "\t{name} . "]]>\n"; + $xml_module .= "\t" . $data->{type} . "\n"; + $xml_module .= "\t{value} . "]]>\n"; + + if ( !(empty($data->{desc}))) { + $xml_module .= "\t{desc} . "]]>\n"; + } + if ( !(empty ($data->{unit})) ) { + $xml_module .= "\t{unit} . "]]>\n"; + } + if (! (empty($data->{interval})) ) { + $xml_module .= "\t{interval} . "]]>\n"; + } + if (! (empty($data->{tags})) ) { + $xml_module .= "\t" . $data->{tags} . "\n"; + } + if (! (empty($data->{module_group})) ) { + $xml_module .= "\t" . $data->{module_group} . "\n"; + } + if (! (empty($data->{module_parent})) ) { + $xml_module .= "\t" . $data->{module_parent} . "\n"; + } + if (! (empty($data->{wmin})) ) { + $xml_module .= "\t{wmin} . "]]>\n"; + } + if (! (empty($data->{wmax})) ) { + $xml_module .= "\t{wmax} . "]]>\n"; + } + if (! (empty ($data->{cmin})) ) { + $xml_module .= "\t{cmin} . "]]>\n"; + } + if (! (empty ($data->{cmax})) ){ + $xml_module .= "\t{cmax} . "]]>\n"; + } + if (! (empty ($data->{wstr}))) { + $xml_module .= "\t{wstr} . "]]>\n"; + } + if (! (empty ($data->{cstr}))) { + $xml_module .= "\t{cstr} . "]]>\n"; + } + if (! (empty ($data->{cinv}))) { + $xml_module .= "\t{cinv} . "]]>\n"; + } + if (! (empty ($data->{winv}))) { + $xml_module .= "\t{winv} . "]]>\n"; + } + if (! (empty ($data->{alerts}))) { + foreach my $alert (@{$data->{alerts}}){ + $xml_module .= "\t\n"; + } + } + + if (defined ($config{global_alerts})){ + foreach my $alert (@{$config{global_alerts}}){ + $xml_module .= "\t\n"; + } + } + + $xml_module .= "\n"; + + if (empty ($not_print_flag)) { + print $xml_module; + } + + return $xml_module; +} + +######################################################################################## +# Get unit +######################################################################################## +sub get_unit($){ + my $str = shift; + $str =~ s/[\d\.\,]//g; + return $str; +} + + +######################################################################################## +######################################################################################## +# MAIN +######################################################################################## +######################################################################################## + + +my @r = split /\n/, `du -s $ARGV[0] 2>/dev/null`; + +foreach (@r) { + my ($data, $name) = split /\s+/, $_, 2; + my $value = $data; + $value =~ s/[^\d\.\,]//g; + my $unit = get_unit($data); + print_module({ + name => "Size of: " . trim($name), + type => "generic_data", + value => $value, + unit => $unit + + }); +} + diff --git a/pandora_plugins/Linux/pandora_files_in_dir.pl b/pandora_plugins/Linux/pandora_files_in_dir.pl new file mode 100644 index 0000000000..1749599287 --- /dev/null +++ b/pandora_plugins/Linux/pandora_files_in_dir.pl @@ -0,0 +1,186 @@ +#!/usr/bin/perl + + + +use strict; +use warnings; + +use Scalar::Util qw(looks_like_number); + +### defines +my $DEFAULT_GROUP = ""; +my $MODULE_GROUP = ""; +my $MODULE_TAGS = ""; +my $GLOBAL_LOG_FILE = ""; + +my %config; + + +### Custom configuration +$config{MODULE_INTERVAL} = 1; +$config{MODULE_TAG_LIST} = ""; + + +######################################################################################## +# Erase blank spaces before and after the string +######################################################################################## +sub trim($){ + my $string = shift; + if (empty ($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp ($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + +######################################################################################## +# Empty +######################################################################################## +sub empty($){ + my $str = shift; + + if (! (defined ($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + +######################################################################################## +# print_module +######################################################################################## +sub print_module ($;$){ + my $data = shift; + my $not_print_flag = shift; + + if ((ref($data) ne "HASH") || (!defined $data->{name})) { + return undef; + } + + my $xml_module = ""; + # If not a string type, remove all blank spaces! + if ($data->{type} !~ m/string/){ + $data->{value} = trim($data->{value}); + } + + $data->{tags} = $data->{tags}?$data->{tags}:($config{MODULE_TAG_LIST}?$config{MODULE_TAG_LIST}:undef); + $data->{interval} = $data->{interval}?$data->{interval}:($config{MODULE_INTERVAL}?$config{MODULE_INTERVAL}:undef); + $data->{module_group} = $data->{module_group}?$data->{module_group}:($config{MODULE_GROUP}?$config{MODULE_GROUP}:$MODULE_GROUP); + + $xml_module .= "\n"; + $xml_module .= "\t{name} . "]]>\n"; + $xml_module .= "\t" . $data->{type} . "\n"; + $xml_module .= "\t{value} . "]]>\n"; + + if ( !(empty($data->{desc}))) { + $xml_module .= "\t{desc} . "]]>\n"; + } + if ( !(empty ($data->{unit})) ) { + $xml_module .= "\t{unit} . "]]>\n"; + } + if (! (empty($data->{interval})) ) { + $xml_module .= "\t{interval} . "]]>\n"; + } + if (! (empty($data->{tags})) ) { + $xml_module .= "\t" . $data->{tags} . "\n"; + } + if (! (empty($data->{module_group})) ) { + $xml_module .= "\t" . $data->{module_group} . "\n"; + } + if (! (empty($data->{module_parent})) ) { + $xml_module .= "\t" . $data->{module_parent} . "\n"; + } + if (! (empty($data->{wmin})) ) { + $xml_module .= "\t{wmin} . "]]>\n"; + } + if (! (empty($data->{wmax})) ) { + $xml_module .= "\t{wmax} . "]]>\n"; + } + if (! (empty ($data->{cmin})) ) { + $xml_module .= "\t{cmin} . "]]>\n"; + } + if (! (empty ($data->{cmax})) ){ + $xml_module .= "\t{cmax} . "]]>\n"; + } + if (! (empty ($data->{wstr}))) { + $xml_module .= "\t{wstr} . "]]>\n"; + } + if (! (empty ($data->{cstr}))) { + $xml_module .= "\t{cstr} . "]]>\n"; + } + if (! (empty ($data->{cinv}))) { + $xml_module .= "\t{cinv} . "]]>\n"; + } + if (! (empty ($data->{winv}))) { + $xml_module .= "\t{winv} . "]]>\n"; + } + if (! (empty ($data->{alerts}))) { + foreach my $alert (@{$data->{alerts}}){ + $xml_module .= "\t\n"; + } + } + + if (defined ($config{global_alerts})){ + foreach my $alert (@{$config{global_alerts}}){ + $xml_module .= "\t\n"; + } + } + + $xml_module .= "\n"; + + if (empty ($not_print_flag)) { + print $xml_module; + } + + return $xml_module; +} + +######################################################################################## +# Get unit +######################################################################################## +sub get_unit($){ + my $str = shift; + $str =~ s/[\d\.\,]//g; + return $str; +} + + +######################################################################################## +######################################################################################## +# MAIN +######################################################################################## +######################################################################################## + +my $target = "."; +if (defined ($ARGV[0])) { + $target = $ARGV[0]; +} +my @r = split /\n/, `for x in \`ls $target\`; do if [ -d $target/\$x ]; then echo -n \$x\";\";ls $target/\$x 2>/dev/null | wc -l | awk '{print \$NF}'; fi; done`; + +foreach (@r) { + my ($name, $data) = split /;/, $_, 2; + my $value = $data; + $value =~ s/[^\d\.\,]//g; + my $unit = get_unit($data); + print_module({ + name => "Files in: " . trim($name), + type => "generic_data", + value => $value, + unit => $unit + + }); +} + diff --git a/pandora_plugins/MongoDB/Pandora_Plugin_MongoDB.pl b/pandora_plugins/MongoDB/Pandora_Plugin_MongoDB.pl new file mode 100755 index 0000000000..95e584d0f0 --- /dev/null +++ b/pandora_plugins/MongoDB/Pandora_Plugin_MongoDB.pl @@ -0,0 +1,860 @@ +#!/usr/bin/perl +# Pandora FMS Agent Plugin for MongoDB +# (c) Artica Soluciones Tecnologicas 2012 +# v1.0, 18 Apr 2012 +# ------------------------------------------------------------------------ + +use strict; +use warnings; +use Data::Dumper; + +use IO::Socket::INET; + +# OS and OS version +my $OS = $^O; + +# Store original PATH +my $ORIGINAL_PATH = $ENV{'PATH'}; + +# Load on Win32 only +if ($OS eq "MSWin32"){ + + # Check dependencies + eval 'local $SIG{__DIE__}; use Win32::OLE("in");'; + if ($@) { + print "Error loading Win32::Ole library. Cannot continue\n"; + exit; + } + + use constant wbemFlagReturnImmediately => 0x10; + use constant wbemFlagForwardOnly => 0x20; +} + +my %plugin_setup; # This stores plugin parameters +my %mongo_resultset; # This stores mongo results +my $archivo_cfg = $ARGV[0]; + +my $volume_items = 0; +my $log_items = 0; +my $process_items = 0; +my $mongo_items = 0; +my $stats_items = 0; +my $OS_NAME = `uname -s`; +my $hostname = `hostname | tr -d "\n"`; + + +# FLUSH in each IO +$| = 1; + +# ---------------------------------------------------------------------------- +# This cleans DOS-like line and cleans ^M character. VERY Important when you process .conf edited from DOS +# ---------------------------------------------------------------------------- + +sub parse_dosline ($){ + my $str = $_[0]; + + $str =~ s/\r//g; + return $str; +} + +# ---------------------------------------------------------------------------- +# Strips blank likes +# ---------------------------------------------------------------------------- + +sub trim ($){ + my $string = shift; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} + + +# ---------------------------------------------------------------------------- +# clean_blank +# +# This function return a string without blankspaces, given a simple text string +# ---------------------------------------------------------------------------- + +sub clean_blank($){ + my $input = $_[0]; + $input =~ s/[\s\r\n]*//g; + return $input; +} + +# ---------------------------------------------------------------------------- +# print_module +# +# This function return a pandora FMS valid module fiven name, type, value, description +# ---------------------------------------------------------------------------- + +sub print_module ($$$$){ + my $MODULE_NAME = $_[0]; + my $MODULE_TYPE = $_[1]; + my $MODULE_VALUE = $_[2]; + my $MODULE_DESC = $_[3]; + + # If not a string type, remove all blank spaces! + if ($MODULE_TYPE !~ m/string/){ + $MODULE_VALUE = clean_blank($MODULE_VALUE); + } + + print "\n"; + print "\n"; + print "$MODULE_TYPE\n"; + print "\n"; + print "\n"; + print "\n"; + +} + +# ---------------------------------------------------------------------------- +# load_mongostat_result +# +# Load temporal mongostat result file containing mongostat stats +# ---------------------------------------------------------------------------- + +my $resultfile="/tmp/mongo_results.log"; +my $resultfilestats="/tmp/mongo_resultstats.log"; + +sub load_mongo_result ($); + +sub load_mongo_result ($){ + + my $mongo_result = $_[0]; + my $buffer_line; + my @results; + my $parametro =""; + + if (! open (CFG, "< $mongo_result")) { + print "[ERROR] Error accessing mongo results $mongo_result: $!.\n"; + exit 1; + } + + while (){ + $buffer_line = parse_dosline ($_); + # Parse configuration file, this is specially difficult because can contain SQL code, with many things + if ($buffer_line !~ /^\#/){ # begins with anything except # (for commenting) + if ($buffer_line =~ m/(.+)\s(.*)/){ + push @results, $buffer_line; + } + } + } + + close (CFG); + + if ($mongo_result eq $resultfilestats) { + + foreach (@results){ + $parametro = $_; + + $mongo_resultset{"checker"}->[$stats_items] = `echo "$parametro" | awk '{print \$15}' | tr -d "\n"`; + + my $checker = $mongo_resultset{"checker"}->[$stats_items]; + + if (!$checker) { + + $mongo_resultset{"dbinserts"}->[$stats_items] = `echo "$parametro" | awk '{print \$1}' | tr -d "\n"`; + $mongo_resultset{"dbqueries"}->[$stats_items] = `echo "$parametro" | awk '{print \$2}' | tr -d "\n"`; + $mongo_resultset{"dbupdates"}->[$stats_items] = `echo "$parametro" | awk '{print \$3}' | tr -d "\n"`; + $mongo_resultset{"dbdeletes"}->[$stats_items] = `echo "$parametro" | awk '{print \$4}' | tr -d "\n"`; + $mongo_resultset{"dbgetmores"}->[$stats_items] = `echo "$parametro" | awk '{print \$5}' | tr -d "\n"`; + $mongo_resultset{"dbcommands"}->[$stats_items] = `echo "$parametro" | awk '{print \$6}' | tr -d "\n"`; + $mongo_resultset{"dbpagefaults"}->[$stats_items] = `echo "$parametro" | awk '{print \$9}' | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficinbits"}->[$stats_items] = `echo "$parametro" | awk '{print \$10}' | rev | cut -c2- | rev | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficinbitunit"}->[$stats_items] = `echo "$parametro" | awk '{print \$10}' | rev | cut -c1 | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficoutbits"}->[$stats_items] = `echo "$parametro" | awk '{print \$11}' | rev | cut -c2- | rev | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficoutbitunit"}->[$stats_items] = `echo "$parametro" | awk '{print \$11}' | rev | cut -c1 | tr -d "\n"`; + $mongo_resultset{"dbopenconnections"}->[$stats_items] = `echo "$parametro" | awk '{print \$12}' | tr -d "\n"`; + + } + + else { + + $mongo_resultset{"dbinserts"}->[$stats_items] = `echo "$parametro" | awk '{print \$1}' | tr -d "\n"`; + $mongo_resultset{"dbqueries"}->[$stats_items] = `echo "$parametro" | awk '{print \$2}' | tr -d "\n"`; + $mongo_resultset{"dbupdates"}->[$stats_items] = `echo "$parametro" | awk '{print \$3}' | tr -d "\n"`; + $mongo_resultset{"dbdeletes"}->[$stats_items] = `echo "$parametro" | awk '{print \$4}' | tr -d "\n"`; + $mongo_resultset{"dbgetmores"}->[$stats_items] = `echo "$parametro" | awk '{print \$5}' | tr -d "\n"`; + $mongo_resultset{"dbcommands"}->[$stats_items] = `echo "$parametro" | awk '{print \$6}' | tr -d "\n"`; + $mongo_resultset{"dbflushes"}->[$stats_items] = `echo "$parametro" | awk '{print \$7}' | tr -d "\n"`; + $mongo_resultset{"dbpagefaults"}->[$stats_items] = `echo "$parametro" | awk '{print \$12}' | tr -d "\n"`; + $mongo_resultset{"dblockpercent"}->[$stats_items] = `echo "$parametro" | awk '{print \$13}' | awk -F"\:" '{print \$2}' | tr -d "\%" | tr -d "\n"`; + $mongo_resultset{"dbbttreepagemissedpercent"}->[$stats_items] = `echo "$parametro" | awk '{print \$14}' | tr -d "\%" | tr -d "\n"`; + $mongo_resultset{"dbclientreadqueuelength"}->[$stats_items] = `echo "$parametro" | awk '{print \$15}' | awk -F"\|" '{print \$1}' | tr -d "\n"`; + $mongo_resultset{"dbclientwritequeuelength"}->[$stats_items] = `echo "$parametro" | awk '{print \$15}' | awk -F"\|" '{print \$2}' | tr -d "\n"`; + $mongo_resultset{"dbactivereadingclients"}->[$stats_items] = `echo "$parametro" | awk '{print \$16}' | awk -F"\|" '{print \$1}' | tr -d "\n"`; + $mongo_resultset{"dbactivewritingclients"}->[$stats_items] = `echo "$parametro" | awk '{print \$16}' | awk -F"\|" '{print \$1}' | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficinbits"}->[$stats_items] = `echo "$parametro" | awk '{print \$17}' | rev | cut -c2- | rev | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficinbitunit"}->[$stats_items] = `echo "$parametro" | awk '{print \$17}' | rev | cut -c1 | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficoutbits"}->[$stats_items] = `echo "$parametro" | awk '{print \$18}' | rev | cut -c2- | rev | tr -d "\n"`; + $mongo_resultset{"dbnetworktrafficoutbitunit"}->[$stats_items] = `echo "$parametro" | awk '{print \$18}' | rev | cut -c1 | tr -d "\n"`; + $mongo_resultset{"dbopenconnections"}->[$stats_items] = `echo "$parametro" | awk '{print \$19}' | tr -d "\n"`; + + } + + $stats_items++; + + } + + } + +} +# ---------------------------------------------------------------------------- +# load_external_setup +# +# Load external file containing configuration +# ---------------------------------------------------------------------------- +sub load_external_setup ($); # Declaration due a recursive call to itself on includes +sub load_external_setup ($){ + + my $archivo_cfg = $_[0]; + my $buffer_line; + my @config_file; + my $parametro = ""; + + # Collect items from config file and put in an array + if (! open (CFG, "< $archivo_cfg")) { + print "[ERROR] Error opening configuration file $archivo_cfg: $!.\n"; + exit 1; + } + + while (){ + $buffer_line = parse_dosline ($_); + # Parse configuration file, this is specially difficult because can contain SQL code, with many things + if ($buffer_line !~ /^\#/){ # begins with anything except # (for commenting) + if ($buffer_line =~ m/(.+)\s(.*)/){ + push @config_file, $buffer_line; + } + } + } + close (CFG); + + # Some plugin setup default options + + $plugin_setup{"mongostat"}="mongostat"; + $plugin_setup{"tmconfig"}="tmconfig"; + $plugin_setup{"logparser"}="grep_log"; +# $plugin_setup{"mongostat"} = ""; NOT USED ANYMORE + + foreach (@config_file){ + $parametro = $_; + + if ($parametro =~ m/^instance\s(.*)/i) { + $plugin_setup{"mongoinstance"}=$1; + } + + if ($parametro =~ m/export PATH=(.*)/i) { + $ENV{'PATH'} = $1; + } + + if ($parametro =~ m/export LD_LIBRARY_PATH=(.*)/i) { + $ENV{'LD_LIBRARY_PATH'} = $1; + } + + if ($parametro =~ m/export MONGOCONFIG=(.*)/i) { + $ENV{'MONGOCONFIG'} = $1; + } + + if ($parametro =~ m/export NLSPATH=(.*)/i) { + $ENV{'NLSPATH'} = $1; + } + + if ($parametro =~ m/export MONGODIR=(.*)/i) { + $ENV{'MONGODIR'} = $1; + } + + if ($parametro =~ m/export APPDIR=(.*)/i) { + $ENV{'APPDIR'} = $1; + } + + if ($parametro =~ m/export LANG=(.*)/i) { + $ENV{'LANG'} = $1; + } + + if ($parametro =~ m/^include\s(.*)/i) { + load_external_setup ($1); + } + + if ($parametro =~ m/^logparser\s(.*)/i) { + $plugin_setup{"logparser"}=$1; + + } + + # Log check + if ($parametro =~ m/^log\s(.*)/i) { + $plugin_setup{"log"}->[$log_items]=$1; + $log_items++; + } + + # Volume check + if ($parametro =~ m/^volume\s(.*)/i) { + $plugin_setup{"volume"}->[$volume_items]=$1; + $volume_items++; + } + + # Processcheck + if ($parametro =~ m/^process\s(.*)/i) { + $plugin_setup{"process"}->[$process_items]=$1; + $process_items++; + } + + # mongodb stats + if ($parametro =~ m/^mongodb_stats\s(.*)/i) { + $plugin_setup{"mongodb_stats"}->[$mongo_items]=$1; + $mongo_items++; + } + } +} + +# ---------------------------------------------------------------------------- +# mongostat +# +# This function uses mongostat from Mongo to get information +# Given Command (mongostat), check type and monitored object (optional) +# ---------------------------------------------------------------------------- + +sub mongostat ($$$$$){ + my $cmdname = $_[0]; + my $checktype = $_[1]; + my $objname = $_[2]; + my $host = $_[3]; + my $port = $_[4]; + + #Mongo instance + + my $mongoinstance = $plugin_setup{"mongoinstance"}; + + if (!defined $mongoinstance) { + + $mongoinstance = $hostname; + + } + + # Call to mongostat + + my $mongostat_call; + + if ($cmdname) { + + $mongostat_call = $cmdname; + + } + + else { + + $mongostat_call = $plugin_setup{"mongostat"}; + + } + + if ($checktype eq "check_dbstats") { + + $stats_items = 0; + my $tmadmpqc_cmd = `$mongostat_call -n1 --host $host --port $port --all | tail -1 > "$resultfilestats"`; + + load_mongo_result ($resultfilestats); + + if ($stats_items > 0) { + my $ax; + my $cx; + my $value = 0; + my $novalue = 0; + my $realchecker; + + my $dbinserts = 0; + my $dbqueries = 0; + my $dbupdates = 0; + my $dbdeletes = 0; + my $dbgetmores = 0; + my $dbcommands = 0; + my $dbflushes = 0; + my $dbpagefaults = 0; + my $dblockpercent = 0; + my $dbbttreepagemissedpercent = 0; + my $dbclientreadqueuelength = 0; + my $dbclientwritequeuelength = 0; + my $dbactivereadingclients = 0; + my $dbactivewritingclients = 0; + my $dbnetworktrafficinbits = 0; + my $dbnetworktrafficinbitunit; + my $dbnetworktrafficoutbits = 0; + my $dbnetworktrafficoutbitunit; + my $dbopenconnections = 0; + + for ($ax=0; $ax < $stats_items + 0; $ax++){ + + my $bx = $ax - 1; + + $realchecker = $mongo_resultset{"checker"}[$ax]; + + $dbinserts = $mongo_resultset{"dbinserts"}[$ax]; + $dbqueries = $mongo_resultset{"dbqueries"}[$ax]; + $dbupdates = $mongo_resultset{"dbupdates"}[$ax]; + $dbdeletes = $mongo_resultset{"dbdeletes"}[$ax]; + $dbgetmores = $mongo_resultset{"dbgetmores"}[$ax]; + $dbcommands = $mongo_resultset{"dbcommands"}[$ax]; + $dbflushes = $mongo_resultset{"dbflushes"}[$ax]; + $dbpagefaults = $mongo_resultset{"dbpagefaults"}[$ax]; + $dbbttreepagemissedpercent = $mongo_resultset{"dbbttreepagemissedpercent"}[$ax]; + $dbclientreadqueuelength = $mongo_resultset{"dbclientreadqueuelength"}[$ax]; + $dbclientwritequeuelength = $mongo_resultset{"dbclientwritequeuelength"}[$ax]; + $dbactivereadingclients = $mongo_resultset{"dbactivereadingclients"}[$ax]; + $dbactivewritingclients = $mongo_resultset{"dbactivewritingclients"}[$ax]; + $dbnetworktrafficinbits = $mongo_resultset{"dbnetworktrafficinbits"}[$ax]; + $dbnetworktrafficinbitunit = $mongo_resultset{"dbnetworktrafficinbitunit"}[$ax]; + $dbnetworktrafficoutbits = $mongo_resultset{"dbnetworktrafficoutbits"}[$ax]; + $dbnetworktrafficoutbitunit = $mongo_resultset{"dbnetworktrafficoutbitunit"}[$ax]; + $dbopenconnections = $mongo_resultset{"dbopenconnections"}[$ax]; + + if ($dbnetworktrafficinbitunit eq "k") { + + $dbnetworktrafficinbits = $dbnetworktrafficinbits * 1024; + + } + + elsif ($dbnetworktrafficinbitunit eq "m") { + + $dbnetworktrafficinbits = $dbnetworktrafficinbits * 1024 * 1024; + + } + + elsif ($dbnetworktrafficinbitunit eq "g") { + + $dbnetworktrafficinbits = $dbnetworktrafficinbits * 1024 * 1024 * 1024; + + } + + elsif ($dbnetworktrafficinbitunit eq "t") { + + $dbnetworktrafficinbits = $dbnetworktrafficinbits * 1024 * 1024 * 1024 * 1024; + + } + + if ($dbnetworktrafficoutbitunit eq "k") { + + $dbnetworktrafficoutbits = $dbnetworktrafficoutbits * 1024; + + } + + elsif ($dbnetworktrafficoutbitunit eq "m") { + + $dbnetworktrafficoutbits = $dbnetworktrafficoutbits * 1024 * 1024; + + } + + elsif ($dbnetworktrafficoutbitunit eq "g") { + + $dbnetworktrafficoutbits = $dbnetworktrafficoutbits * 1024 * 1024 * 1024; + + } + + elsif ($dbnetworktrafficoutbitunit eq "t") { + + $dbnetworktrafficoutbits = $dbnetworktrafficoutbits * 1024 * 1024 * 1024 * 1024; + + } + + } + + if ($objname eq "") { + + print_module("MongoDB_Inserts_" . "$host" . ":" . "$port", "generic_data", $dbinserts, "DB Inserts per second for $host" . ":" . "$port"); + + print_module("MongoDB_Queries_" . "$host" . ":" . "$port", "generic_data", $dbqueries, "DB Queries per second for $host" . ":" . "$port"); + + print_module("MongoDB_Updates_" . "$host" . ":" . "$port", "generic_data", $dbupdates, "DB Updates per second for $host" . ":" . "$port"); + + print_module("MongoDB_Deletes_" . "$host" . ":" . "$port", "generic_data", $dbdeletes, "DB Deletes per second for $host" . ":" . "$port"); + + print_module("MongoDB_Getmores_" . "$host" . ":" . "$port", "generic_data", $dbgetmores, "DB Getmore operations per second for $host" . ":" . "$port"); + + print_module("MongoDB_Commands_" . "$host" . ":" . "$port", "generic_data", $dbcommands, "DB Command operations per second for $host" . ":" . "$port"); + + print_module("MongoDB_Flushes_" . "$host" . ":" . "$port", "generic_data", $dbflushes, "DB Fsync Flushes per second for $host" . ":" . "$port"); + + print_module("MongoDB_PageFaults_" . "$host" . ":" . "$port", "generic_data", $dbpagefaults, "DB Page faults per second for $host" . ":" . "$port"); + + print_module("MongoDB_IdxMiss_" . "$host" . ":" . "$port", "generic_data", $dbbttreepagemissedpercent, "DB bttree page missed percentage for $host" . ":" . "$port"); + + print_module("MongoDB_ClientReadQueueLength_" . "$host" . ":" . "$port", "generic_data", $dbclientreadqueuelength, "DB Client read queue length for $host" . ":" . "$port"); + + print_module("MongoDB_ClientWriteQueueLength_" . "$host" . ":" . "$port", "generic_data", $dbclientwritequeuelength, "DB Client write queue length for $host" . ":" . "$port"); + + print_module("MongoDB_ActiveClientsReading_" . "$host" . ":" . "$port", "generic_data", $dbactivereadingclients, "DB Active clients reading for $host" . ":" . "$port"); + + print_module("MongoDB_ActiveClientsWriting_" . "$host" . ":" . "$port", "generic_data", $dbactivewritingclients, "DB Active clients writing for $host" . ":" . "$port"); + + print_module("MongoDB_NetworkTrafficInBits_" . "$host" . ":" . "$port", "generic_data", $dbnetworktrafficinbits, "DB Network traffic in bits for $host" . ":" . "$port"); + + print_module("MongoDB_NetworkTrafficOutBits_" . "$host" . ":" . "$port", "generic_data", $dbnetworktrafficoutbits, "DB Network traffic out bits for $host" . ":" . "$port"); + + print_module("MongoDB_OpenConns_" . "$host" . ":" . "$port", "generic_data", $dbopenconnections, "DB Open connections for $host" . ":" . "$port"); + + } + + elsif ($objname eq "shardctrl") { + + print_module("MongoDB_Inserts_" . "$host" . ":" . "$port", "generic_data", $dbinserts, "DB Inserts per second for $host" . ":" . "$port"); + + print_module("MongoDB_Queries_" . "$host" . ":" . "$port", "generic_data", $dbqueries, "DB Queries per second for $host" . ":" . "$port"); + + print_module("MongoDB_Updates_" . "$host" . ":" . "$port", "generic_data", $dbupdates, "DB Updates per second for $host" . ":" . "$port"); + + print_module("MongoDB_Deletes_" . "$host" . ":" . "$port", "generic_data", $dbdeletes, "DB Deletes per second for $host" . ":" . "$port"); + + print_module("MongoDB_Getmores_" . "$host" . ":" . "$port", "generic_data", $dbgetmores, "DB Getmore operations per second for $host" . ":" . "$port"); + + print_module("MongoDB_Commands_" . "$host" . ":" . "$port", "generic_data", $dbcommands, "DB Command operations per second for $host" . ":" . "$port"); + + print_module("MongoDB_PageFaults_" . "$host" . ":" . "$port", "generic_data", $dbpagefaults, "DB Page faults per second for $host" . ":" . "$port"); + + print_module("MongoDB_NetworkTrafficInBits_" . "$host" . ":" . "$port", "generic_data", $dbnetworktrafficinbits, "DB Network traffic in bits for $host" . ":" . "$port"); + + print_module("MongoDB_NetworkTrafficOutBits_" . "$host" . ":" . "$port", "generic_data", $dbnetworktrafficoutbits, "DB Network traffic out bits for $host" . ":" . "$port"); + + print_module("MongoDB_OpenConns_" . "$host" . ":" . "$port", "generic_data", $dbopenconnections, "DB Open connections for $host" . ":" . "$port"); + + } + + } + + } + +} + +# ---------------------------------------------------------------------------- +# alert_log +# +# Do a call to alertlog plugin and output the result +# Receives logfile, and module name +# ---------------------------------------------------------------------------- + +sub alert_log($$$){ + my $alertlog = $_[0]; + my $module_name = $_[1]; + my $log_expression = $_[2]; + + my $plugin_call = ""; + # Call to logparser + + if ($OS eq "MSWin32") { + $plugin_call = $plugin_setup{"logparser"}. " $alertlog $module_name $log_expression"; + } else { + $plugin_call = $plugin_setup{"logparser"}. " $alertlog $module_name $log_expression 2> /dev/null"; + } + + my $output = `$plugin_call`; + + if ($output ne ""){ + print $output; + } else { + print_module($module_name, "async_string", "", "Alertlog for $alertlog ($log_expression)"); + } + +} + +# ---------------------------------------------------------------------------- +# spare_system_disk_win +# +# This function return % free disk on Windows, using WMI call +# ---------------------------------------------------------------------------- + +sub spare_system_disk_win ($$){ + + my $name = $_[0]; + my $volume = $_[1]; + + + my $computer = "localhost"; + my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or return; + my $colItems = $objWMIService->ExecQuery("SELECT * from CIM_LogicalDisk WHERE Name = '$volume'", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); + + foreach my $objItem (in $colItems) { + my $data = ($objItem->{"FreeSpace"} / $objItem->{"Size"}) * 100; + print_module("Mongo_" . "$name" . "_Volume_" . "$volume", "generic_data", "$data", "Free disk on $volume (%)"); + return; + } +} + +# ---------------------------------------------------------------------------- +# spare_system_disk +# +# Check free space on volume +# Receives volume name and instance +# ---------------------------------------------------------------------------- + +sub spare_system_disk ($$) { + my $name = $_[0]; + my $vol = $_[1]; + + + if ($vol eq ""){ + return; + } + + # This is a posix call, should be the same on all systems ! + + if ( $OS_NAME eq "SunOS\n" ) { + my $output = `/usr/xpg4/bin/df -kP | grep "$vol\$" | awk '{ print \$5 }' | tr -d "%"`; + my $disk_space = $output - 0; + print_module("Mongo_" . "$name" . "_Volume_" . "$vol", "generic_data", $disk_space, "% of volume occupied on $vol (%)"); + } else { + my $output = `df -kP | grep "$vol\$" | awk '{ print \$5 }' | tr -d "%"`; + my $disk_space = $output - 0; + print_module("Mongo_" . "$name" . "_Volume_" . "$vol", "generic_data", $disk_space, "% of volume occupied on $vol (%)"); + } +} + +# ---------------------------------------------------------------------------- +# process_status_unix +# +# Generates a pandora module about the running status of a given process +# ---------------------------------------------------------------------------- + +sub process_status_unix ($$){ + my $proc = $_[0]; + my $proc_name = $_[1]; + + if ($proc eq ""){ + return; + } + + if ( $OS_NAME eq "SunOS\n" ) { + my $data = trim (`/usr/ucb/ps -aguxwwww | grep "$proc" | grep -v grep | wc -l | awk '{print \$1}`); + print_module("Mongo_" . "$proc_name" . "_Process_" . "$proc", "generic_proc", $data, "Status of process $proc"); + } else { + my $data = trim (`ps aux | grep "$proc" | grep -v grep | wc -l`); + print_module("Mongo_" . "$proc_name" . "_Process_" . "$proc", "generic_proc", $data, "Status of process $proc"); + } +} + + +# ---------------------------------------------------------------------------- +# process_status_win +# +# Generates a pandora module about the running status of a given process +# ---------------------------------------------------------------------------- + +sub process_status_win ($$){ + my $proc = $_[0]; + my $proc_name = $_[1]; + + if ($proc eq ""){ + return; + } + + my $computer = "localhost"; + my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or return; + my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Process WHERE Caption = '$proc'", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); + + foreach my $objItem (in $colItems) { + + if ($objItem->{"Caption"} eq $proc){ + print_module("Mongo_" . "$proc_name" . "_Process_" . "$proc", "generic_proc", 1, "Status of process $proc"); + return; + } else { + print_module("Mongo_" . "$proc_name" . "_Process_" . "$proc", "generic_proc", 0, "Status of process $proc"); + return; + } + } + + # no matches, process is not running + print_module("Mongo_" . "$proc_name" . "_Process_" . "$proc", "generic_proc", 0, "Status of process $proc"); + +} + +# ---------------------------------------------------------------------------- +# process_mem_win +# +# Generates a Pandora FMS about memory usage of a given process "pepito.exe" +# only works with EXACT names. +# ---------------------------------------------------------------------------- + +sub process_mem_win ($$){ + my $proc = $_[0]; + my $proc_name = $_[1]; + + if ($proc eq ""){ + return; + } + + my $computer = "localhost"; + my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") or return; + my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Process WHERE Caption = '$proc'", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); + + foreach my $objItem (in $colItems) { + + if ($objItem->{"Caption"} eq $proc){ + print_module("Mongo_" . "$proc_name" . "_Proc_MEM_" . "$proc", "generic_data", $objItem->{"WorkingSetSize"}, "Memory in bytes of process $proc (B)"); + } else { + return; + } + } +} + +# ---------------------------------------------------------------------------- +# process_mem_unix +# +# Generates a Pandora FMS about memory usage of a given process +# ---------------------------------------------------------------------------- + +sub process_mem_unix ($$){ + my $vol = $_[0]; + my $proc_name = $_[1]; + + if ($vol eq ""){ + return; + } + + if ( $OS_NAME eq "SunOS\n" ) { + my $data = `/usr/ucb/ps -aguxwwww | grep "$vol" | grep -v grep | awk '{ print \$4 }'`; + my @data2 = split ("\n", $data), + my $tot = 0; + + foreach (@data2){ + $tot = $tot + $_; + } + print_module("Mongo_" . "$proc_name" . "_Proc_MEM_" . "$vol", "generic_data", $tot, "Memory used (%) for process $vol (%)"); + } else { + my $data = `ps aux | grep "$vol" | grep -v grep | awk '{ print \$6 }'`; + my @data2 = split ("\n", $data), + my $tot = 0; + + foreach (@data2){ + $tot = $tot + $_; + } + print_module("Mongo_" . "$proc_name" . "_Proc_MEM_" . "$vol", "generic_data", $tot, "Memory used (in bytes) for process $vol (%)"); + } +} + +# ---------------------------------------------------------------------------- +# process_cpu_unix +# +# Generates a Pandora FMS about memory usage of a given process +# ---------------------------------------------------------------------------- +sub process_cpu_unix ($$) { + my $vol = $_[0]; + my $proc_name = $_[1]; + + if ($vol eq ""){ + return; + } + if ( $OS_NAME eq "SunOS\n" ) { + my $data = `/usr/ucb/ps -aguxwwww | grep "$vol" | grep -v grep | awk '{ print \$3 }'`; + my @data2 = split ("\n", $data), + my $tot = 0; + + foreach (@data2){ + $tot = $tot + $_; + } + print_module("Mongo_" . "$proc_name" . "_Proc_CPU_" . "$vol", "generic_data", $tot, "CPU (%) used for process $vol (%)"); + } else { + my $data = `ps aux | grep "$vol" | grep -v grep | awk '{ print \$3 }'`; + my @data2 = split ("\n", $data), + my $tot = 0; + + foreach (@data2){ + $tot = $tot + $_; + } + print_module("Mongo_" . "$proc_name" . "_Proc_CPU_" . "$vol", "generic_data", $tot, "CPU (%) used for process $vol (%)"); + } +} + +#-------------------------------------------------------------------------------- +#-------------------------------------------------------------------------------- +# MAIN PROGRAM +# ------------------------------------------------------------------------------- +#-------------------------------------------------------------------------------- + +# Parse external configuration file + +# Load config file from command line +if ($#ARGV == -1 ){ + print "I need at least one parameter: Complete path to external configuration file \n"; + exit; +} + +# Check for file +if ( ! -f $archivo_cfg ) { + printf "\n [ERROR] Cannot open configuration file at $archivo_cfg. \n\n"; + exit 1; +} + +load_external_setup ($archivo_cfg); + +# Check for logparser, if not ready, skip all log check +if ( ! -f $plugin_setup{"logparser"} ) { + # Create a dummy check module with and advise warning + if ($log_items > 0) { + print_module("Error: Log parser not found", "async_string", 0, "Log parser not found, please check your configuration file and set it"); + } + $log_items =0; +} + +# Check individual defined volumes +if ($volume_items > 0){ + my $ax; + + for ($ax=0; $ax < $volume_items; $ax++){ + my ($name, $volume) = split (";",$plugin_setup{"volume"}[$ax]); + if ($OS eq "MSWin32"){ + spare_system_disk_win ($name, $volume); + } else { + spare_system_disk ($name, $volume); + } + } +} + +# Check individual defined logs +if ($log_items > 0){ + my $ax; + + for ($ax=0; $ax < $log_items; $ax++){ + my ($logfile, $name, $expression) = split (";",$plugin_setup{"log"}[$ax]); + + # Verify proper valid values here or skip + if (!defined($logfile)){ + next; + } + + if (!defined($name)){ + next; + } + + if (!defined($expression)){ + next; + } + + alert_log ($logfile, $name, $expression); + } +} + + +# Check individual defined process +if ($process_items > 0){ + my $ax; + + for ($ax=0; $ax < $process_items; $ax++){ + + my ($name, $process) = split (";",$plugin_setup{"process"}[$ax]); + + if ($OS eq "MSWin32") { + process_status_win ($process, $name); + process_mem_win ($process, $name); + } else { + process_status_unix ($process, $name); + process_mem_unix ($process, $name); + process_cpu_unix ($process, $name); + } + } +} + +# Mongo stats + +if ($mongo_items > 0) { + my $ax; + + for ($ax=0; $ax < $mongo_items; $ax++){ + my ($cmdname, $checktype, $objname, $host, $port) = split (";",$plugin_setup{"mongodb_stats"}[$ax]); + mongostat ($cmdname, $checktype, $objname, $host, $port); + } +} diff --git a/pandora_plugins/MongoDB/sample-mongodb.conf b/pandora_plugins/MongoDB/sample-mongodb.conf new file mode 100644 index 0000000000..7bbda07aa1 --- /dev/null +++ b/pandora_plugins/MongoDB/sample-mongodb.conf @@ -0,0 +1,7 @@ +mongodb_stats /mongodb-linux-x86_64-2.2.1/bin/mongostat;check_dbstats;;localhost;27019 + +mongodb_stats mongostat;check_dbstats;;localhost;27017 + +mongodb_stats mongostat;check_dbstats;;localhost;27018 + +mongodb_stats mongostat;check_dbstats;shardctrl;localhost;27020 diff --git a/pandora_plugins/MySQL/README b/pandora_plugins/MySQL/README new file mode 100644 index 0000000000..dfd966c242 --- /dev/null +++ b/pandora_plugins/MySQL/README @@ -0,0 +1 @@ +Migrado a Enterprise (custom queries) \ No newline at end of file diff --git a/pandora_plugins/MySQL/mysql.conf.sample b/pandora_plugins/MySQL/mysql.conf.sample new file mode 100644 index 0000000000..edf1808d99 --- /dev/null +++ b/pandora_plugins/MySQL/mysql.conf.sample @@ -0,0 +1,186 @@ +# Example of configuration file for MySQL Agent/Plugin for Pandora FMS. + +#====================================================================== +#---------- MySQL access parameters / General parameters -------------- +#====================================================================== + +# User and password for MySQL connection +conf_mysql_user root + +# Use "" if your password is in blank +conf_mysql_pass none + +# Version of MySQL, could be 5.0 or 5.5 +conf_mysql_version 5.5 + +# Host for MySQL Server +conf_mysql_host 127.0.0.1 + +# Homedir diretory of MySQL (by default /var/lib/mysql) +conf_mysql_homedir /var/lib/mysql +conf_mysql_basedir /var/lib/mysql + +# Logfile of MySQL (by default /var/lib/mysql/mysql.log) +conf_mysql_logfile /var/log/mysql.log + +# Plugin temporary data directory +conf_temp /tmp + +# Complete path to logparser +conf_logparser /etc/pandora/plugins/grep_log + +#====================================================================== +#-------------------- System specific parameters ---------------------- +#====================================================================== + +# Check connectivity with the mysql server +check_begin +check_mysql_connect +check_end + +check_begin +check_mysql_cpu +post_condition > 95 +#post_execution snmptrap -v 1 -c public 192.168.5.2 1.3.6.1.2.1.2 192.168.50.124 6 666 1233433 .1.3.6.1.2.1.2.2.1.1.6 i _DATA_ +post_status CRITICAL +check_end + +check_begin +check_mysql_memory +check_end + +check_begin +check_mysql_service +check_end + +check_begin +check_mysql_logs +module_type async_string +post_condition == ERROR +#post_execution snmptrap -v 1 -c public 192.168.5.2 .1.3.6.1.4.1.2789.2005 192.168.5.2 6 666 1233433 .1.3.6.1.4.1.2789.2005.1 s "_DATA_" +post_status CRITICAL +check_end + +# Too much connections could mean mysql problems! +check_begin +check_system_timewait +post_condition > 5000 +post_status WARNING +check_end + +check_begin +check_mysql_ibdata1 +check_end + +check_begin +check_system_diskusage +check_end + +#====================================================================== +#----------------------- Query open interface ------------------------- +#====================================================================== + +#check_begin +#check_name PandoraDemo_Sessions +#check_sql select count(*) from pandora_demo.tsesion where accion = 'Logon'; +#post_condition > 5 +#post_status WARNING +#data_delta +#check_end + +#====================================================================== +#-------------------- Performance specific parameters ----------------- +#====================================================================== + +check_begin +# Retrieve active connections +mysql_status Full processlist +module_type generic_data +# Report delta increment +data_delta +check_end + +check_begin +# Retrieve activity time in server +mysql_status Uptime +check_end + +check_begin +# Number of connections aborted by client +mysql_status Aborted_connects +data_delta +check_end + +check_begin +# Number of DB queries +mysql_status Queries +data_delta +check_end + +check_begin +# Number of locks over DB tables +mysql_status Table_locks_waited +data_delta +post_condition > 10 +post_status WARNING +check_end + +check_begin +# Number of row locks +mysql_status Innodb_row_lock_waits a +data_delta +post_condition > 10 +post_status WARNING +check_end + +check_begin +# Number of table locks +mysql_status Com_lock_tables +data_delta +check_end + +check_begin +# Number of pending i/o operations +mysql_status Pending_io +data_delta +post_condition > 15 +post_status WARNING +check_end + +check_begin +# Db size in GB +mysql_status Total_size +post_condition > 5 +post_status WARNING +check_end + +check_begin +mysql_status Threads_connected +post_condition > 50 +post_status WARNING +check_end + +check_begin +mysql_status_Innodb_row_lock_time_avg +post_condition > 10 +post_status WARNING +check_end + +check_begin +mysql_status_Connections +post_condition > 500 +post_status WARNING +data_delta +check_end + + + +check_begin +# Retrieve innodb status information +check_name Buffer_pool_size +mysql_innodb Buffer pool size +module_type generic_data +data_delta +#post_condition == 512 +check_end + diff --git a/pandora_plugins/MySQL/pandora_mysql.pl b/pandora_plugins/MySQL/pandora_mysql.pl new file mode 100644 index 0000000000..e2d292337f --- /dev/null +++ b/pandora_plugins/MySQL/pandora_mysql.pl @@ -0,0 +1,1188 @@ +#!/usr/bin/perl +# Pandora FMS Plugin for MySQL +# (c) Artica ST 2015 +# v1.4, 19 Feb 2015 +# ---------------------------------------------------------------------- + +# Default lib dir for RPM and DEB packages +use lib '/usr/lib/perl5'; + +use strict; +use Data::Dumper; +use POSIX qw(setsid strftime); +use POSIX; +use Time::Local; + +#---------------------------- Global parameters -----------------------# + +# OS and OS version +my $OS = $^O; + +# Store original PATH +my $ORIGINAL_PATH = $ENV{'PATH'}; + +# FLUSH in each IO +$| = 1; + +# Conf file divided line by line +my @config_file; +# Conf filename received by command line +my $archivo_cfg = $ARGV[0]; +# Hash with this plugin setup +my %plugin_setup; +# Array with different block checks +my @checks; + +# ---------------------------------------------------------------------- +# parse_dosline (line) +# +# This cleans DOS-like line and cleans ^M character. VERY Important when +# you process .conf edited from DOS +# ---------------------------------------------------------------------- +sub parse_dosline ($){ + my $str = $_[0]; + + $str =~ s/\r//g; + return $str; +} + +# ---------------------------------------------------------------------- +# load_external_setup (config file) +# +# Loads a config file +# ---------------------------------------------------------------------- +sub load_external_setup ($){ + my $archivo_cfg = $_[0]; + my $buffer_line; + + # Collect items from config file and put in an array + if (! open (CFG, "< $archivo_cfg")) { + print "[ERROR] Error opening configuration file $archivo_cfg: $!.\n"; + logger ("[ERROR] Error opening configuration file $archivo_cfg: $!"); + exit 0; + } + + while () { + $buffer_line = parse_dosline ($_); + # Parse configuration file, this is specially difficult because can contain SQL code, with many things + if ($buffer_line !~ /^\#/) { # begins with anything except # (for commenting) + if ($buffer_line =~ m/(.+)\s(.*)/) { + push @config_file, $buffer_line; + } + } + } + + close (CFG); +} + +# ---------------------------------------------------------------------- +# logger_begin (message) +# Beggining of logging to file +# ---------------------------------------------------------------------- +sub logger_begin ($) { + my ($message) = @_; + + my $file = "/tmp/pandora_mysql"; + + if (! open (FILE, "> $file")) { + print "[ERROR] Could not open logfile '$file' \n"; + logger ("[ERROR] Error opening logfile $file"); + exit 0; + } + +# open (FILE, "> $file") or die "[FATAL] Could not open logfile '$file'"; + print FILE strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " >> " . $message . "\n"; + close (FILE); +} + +# ---------------------------------------------------------------------- +# logger (message) +# Log to file +# ---------------------------------------------------------------------- +sub logger ($) { + my ($message) = @_; + + my $file = "/tmp/pandora_mysql"; + + if (! open (FILE, ">> $file")) { + print "[ERROR] Could not open logfile '$file' \n"; + logger ("[ERROR] Error opening logfile $file"); + exit 0; + } + + print FILE strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " >> " . $message . "\n"; + close (FILE); +} + +# ---------------------------------------------------------------------- +# trim (string) +# +# Erase blank spaces before and after the string +# ---------------------------------------------------------------------- +sub trim ($) { + my $string = shift; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + + return $string; +} + +# ---------------------------------------------------------------------- +# clean_blank (string) +# +# This function return a string without blankspaces, given a simple text +# string +# ---------------------------------------------------------------------- +sub clean_blank($) { + my $input = $_[0]; + $input =~ s/[\s\r\n]*//g; + + return $input; +} + +# ---------------------------------------------------------------------- +# print_module (module name, module type, module value, module +# description, [module severity]) +# +# This function returns a XML module part for the plugin +# ---------------------------------------------------------------------- +sub print_module ($$$$;$) { + my $MODULE_NAME = $_[0]; + my $MODULE_TYPE = $_[1]; + my $MODULE_VALUE = $_[2]; + my $MODULE_DESC = $_[3]; + my $MODULE_SEVERITY = $_[4]; + + # If not a string type, remove all blank spaces and check for not value returned! + if ($MODULE_TYPE !~ m/string/) { + $MODULE_VALUE = clean_blank($MODULE_VALUE); + } + + print "\n"; + print "$MODULE_NAME\n"; + print "$MODULE_TYPE\n"; + print "\n"; + print "\n"; + if (defined($MODULE_SEVERITY)) { + print "$MODULE_SEVERITY\n"; + } else { + print "NORMAL\n"; + } + + print "\n"; +} + +# ---------------------------------------------------------------------- +# parse_config +# +# This function load configuration tokens and store in a global hash +# called %plugin_setup accesible on all program. +# ---------------------------------------------------------------------- +sub parse_config { + + my $check_block = 0; + my $parametro; + + # Some default options + $plugin_setup{"conf_mysql_homedir"} = "/var/lib/mysql"; + $plugin_setup{"conf_mysql_basedir"} = "/var/lib/mysql"; + $plugin_setup{"conf_temp"} = "/tmp"; + $plugin_setup{"numchecks"} = 0; + $plugin_setup{"conf_mysql_version"} = "5.5"; + + foreach (@config_file) { + $parametro = $_; + + if ($parametro =~ m/^include\s(.*)/i) { + load_external_setup ($1); + } + + if ($parametro =~ m/^conf\_mysql\_version\s(.*)/i) { + $plugin_setup{"conf_mysql_version"} = trim($1); + } + + if ($parametro =~ m/^conf\_mysql\_user\s(.*)/i) { + $plugin_setup{"conf_mysql_user"} = trim($1); + } + + if ($parametro =~ m/^conf\_mysql\_pass\s(.*)/i) { + my $temp = $1; + $temp =~ s/\"//g; + $plugin_setup{"conf_mysql_pass"} = trim($temp); + } + + if ($parametro =~ m/^conf\_mysql\_host\s(.*)/i) { + $plugin_setup{"conf_mysql_host"} = trim($1); + } + + if ($parametro =~ m/^conf\_mysql\_homedir\s(.*)/i) { + $plugin_setup{"conf_mysql_homedir"} = trim($1); + } + if ($parametro =~ m/^conf\_mysql\_basedir\s(.*)/i) { + $plugin_setup{"conf_mysql_basedir"} = trim($1); + } + + if ($parametro =~ m/^conf\_mysql\_logfile\s(.*)/i) { + $plugin_setup{"conf_mysql_logfile"} = trim($1); + } + + if ($parametro =~ m/^conf\_temp\s(.*)/i) { + $plugin_setup{"conf_temp"} = trim($1); + } + + if ($parametro =~ m/^conf\_logparser\s(.*)/i) { + $plugin_setup{"conf_logparser"} = trim($1); + } + + # Detect begin of check definition + if ($parametro =~ m/^check\_begin/i) { + $check_block = 1; + $checks[$plugin_setup{"numchecks"}]{'type'} = 'unknown'; + } + + ############### Specific check block parsing ################### + if ($check_block == 1) { + + if ($parametro =~ m/^check\_end/i) { + $check_block = 0; + $plugin_setup{"numchecks"}++; + } + + # Try to parse check type (System parameters) + if ($parametro =~ m/^check\_mysql\_service/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'mysql_service'; + } + + if ($parametro =~ m/^check\_mysql\_memory/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'mysql_memory'; + } + + if ($parametro =~ m/^check\_mysql\_cpu/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'mysql_cpu'; + } + + if ($parametro =~ m/^check\_system\_timewait/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'system_timewait'; + } + + if ($parametro =~ m/^check\_system\_diskusage/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'system_diskusage'; + } + + if ($parametro =~ m/^check\_mysql\_ibdata1/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'mysql_ibdata1'; + } + + if ($parametro =~ m/^check\_mysql\_logs/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'mysql_logs'; + } + + if ($parametro =~ m/^check\_mysql\_connect/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'mysql_connection'; + } + + + # Try to parse check type (Performance parameters) + if ($parametro =~ m/^mysql\_status\s(.*)/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'status'; + $checks[$plugin_setup{"numchecks"}]{'show'} = trim($1); + } + + # Try to parse check type (Open SQL interface) + if ($parametro =~ m/^check\_sql\s(.*)/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'sql'; + $checks[$plugin_setup{"numchecks"}]{'sql'} = trim($1); + } + + # Try to parse check type (Query Innodb status) + if ($parametro =~ m/^mysql\_innodb\s(.*)/i) { + $checks[$plugin_setup{"numchecks"}]{'type'} = 'innodb'; + $checks[$plugin_setup{"numchecks"}]{'query'} = trim($1); + } + + if ($parametro =~ m/^check\_name\s(.*)/i) { + $checks[$plugin_setup{"numchecks"}]{'check_name'} = trim($1); + } + + if ($parametro =~ m/^check\_schema\s(.*)/i) { + $checks[$plugin_setup{"numchecks"}]{'check_schema'} = trim($1); + } + + if ($parametro =~ m/^module\_type\s(generic_data|generic_data_inc|generic_data_string|generic_proc|async_string|async_proc|async_data)/i) { + $checks[$plugin_setup{"numchecks"}]{'module_type'} = trim($1); + } + + if ($parametro =~ m/^post\_condition\s+(==|!=|<|>)\s+(.*)/i) { + $checks[$plugin_setup{"numchecks"}]{'postcondition_op'} = trim($1); + $checks[$plugin_setup{"numchecks"}]{'postcondition_val'} = trim($2); + } + + if ($parametro =~ m/^post\_execution\s(.*)/i) { + $checks[$plugin_setup{"numchecks"}]{'postexecution'} = trim($1); + } + + if ($parametro =~ m/^data\_absolute/i) { + $checks[$plugin_setup{"numchecks"}]{'return_type'} = 'data_absolute'; + } + + if ($parametro =~ m/^data\_delta/i) { + $checks[$plugin_setup{"numchecks"}]{'return_type'} = 'data_delta'; + } + + if ($parametro =~ m/^post\_status\s(WARNING|CRITICAL)/i) { + $checks[$plugin_setup{"numchecks"}]{'status'} = trim($1); + } + + } # Check block + + } +} + +# ---------------------------------------------------------------------- +# check_mysql_service +# +# This function check MySQL service status +# ---------------------------------------------------------------------- +sub check_mysql_service { + my ($mysql_service_result1, $mysql_service_result2, $mysql_service_result3, $mysql_service_result4); + my $mysql_service_result = 0; + + # Try different flavours of mysql status + $mysql_service_result1 = `service mysql status 2> /dev/null`; + $mysql_service_result2 = `service mysqld status 2> /dev/null`; + $mysql_service_result3 = `/etc/init.d/mysql status 2> /dev/null`; + $mysql_service_result4 = `/etc/init.d/mysqld status 2> /dev/null`; + + + #print "1 >> " . $mysql_service_result1 . "\n"; + #print "2 >> " . $mysql_service_result2 . "\n"; + #print "3 >> " . $mysql_service_result3 . "\n"; + #print "4 >> " . $mysql_service_result4 . "\n"; + + # If any of these ones is up then check result eq OK! + if (($mysql_service_result1 =~ /start/i) || ($mysql_service_result1 =~ /running/i) || + ($mysql_service_result2 =~ /start/i) || ($mysql_service_result2 =~ /running/i) || + ($mysql_service_result3 =~ /start/i) || ($mysql_service_result3 =~ /running/i) || + ($mysql_service_result4 =~ /start/i) || ($mysql_service_result4 =~ /running/i)) { + + # OK! + $mysql_service_result = 1; + + } else { + + # Fail + $mysql_service_result = 0; + + } + + logger("[INFO] check_mysql_service with result: " . $mysql_service_result); + + return $mysql_service_result; + +} + +# ---------------------------------------------------------------------- +# check_mysql_memory +# +# This function check MySQL memory usage +# ---------------------------------------------------------------------- +sub check_mysql_memory { + my $mysql_memory_result = 0; + + # Depends on OS + if ($OS =~ /hpux/i){ + $mysql_memory_result = `ps -eo comm,pmem | grep -v "grep" | grep "mysqld --basedir" | awk '{print \$2}'`; + } else { + $mysql_memory_result = `ps aux | grep -v "grep" | grep "mysqld --basedir" | awk '{print \$4}'`; + } + + logger("[INFO] check_mysql_memory with result: " . $mysql_memory_result); + + return $mysql_memory_result; +} + +# ---------------------------------------------------------------------- +# check_mysql_cpu +# +# This function check MySQL cpu usage +# ---------------------------------------------------------------------- +sub check_mysql_cpu { + my $mysql_cpu_result = 0; + + # Depends on OS + if ($OS =~ /hpux/i){ + $mysql_cpu_result = `ps -eo comm,pcpu | grep -v "grep" | grep "mysqld --basedir" | awk '{print \$2}'`; + } else { + $mysql_cpu_result = `ps aux | grep -v "grep" | grep "mysqld --basedir" | awk '{print \$3}'`; + } + + logger("[INFO] check_mysql_cpu with result: " . $mysql_cpu_result); + + return $mysql_cpu_result; +} + +# ---------------------------------------------------------------------- +# check_system_timewait +# +# This function check system timewait +# ---------------------------------------------------------------------- +sub check_system_timewait { + my $system_timewait_result = 0; + + $system_timewait_result = `netstat -ntu | grep "TIME_WAIT" | wc -l`; + + logger("[INFO] check_system_timewait with result: " . $system_timewait_result); + + return $system_timewait_result; +} + +# ---------------------------------------------------------------------- +# check_system_diskusage +# +# This function check system disk usage +# ---------------------------------------------------------------------- +sub check_system_diskusage { + my $system_diskusage_result_tmp = 0; + my $system_diskusage_result = 0; + + if (!defined($plugin_setup{"conf_mysql_homedir"})) { + logger("[INFO] system_diskusage_result check needs conf_mysql_homedir token defined in configuration file."); + return 0; + } + + my $system_diskusage_result_tmp = `df -k "$plugin_setup{'conf_mysql_homedir'}" | awk '{print \$5}' | tail -1 | tr -d "%"`; + + $system_diskusage_result = 100 - $system_diskusage_result_tmp; + + logger("[INFO] check_system_diskusage with result: " . $system_diskusage_result); + + return $system_diskusage_result; +} + + +# ---------------------------------------------------------------------- +# check_mysql_ibdata1 +# +# This function check ibdata1 file disk usage +# ---------------------------------------------------------------------- +sub check_mysql_ibdata1 { + my $mysql_ibdata1_result = 0; + + if (!defined($plugin_setup{"conf_mysql_basedir"})) { + logger("[INFO] check_mysql_ibdata1 check needs conf_mysql_basedir token defined in configuration file."); + } + + $mysql_ibdata1_result = `du -k $plugin_setup{"conf_mysql_basedir"}/ibdata1 | tail -1 | awk '{ print \$1 }'`; + + logger("[INFO] check_mysql_ibdata1 with result: " . $mysql_ibdata1_result); + + return $mysql_ibdata1_result; +} + +# ---------------------------------------------------------------------- +# check_mysql_connection +# +# This function check connection against MySQL, if goes wrong abort monitoring +# ---------------------------------------------------------------------- +sub check_mysql_connection { + my $mysql_connection_result = 1; + my $connection_string = 0; + if (!defined($plugin_setup{"conf_mysql_pass"})){ + $connection_string = "mysql -u" . $plugin_setup{"conf_mysql_user"} . + " -h" . $plugin_setup{"conf_mysql_host"} ; + }else{ + # Connection string + $connection_string = "mysql -u" . $plugin_setup{"conf_mysql_user"} . + " -p" . $plugin_setup{"conf_mysql_pass"} . + " -h" . $plugin_setup{"conf_mysql_host"} ; + } + my $tmp_file = $plugin_setup{'conf_temp'} . '/mysql_connection.tmp'; + + my $connection_result = `$connection_string -e "SELECT 1 FROM DUAL" 2> $tmp_file`; + + # Collect info from temp file + open (TMP, "< $tmp_file"); + + while () { + my $buffer_line = parse_dosline ($_); + + if ($buffer_line =~ /error/i) { + $mysql_connection_result = 0; + } + } + + close (TMP); + + unlink($tmp_file); + + logger("[INFO] check_mysql_connection with result: " . $mysql_connection_result); + + # Abort monitoring + if ($mysql_connection_result == 0) { + print_module("MySQL_connection_error", "async_string", "Error", "MySQL plugin cannot connect to Database. Abort execution of plugin", "CRITICAL"); + } + + return $mysql_connection_result; +} + + +# ---------------------------------------------------------------------- +# check_mysql_logs +# +# This function check ibdata1 file disk usage +# ---------------------------------------------------------------------- +sub check_mysql_logs(;$) { + my $module_type = $_[0]; + + my $mysql_logs_result = 0; + + if (!defined($plugin_setup{"conf_logparser"})) { + logger("[INFO] check_mysql_logs check needs conf_logparser token defined in configuration file."); + return 0; + } + + if (!defined($plugin_setup{"conf_logparser"})) { + logger("[INFO] check_mysql_logs check needs conf_mysql_logfile token defined in configuration file."); + return 0; + } + + my $plugin_call = $plugin_setup{"conf_logparser"}. " " . $plugin_setup{"conf_mysql_logfile"} . " MySQL_error_logs error 2> /dev/null"; + + $mysql_logs_result = `$plugin_call`; + + if ($mysql_logs_result ne "") { + logger ("[INFO] check_mysql_logs with result:\n$mysql_logs_result"); + print $mysql_logs_result; + + # Process output of grep_log plugin + my @temp = split ("\n", $mysql_logs_result); + my @result; + + # Try to get return values + my $i = 0; + foreach (@temp) { + # Get return values + if ($_ =~ /<\/value><\/data>/){ + $result[$i] = $1; + $i++; + } + } + + return @result; + + } else { + logger ("[INFO] Blank output in check_mysql_logs searching in logfile: " . $plugin_setup{"conf_mysql_logfile"}); + +# if (defined($module_type)) { +# print_module("MySQL_error_logs", $module_type, "Blank output", "Blank output in check_mysql_logs searching in logfile " . $plugin_setup{"conf_mysql_logfile"}); +# } else { +# print_module("MySQL_error_logs", "async_string", "Blank output", "Blank output in check_mysql_logs searching in logfile " . $plugin_setup{"conf_mysql_logfile"}); +# } + } +} + +# ---------------------------------------------------------------------- +# check_mysql_status (SHOW parameter, [SQL statement/ Query for Innodb status, Mysql_schema]) +# +# This function check status parameter (Performance parameters) +# ---------------------------------------------------------------------- +sub check_mysql_status($;$$) { + my $show_parameter = $_[0]; + my $sql_statement = $_[1]; + my $sql_schema = $_[2]; + my $mysql_status_result = 0; + + if (!defined($show_parameter)){ + logger("[INFO] Empty parameter in check_mysql_status check, please revise configuration file."); + return 0; + } + + # Writes in temp file + my $temp_file = $plugin_setup{"conf_temp"} . "/mysql_pandora.tmp"; + + open (TEMP1, "> " . $temp_file); + + # Depends on the request write different statements ('pending_io', 'sql', 'innodb' is different) + if ($show_parameter =~ /processlist/i) { + print TEMP1 "SHOW " . $show_parameter; + } elsif ($show_parameter =~ /total_size/i) { + print TEMP1 "SELECT \"Total_size\", + sum( data_length + index_length ) / 1024 / 1024 / 1024 \"Data Base Size in GB\" + FROM information_schema.TABLES"; + } elsif (($show_parameter !~ /pending_io/i) and ($show_parameter !~ /sql/i) and ($show_parameter ne 'innodb')) { + print TEMP1 "SHOW GLOBAL STATUS LIKE '" . $show_parameter . "'"; + } + + close (TEMP1); + + # Connection string + my $connection_string = 0; + if (!defined($plugin_setup{"conf_mysql_pass"} ) ){ + $connection_string = "mysql -u" . $plugin_setup{"conf_mysql_user"} . + " -h" . $plugin_setup{"conf_mysql_host"} ; + }else{ + $connection_string = "mysql -u" . $plugin_setup{"conf_mysql_user"} . + " -p" . $plugin_setup{"conf_mysql_pass"} . + " -h" . $plugin_setup{"conf_mysql_host"} ; + } + #my $connection_string = "mysql -u" . $plugin_setup{"conf_mysql_user"} . + # " -p" . $plugin_setup{"conf_mysql_pass"} . + # " -h" . $plugin_setup{"conf_mysql_host"} ; + + # If its a query, then try to add schema to the connection string + if ($show_parameter =~ /sql/i) { + if (defined($sql_schema)) { + $connection_string .= " $sql_schema"; + } + } + + my $post_sql = ''; + # If we want to retrieve 'active sessions' count lines + if ($show_parameter =~ /processlist/i) { + $post_sql = ' | wc -l'; + } # Rest of request have this suffix + else { + $post_sql = ' | tail -1 | awk \'{print $2}\''; + } + + # 'pending_io' and 'sql' and 'innodb' are different + if (($show_parameter !~ /pending_io/i) and ($show_parameter !~ /sql/i) and ($show_parameter ne 'innodb')) { + $mysql_status_result = `$connection_string < $temp_file $post_sql`; + } elsif ($show_parameter =~ /sql/i) { + $mysql_status_result = `$connection_string -e "$sql_statement" | tail -1`; + } elsif ($show_parameter =~ /innodb/i) { + + + if ($plugin_setup{"conf_mysql_version"} == "5.0") { + $mysql_status_result = `$connection_string -e "SHOW INNODB STATUS\\G"`; + } else { + $mysql_status_result = `$connection_string -e "SHOW ENGINE INNODB STATUS\\G"`; + } + + # Process output of show innodb status + my @temp = split ("\n", $mysql_status_result); + + # If we detect query lines then output + $mysql_status_result = 0; + foreach (@temp) { + if ($_ =~ m/$sql_statement\s+(.*)/) { + $mysql_status_result = $1; + } + } + + } else { + + if ($plugin_setup{"conf_mysql_version"} == "5.0") { + $mysql_status_result = `$connection_string -e "SHOW INNODB STATUS\\G"`; + } else { + $mysql_status_result = `$connection_string -e "SHOW ENGINE INNODB STATUS\\G"`; + } + + # Process output of show innodb status + my @temp = split ("\n", $mysql_status_result); + + # If we detect 'i/o waiting' lines then increment counter + $mysql_status_result = 0; + foreach (@temp) { + if ($_ =~ m/(.*)waiting for i\/o request(.*)/){ + $mysql_status_result++; + } + } + } + + unlink ($temp_file); + + # If we want to retrieve active session substract 1 due to header + if ($show_parameter =~ /processlist/i) { + if ($mysql_status_result > 0){ + $mysql_status_result--; + } + } + + logger("[INFO] check_mysql_status executing: $show_parameter with result: " . $mysql_status_result); + + return $mysql_status_result; +} + +# ---------------------------------------------------------------------- +# is_numeric (arg) +# +# Return TRUE if given argument is numeric +# ---------------------------------------------------------------------- +sub is_numeric($) { + my $val = $_[0]; + + if (!defined($val)){ + return 0; + } + # Replace "," for "." + $val =~ s/\,/\./; + + my $DIGITS = qr{ \d+ (?: [.] \d*)? | [.] \d+ }xms; + my $SIGN = qr{ [+-] }xms; + my $NUMBER = qr{ ($SIGN?) ($DIGITS) }xms; + if ( $val !~ /^${NUMBER}$/ ) { + return 0; #Non-numeric + } else { + return 1; #Numeric + } +} + +# ---------------------------------------------------------------------- +# eval_postcondition (result, operator, value) +# +# This function eval postcondition and return a boolean +# ---------------------------------------------------------------------- +sub eval_postcondition($$$) { + my $result = $_[0]; + my $operator = $_[1]; + my $value = $_[2]; + my $eval_postcondition_result = 0; + + my $result_type = is_numeric($result); + + logger("[INFO] Evaluating poscondition: $result $operator $value."); + + # Numeric result + if ($result_type == 1) { + # Equal to + if ($operator =~ /==/) { + if (int($result) == int($value)) { + + $eval_postcondition_result = 1; + + } + }# Not equal to + elsif ($operator =~ /!=/) { + + if (int($result) != int($value)) { + + $eval_postcondition_result = 1; + + } + }# Less than + elsif ($operator =~ //) { + + if (int($result) > int($value)) { + + $eval_postcondition_result = 1; + + } + } else { + + logger("[ERROR] Unknown operator in postcondition, please revise your configuration file."); + $eval_postcondition_result = 0; + + } + } # Non numeric result + else { + + my $result_value = sprintf("%s", $result); + my $string_value = sprintf("%s", $value); + + # Equal to + if ($operator =~ /==/) { + + if ($result_value =~ /$string_value/) { + + $eval_postcondition_result = 1; + + } + }# Not equal to + elsif ($operator =~ /!=/) { + + if ($result_value !~ /$string_value/) { + + $eval_postcondition_result = 1; + + } + }# Less than + elsif ($operator =~ //) { + + if ($result_value gt $string_value) { + + $eval_postcondition_result = 1; + + } + } else { + + logger("[ERROR] Unknown operator in postcondition, please revise your configuration file."); + $eval_postcondition_result = 0; + + } + } + + return $eval_postcondition_result; +} + +# ---------------------------------------------------------------------- +# eval_postcondition_array (Array result, operator, value) +# +# This function eval postcondition and return a boolean if some of the +# elements fulfill the condition +# ---------------------------------------------------------------------- +sub eval_postcondition_array { + # This works + my $value = pop; + my $operator = pop; + my @result = @_; + + my $eval_postcondition_array_result = 0; + my $return_postcondition_element = 0; + + # Eval all array + foreach my $single_result (@result) { + + $return_postcondition_element = 0; + + $return_postcondition_element = eval_postcondition($single_result, $operator, $value); + + if ($return_postcondition_element) { + $eval_postcondition_array_result = 1; + } + } + + return $eval_postcondition_array_result; +} + +# ---------------------------------------------------------------------- +# store_result_check(check_type, value) +# +# This function stores in a temporary file the last value of the check +# ---------------------------------------------------------------------- +sub store_result_check($$) { + my $type = $_[0]; + my $value = $_[1]; + + # Compose the temp filename + my $tmp_file = $plugin_setup{'conf_temp'} . '/mysql_check_' . $type . '.tmp'; + + # Try to open temp file + if (! open (TMP, "> $tmp_file")) { + logger("[ERROR] Error opening temp file: $tmp_file for write last check value: $type, $value"); + return; + } + + # Write las check value + print TMP $value; + close (TMP); + + logger("[INFO] Saving last check value: $value of check: $type in file $tmp_file ."); +} + +# ---------------------------------------------------------------------- +# process_delta_data(check_type, value) +# +# This function calculates delta value for the current check +# ---------------------------------------------------------------------- +sub process_delta_data($$) { + my $type = $_[0]; + my $value = $_[1]; + my $buffer_line; + + # Compose the temp filename + my $tmp_file = $plugin_setup{'conf_temp'} . '/mysql_check_' . $type . '.tmp'; + + # Collect info from temp file + # If it's not possible then return token for not print module + if (! open (TMP, "< $tmp_file")) { + return '::MYSQL _ NON EXEC'; + } + + while () { + $buffer_line = parse_dosline ($_); + } + + my $process_delta_result = int($value) - int($buffer_line); + + close (TMP); + + # If delta value is negative then reset check last value + if ($process_delta_result < 0) { + logger("[INFO] Reset last value of check_" . $type . " due to negative value: " . $process_delta_result); + return '::MYSQL _ NON EXEC'; + } + + logger("[INFO] check_" . $type . " postprocessed by delta calculation: " . $process_delta_result); + + return $process_delta_result; +} + +############################################################################### +############################################################################### +######################## MAIN PROGRAM CODE #################################### +############################################################################### +############################################################################### + +# ---------------------------------------------------------------------- +# Checks input parameter from command line (Conf file) +# ---------------------------------------------------------------------- +my $log_init = 0; + +# Load config file from command line +if ($#ARGV == -1){ + print "I need at least one parameter: Complete path to external configuration file \n"; + logger_begin("[ERROR] Path to configuration file it's needed"); + + # Logfile is initiated + $log_init = 1; + + exit 0; +} + +# Check for conf file +if ( ! -f $archivo_cfg ) { + printf "\n [ERROR] Cannot open configuration file at $archivo_cfg. \n\n"; + + if ($log_init == 1) { + logger("[ERROR] Cannot open configuration file at $archivo_cfg, please set permissions correctly."); + } else { + logger_begin("[ERROR] Cannot open configuration file at $archivo_cfg, please set permissions correctly."); + $log_init = 1; + } + + print_module("MySQL_plugin_error", "generic_proc", 0, "Cannot open configuration file at $archivo_cfg, please set permissions correctly."); + exit 0; +} + +# ---------------------------------------------------------------------- +# Parse external configuration file +# ---------------------------------------------------------------------- +load_external_setup ($archivo_cfg); + +if ($log_init == 1){ + + logger("[INFO] Parsing config file $archivo_cfg."); + +} else { + + logger_begin("[INFO] Parsing config file $archivo_cfg."); + $log_init = 1; + +} + +parse_config; + +=COMMENT +print Dumper(%plugin_setup); +print Dumper(@checks); + +exit; +=cut + +# ---------------------------------------------------------------------- +# First check connection to MySQL +# ---------------------------------------------------------------------- +my $result_connection = check_mysql_connection; +if ($result_connection == 0) { + logger ("[ERROR] Connection to MySQL error, abort monitoring."); + exit 0; +} + +# ---------------------------------------------------------------------- +# Process each check +# ---------------------------------------------------------------------- +my $result_check; +my $module_type; +my $module_status; +my @result_check; +my $performance_parameter; +foreach (@checks) { + + # Don't asumme performance parameter + $performance_parameter = 0; + my $type = $_->{'type'}; + my $postcondition_op = $_->{'postcondition_op'}; + my $postcondition_val = $_->{'postcondition_val'}; + my $postexecution = $_->{'postexecution'}; + my $check_status = $_->{'status'}; + my $check_show = $_->{'show'}; + my $return_type = $_->{'return_type'}; + my $check_name = $_->{'check_name'}; + + $result_check = 0; + # Process check (System parameters) + if ($_->{'type'} eq 'mysql_service') { + + $result_check = check_mysql_service; + + } elsif ($_->{'type'} eq 'mysql_memory') { + + $result_check = check_mysql_memory; + + } elsif ($_->{'type'} eq 'mysql_cpu') { + + $result_check = check_mysql_cpu; + + } elsif ($_->{'type'} eq 'system_timewait') { + + $result_check = check_system_timewait; + + } elsif ($_->{'type'} eq 'system_diskusage') { + + $result_check = check_system_diskusage; + + } elsif ($_->{'type'} eq 'mysql_ibdata1') { + + $result_check = check_mysql_ibdata1; + + } elsif ($_->{'type'} eq 'mysql_connection') { + + $result_check = check_mysql_connection; + + } elsif ($_->{'type'} eq 'mysql_logs') { + + @result_check = check_mysql_logs($_->{'module_type'}); + + } + # Process check (Perfomance parameters) + elsif ($_->{'type'} eq 'status') { + + # This is a performance parameter + $performance_parameter = 1; + $result_check = check_mysql_status($_->{"show"}); + + } + # Process check (Open SQL interface) + elsif ($_->{'type'} eq 'sql') { + + $performance_parameter = 1; + $result_check = check_mysql_status($_->{'type'}, $_->{"sql"}, $_->{'check_schema'}); + + } + # Process check (Query Innodb status) + elsif ($_->{'type'} eq 'innodb') { + + $result_check = check_mysql_status($_->{'type'}, $_->{"query"}); + + }else { + + logger("[INFO] Check block with invalid type, discart it. Please revise your configuration file."); + $result_check = 0; + + } + + # Use results + if (($_->{'type'} ne 'unknown')) { + + # Prints module ('mysql_logs' check prints it's module inside check_mysql_logs function) + if ($_->{'type'} ne 'mysql_logs') { + + # Evalue module type + $module_type = $_->{'module_type'}; + + # 'mysql_service' and 'mysql_connection' has always generic_proc type + if (($_->{'type'} eq 'mysql_service') or ($type eq 'mysql_connection')) { + + $module_type = 'generic_proc'; + + }# By default type is generic_data + else { + + $module_type = 'generic_data'; + + } + + my $last_result_check = $result_check; + # If where are dealing with a performance parameter then look at return_type value + if ($performance_parameter and defined($_->{'return_type'})) { + + if ($_->{'return_type'} eq 'data_delta') { + + $result_check = process_delta_data($_->{'type'} . '_' . $_->{'show'}, $result_check); + + } + + } + + # Store result_check in temp file for delta postprocess + if ($performance_parameter) { + + store_result_check($type . '_' . $check_show, $last_result_check); + + } + + } + + # Postcondition ('mysql_logs' type will have an array like result) + my $exec_postexecution = 0; + my $result_check_test = sprintf("%s", $result_check); + if (($type eq 'mysql_logs') and ($result_check_test ne '::MYSQL _ NON EXEC')) { + +# if (defined($postcondition_op) and defined($postcondition_val)) { + +# $exec_postexecution = eval_postcondition_array(@result_check, $postcondition_op, $postcondition_val); + +# } + + # If data has been returned, exec postcommand + if (@result_check) { + $exec_postexecution = 1; + } + + }# Postcondition (other check types) + elsif (defined($postcondition_op) and defined($postcondition_val) and ($result_check_test ne '::MYSQL _ NON EXEC')) { + + $exec_postexecution = eval_postcondition($result_check, $postcondition_op, $postcondition_val); + + } + + # If postcondition is not fulfilled then don't assign status to module + if (!$exec_postexecution) { + $check_status = 'NORMAL'; + } + + # Prints module ('mysql_logs' check prints it's module inside check_mysql_logs function) + if ($type ne 'mysql_logs') { + if ($result_check_test ne '::MYSQL _ NON EXEC') { + # Prints module + if ($type eq 'status') { + print_module("MySQL_" . $type . '_' . $check_show, $module_type, $result_check, '', $check_status); + } else { + if (defined($check_name)) { + print_module("MySQL_" . $type . "_" . $check_name, $module_type, $result_check, '', $check_status); + } else { + print_module("MySQL_" . $type, $module_type, $result_check, '', $check_status); + } + } + } else { + logger("[INFO] First execution of delta value for check $type, ignoring."); + } + } + + # Exec command + if ($exec_postexecution) { + + if (defined($postexecution)) { + + logger("[INFO] Executing postexecution command: " . $postexecution); + if ($postexecution =~ /\_DATA\_/i) { + my $round_data = ceil ($result_check); + + logger("[INFO] Detected macro _DATA_ in postexecution command, replacing with: $result_check"); + $postexecution =~ s/\_DATA\_/$round_data/; + } + my $command_output = `$postexecution`; + logger("[INFO] Postexecution command result: " . $command_output); + + } + } + + } # type ne 'unknown' +} diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_BlockedIOQueue_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_BlockedIOQueue_UNIX_v1r1.sh new file mode 100644 index 0000000000..0b719dd1e9 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_BlockedIOQueue_UNIX_v1r1.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +BLOCKEDIOQUEUE=`vmstat 1 5 | tail -1 | awk '{print $2}'` + +echo $BLOCKEDIOQUEUE diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_CPUUsage_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_CPUUsage_UNIX_v1r1.sh new file mode 100644 index 0000000000..63bbdded34 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_CPUUsage_UNIX_v1r1.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +OSNAME=`uname` + +if [ "$OSNAME" = "AIX" ] +then + + IDLECPU=`vmstat 1 5 | tail -1 | awk '{print $(NF-1)}'` + +fi + +if [ "$OSNAME" = "SunOS" ] +then + + IDLECPU=`mpstat -a 1 5 | tail -1 | awk '{print $(NF-1)}'` + +fi + +if [ "$OSNAME" = "Linux" ] +then + + IDLECPU=`mpstat 5 1 | tail -1 | awk '{print $NF}' | sed -e s/,/\./g` + +fi + +if [ "$OSNAME" = "HP-UX" ] +then + + IDLECPU=`iostat -t | tail +3 | head -1 | awk '{print $NF}'` + +fi + +USEDCPU=`echo "scale=2; 100 - $IDLECPU" | bc` + +echo $USEDCPU + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskAvgQueueLength_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskAvgQueueLength_UNIX_v1r1.sh new file mode 100644 index 0000000000..41ccf687f7 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskAvgQueueLength_UNIX_v1r1.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [[ "$OS_NAME" = "HP-UX" || "$OS_NAME" = "AIX" ]] +then + + DISKCOUNT=`sar -d 5 | tail +5 | grep "." | wc -l` + DISKQUEUELENGTHS=`sar -d 5 | tail +5 | awk '{print $4}' | grep "." | tr "," "." | sort -n` +fi + +if [ "$OS_NAME" = "SunOS" ] +then + DISKCOUNT=`iostat -dx | grep -v device | wc -l` + DISKQUEUELENGTHS=`iostat -dx | grep -v device | awk '{print $(NF-4)}'` +fi + +if [ "$OS_NAME" = "Linux" ] +then + + DISKCOUNT=`iostat -dx 1 5 | tac | grep Device -m 1 -B 200 | grep -v Device | tail -n +2 | wc -l` + DISKQUEUELENGTHS=`iostat -dx 1 5 | tac | grep Device -m 1 -B 200 | grep -v Device | tail -n +2 | awk '{print $(NF-3)}' | sed -e s/,/\./g` + +fi + +for line in $DISKQUEUELENGTHS +do + if [ "$AVGDISKQUEUELENGTH" = "" ] + then + AVGDISKQUEUELENGTH=$line + else + AVGDISKQUEUELENGTH=`echo "$AVGDISKQUEUELENGTH + $line" | bc` + fi + +done + +echo "scale=2; $AVGDISKQUEUELENGTH / $DISKCOUNT" | bc diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskPhysIORate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskPhysIORate_UNIX_v1r1.sh new file mode 100644 index 0000000000..3c0616cdb1 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskPhysIORate_UNIX_v1r1.sh @@ -0,0 +1,84 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [[ "$OS_NAME" = "HP-UX" || "$OS_NAME" = "AIX" ]] +then + + DISKCOUNT=`sar -d 5 | tail +5 | grep "." | wc -l` + RW_IOS_COMMAND=`sar -d 5 | tail +5 | grep "." | awk '{print $5}' | tr "," "."` + + for line in $RW_IOS_COMMAND + do + + if [ "$RW_IOS" = "" ] + then + + RW_IOS=$line + + else + + RW_IOS=`echo "$RW_IOS + $line" | bc` + + fi + + done + + FINAL_RW_IOS=`echo "scale=2; $RW_IOS / $DISKCOUNT" | bc` + +fi + +if [ "$OS_NAME" = "SunOS" ] +then + + READ_IOS_COMMAND=`kstat sd | grep reads | awk '{print $NF}'` + WRITE_IOS_COMMAND=`kstat sd | grep writes | awk '{print $NF}'` + + for line in $READ_IOS_COMMAND + do + if [ "$READ_IOS" = "" ] + then + + READ_IOS=$line + + else + + READ_IOS=`echo "$READ_IOS + $line" | bc` + + fi + + done + + for linea in $WRITE_IOS_COMMAND + do + if [ "$WRITE_IOS" = "" ] + then + + WRITE_IOS=$linea + + else + + WRITE_IOS=`echo "$WRITE_IOS + $linea" | bc` + + fi + + done + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + READ_IOS=`vmstat -D | grep "merged reads" | awk '{print $1}'` + WRITE_IOS=`vmstat -D | grep "merged writes" | awk '{print $1}'` + +fi + +if [[ "$OS_NAME" = "Linux" || "$OS_NAME" = "SunOS" ]] +then + + FINAL_RW_IOS=`echo "$READ_IOS + $WRITE_IOS" | bc` + +fi + +echo $FINAL_RW_IOS diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskUsagePeak_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskUsagePeak_UNIX_v1r1.sh new file mode 100644 index 0000000000..65e4b5d7ea --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_DiskUsagePeak_UNIX_v1r1.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +OS_NAME=`uname -a | awk '{print $1}'` + +if [ "$OS_NAME" = "AIX" ] +then + + USEDDISK=`iostat -d 1 5 | tail +3 | awk '{print $2}' | tr "," "." | sort -n | tail -1` + +fi + +if [ "$OS_NAME" = "HP-UX" ] +then + + DISKCOUNT=`sar -d 5 | tail +5 | wc -l` + USEDDISK=`sar -d 5 | tail +5 | awk '{print $3}' | sort -n | tail -1` + +fi + +if [ "$OS_NAME" = "SunOS" ] +then + + USEDDISK=`iostat -Dr 1 5 | tail -1 | tr "," "\n" | grep "\." | sort -n | tail -1` + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + USEDDISK=`iostat -dx | tail -n +4 | awk '{print $NF}' | sed -e s/,/\./g | sort -n | tail -1` + +fi + +echo $USEDDISK + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NFSCallRate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NFSCallRate_UNIX_v1r1.sh new file mode 100644 index 0000000000..6d0a7a2222 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NFSCallRate_UNIX_v1r1.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [[ "$OS_NAME" = "HP-UX" || "$OS_NAME" = "AIX" ]] +then + + NFSCOMMAND=`nfsstat | grep Version | awk '{print $(NF-1)}' | tr -d "\("` + +fi + +if [ "$OS_NAME" = "SunOS" ] +then + + NFSCOMMAND=`kstat -m nfs -s calls | grep calls | awk '{print $NF}'` + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + NFSCOMMAND=`nfsstat | grep -v r | grep "." | awk '{print $1}'` + +fi + +for line in $NFSCOMMAND +do + if [ "$NFSCALLS" = "" ] + then + NFSCALLS=$line + else + NFSCALLS=`echo "$NFSCALLS + $line" | bc` + fi +done + +echo $NFSCALLS + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetColPct_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetColPct_UNIX_v1r1.sh new file mode 100644 index 0000000000..43bad61592 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetColPct_UNIX_v1r1.sh @@ -0,0 +1,113 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [ "$OS_NAME" = "HP-UX" ] +then + + COMANDOCOUNT=`netstat -i | tail +2 | grep "." | grep -v lo | awk '{print $NF}' | wc -l` + COLISIONS=0 + COUNT=0 + + while [ "$COUNT" -lt "$COMANDOCOUNT" ] + do + + for i in `echo lan ppa $COUNT display quit | /usr/sbin/lanadmin -t 2> /dev/null | grep -i collision | cut -d= -f2` + do + COLISIONS=`echo "$COLISIONS + $i" | bc` + done + + COUNT=`echo "$COUNT + 1" | bc` + + done + + COMANDO=`netstat -i | tail +2 | grep "." | grep -v lo | awk '{print $NF}' | sort -n` + +fi + +if [ "$OS_NAME" = "SunOS" ] +then + COMANDO=`netstat -i | tail +2 | grep "." | awk '{print $(NF-3)}' | sort -n` + + COLISIONS=`netstat -i | tail +2 | grep "." | awk '{print $(NF-1)}' | sort -n` +fi + +if [ "$OS_NAME" = "AIX" ] +then + COMANDO=`netstat -i | tail +2 | grep "." | awk '{print $(NF-2)}' | sort -n` + + COLISIONS=`netstat -i | tail +2 | grep "." | awk '{print $NF}' | sort -n` + + for line in $COMANDO + do + if [ "$PKTVALUE" = "" ] + then + PKTVALUE=$line + PKTCHECK=$line + else + if [ "$line" != "$PKTCHECK" ] + then + PKTVALUE=`echo "$PKTVALUE + $line" | bc` + PKTCHECK=$line + fi + fi + done + + for linea in $COLISIONS + do + if [ "$PKTVALUEF" = "" ] + then + PKTVALUEF=$linea + PKTCHECKF=$linea + else + if [ "$line" != "$PKTCHECKF" ] + then + PKTVALUEF=`echo "$PKTVALUEF + $linea" | bc` + PKTCHECKF=$linea + fi + fi + done + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + COMANDO=`ifconfig -a | grep TX | awk '{print $2}' | awk -F ":" '{print $NF}' | sort -n` + + COLISIONS=`ifconfig -a | grep col | awk '{print $1}' | awk -F ":" '{print $NF}' | sort -n` +fi + +if [ "$OS_NAME" != "AIX" ] +then + + for line in $COMANDO + do + if [ "$PKTVALUE" = "" ] + then + PKTVALUE=$line + else + PKTVALUE=`echo "$PKTVALUE + $line" | bc` + fi + done + + #COMANDOB=`ifconfig lo | grep error | awk '{print $2}' | awk -F ":" '{print $NF}'` + + for linea in $COLISIONS + do + if [ "$PKTVALUEF" = "" ] + then + PKTVALUEF=$linea + else + PKTVALUEF=`echo "$PKTVALUEF + $linea" | bc` + fi + done + +fi + +PKTTOTALVALUE=`echo "$PKTVALUE + $PKTVALUEF" | bc` + +PKTCOLPCT=`echo "scale=2; $PKTVALUEF * 100 / $PKTTOTALVALUE" | bc` + +echo $PKTCOLPCT + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetOutQueueLength_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetOutQueueLength_UNIX_v1r1.sh new file mode 100644 index 0000000000..9ece040c40 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetOutQueueLength_UNIX_v1r1.sh @@ -0,0 +1,71 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [ "$OS_NAME" = "AIX" ] +then + + IFLIST=`ifconfig -a | grep ":" | grep -v inet6 | grep -v lo | awk -F ":" '{print $1}'` + OUTQUEUELENGTH=0 + + for line in $IFLIST + do + OUTQUEUELENGTHCOMMAND=`entstat $line | grep "Transmit Queue Length" | grep "S" | awk '{print $NF}'` + OUTQUEUELENGTH=`echo "$OUTQUEUELENGTH + $OUTQUEUELENGTHCOMMAND" | bc` + done + +fi + +if [ "$OS_NAME" = "HP-UX" ] +then + + COMANDOCOUNT=`netstat -i | tail +2 | grep "." | grep -v lo | awk '{print $NF}' | wc -l` + OUTQUEUELENGTH=0 + COUNT=0 + + while [ "$COUNT" -lt "$COMANDOCOUNT" ] + do + + for i in `echo lan ppa $COUNT display quit | /usr/sbin/lanadmin -t 2> /dev/null | grep -i "Outbound queue length" | cut -d= -f2` + do + OUTQUEUELENGTH=`echo "$OUTQUEUELENGTH + $i" | bc` + done + + COUNT=`echo "$COUNT + 1" | bc` + + done + +fi + +if [ "$OS_NAME" = "SunOS" ] +then + OUTQUEUELENGTH=`netstat -i | tail +2 | grep "." | awk '{print $NF}'` +fi + +if [ "$OS_NAME" = "Linux" ] +then + + OUTQUEUELENGTH=`ifconfig -a | grep col | awk '{print $NF}' | awk -F ":" '{print $NF}'` + +fi + +if [ "$OS_NAME" != "AIX" ] +then + + for line in $OUTQUEUELENGTH + do + if [ "$OUTQUEUELENGTHF" = "" ] + then + OUTQUEUELENGTHF=$line + else + OUTQUEUELENGTHF=`echo "$OUTQUEUELENGTHF + $line" | bc` + fi + done + +else + OUTQUEUELENGTHF=$OUTQUEUELENGTH + +fi + +echo $OUTQUEUELENGTHF + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetPktRate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetPktRate_UNIX_v1r1.sh new file mode 100644 index 0000000000..70cab7b0a8 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_NetPktRate_UNIX_v1r1.sh @@ -0,0 +1,84 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [ "$OS_NAME" = "AIX" ] +then + + COMANDO=`netstat -i | tail +2 | grep -v lo | grep "." | awk '{print $(NF-2)"\n"$(NF-3)}' | sort -n` + +fi + +if [ "$OS_NAME" = "HP-UX" ] +then + + COMANDO=`netstat -i | tail +2 | grep -v lo | grep "." | awk '{print $NF"\n"$(NF-1)}' | sort -n` + +fi + +if [ "$OS_NAME" = "SunOS" ] +then + + COMANDO=`netstat -i | tail +2 | grep -v loopback | grep "." | awk '{print $(NF-3)"\n"$(NF-5)}' | sort -n` + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + COMANDO=`ifconfig -a | grep error | awk '{print $2}' | awk -F ":" '{print $NF}' | sort -n` + COMANDOB=`ifconfig lo | grep error | awk '{print $2}' | awk -F ":" '{print $NF}' | sort -n` + +fi + +for line in $COMANDO +do + if [ "$PKTVALUE" = "" ] + then + PKTVALUE=$line + PKTCHECK=$line + else + if [ "$line" != "$PKTCHECK" ] + then + PKTVALUE=`echo "$PKTVALUE + $line" | bc` + PKTCHECK=$line + fi + fi +done + +if [ "$OS_NAME" = "Linux" ] +then + + for linea in $COMANDOB + do + if [ "$PKTVALUEF" = "" ] + then + PKTVALUEF=$linea + PKTCHECKF=$linea + else + if [ "$linea" != "$PKTCHECKF" ] + then + PKTVALUEF=`echo "$PKTVALUEF + $linea" | bc` + PKTCHECKF=$linea + fi + fi + done + +fi + +if [[ "$OS_NAME" = "SunOS" || "$OS_NAME" = "HP-UX" || "$OS_NAME" = "AIX" ]] +then + + PKTREALVALUE=$PKTVALUE + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + PKTREALVALUE=`echo "$PKTVALUE - $PKTVALUEF" | bc` + +fi + +echo $PKTREALVALUE + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageOutByteRate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageOutByteRate_UNIX_v1r1.sh new file mode 100644 index 0000000000..be3d6cf5e4 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageOutByteRate_UNIX_v1r1.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +OS_NAME=`uname` +PAGESIZE=`getconf PAGESIZE` + +UNIT=$1 + +if [ "$UNIT" = "K" ] +then + + PAGESOUT=`vmstat -s | grep "pages paged out" | awk '{print $1}'` + PAGESIZEUNIT=`echo "scale=4; $PAGESIZE / 1024" | bc` + +fi + +if [ "$UNIT" = "M" ] +then + + PAGESOUT=`vmstat -s -S $UNIT | grep "pages paged out" | awk '{print $1}'` + PAGESIZEUNIT=`echo "scale=4; $PAGESIZE / 1024 / 1024" | bc` + +fi + + +echo "$PAGESOUT * $PAGESIZEUNIT" | bc + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageOutRate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageOutRate_UNIX_v1r1.sh new file mode 100644 index 0000000000..12ee4846b7 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageOutRate_UNIX_v1r1.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +PAGESOUT=`vmstat -s | grep "pages paged out" | awk '{print $1}'` + +echo $PAGESOUT + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageRqRate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageRqRate_UNIX_v1r1.sh new file mode 100644 index 0000000000..50bc826c1f --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageRqRate_UNIX_v1r1.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +PAGESOUT=`vmstat -s | grep "pages paged out" | awk '{print $1}'` +PAGESIN=`vmstat -s | grep "pages paged in" | awk '{print $1}'` + +echo "$PAGESOUT + $PAGESIN" | bc + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageScanRate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageScanRate_UNIX_v1r1.sh new file mode 100644 index 0000000000..dd4450dc74 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_PageScanRate_UNIX_v1r1.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [ "$OS_NAME" = "HP-UX" ] +then + + PAGESCANRATE=`vmstat -s | grep "pages scanned for page out" | awk '{print $1}'` + +fi + +if [ "$OS_NAME" = "AIX" ] +then + + PAGESCANRATE=`vmstat -s | grep "pages examined by clock" | awk '{print $1}'` + +fi + +if [ "$OS_NAME" = "SunOS" ] +then + + PAGESCANRATE=`vmstat -s | grep "pages examined by the clock daemon" | awk '{print $1}'` + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + PAGESCANRATE=`grep -R "pgscan_kswapd_normal" /proc/vmstat | awk '{print $NF}'` + +fi + +echo $PAGESCANRATE diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_RunQueue_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_RunQueue_UNIX_v1r1.sh new file mode 100644 index 0000000000..1bab466cc6 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_RunQueue_UNIX_v1r1.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +LOADAVG1MINORIGINAL=`uptime | awk '{print $(NF-2)}'` + +LOADAVGCHECK=`echo "$LOADAVG1MINORIGINAL" | grep "\." | wc -l | awk '{print $1}'` + +if [ "$LOADAVGCHECK" = "0" ] +then + + LOADAVG1MIN=`echo "$LOADAVG1MINORIGINAL" | awk -F "," '{print $1"."$2}'` + +else + + LOADAVG1MIN=`echo "$LOADAVG1MINORIGINAL" | tr -d ","` + +fi + +echo $LOADAVG1MIN + diff --git a/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_SwapOutRate_UNIX_v1r1.sh b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_SwapOutRate_UNIX_v1r1.sh new file mode 100644 index 0000000000..ee1bdb4189 --- /dev/null +++ b/pandora_plugins/OVPA/UNIX/Modules/OVPA/Pandora_Script_Perf_SwapOutRate_UNIX_v1r1.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +OS_NAME=`uname` + +if [ "$OS_NAME" = "AIX" ] +then + + USEDSWAP=`vmstat -s | grep "pages out" | awk '{print $1}'` + +fi + +if [[ "$OS_NAME" = "SunOS" || "$OS_NAME" = "HP-UX" ]] +then + + USEDSWAP=`vmstat -s | grep "swap outs" | awk '{print $1}'` + +fi + +if [ "$OS_NAME" = "Linux" ] +then + + UNIT=$1 + + if [ ! $1 ] + then + + USEDSWAP=`vmstat -s | grep "used swap" | awk '{print $1}'` + + else + + USEDSWAP=`vmstat -s -S $UNIT | grep "used swap" | awk '{print $1}'` + + fi + +fi + + +echo $USEDSWAP + diff --git a/pandora_plugins/OpenLDAP/Ldap entry/check_ldap_dn.pl b/pandora_plugins/OpenLDAP/Ldap entry/check_ldap_dn.pl new file mode 100644 index 0000000000..6573009eaf --- /dev/null +++ b/pandora_plugins/OpenLDAP/Ldap entry/check_ldap_dn.pl @@ -0,0 +1,117 @@ +#!/usr/bin/perl -w +#-------------------------------------------------------------------- +# Plugin server designed for PandoraFMS (www.pandorafms.org) +# Checks if a DN is in an LDAP Server +# +# Copyright (C) 2013 mario.pulido@artica.es +#-------------------------------------------------------------------- + +use strict; +use Net::LDAP; +use Getopt::Std; + +#-------------------------------------------------------------------- +# Global parameters +#-------------------------------------------------------------------- +my ( $host, $port, $binddn, $bindpw, $dn ) = &options; +my $timeout = 5; +my $version = 3; + +#-------------------------------------------------------------------- +# Main program +#-------------------------------------------------------------------- + +main(); + +sub main { + + # LDAP Connection + + my $ldap = Net::LDAP->new( + $host, + port => $port, + version => $version, + timeout => $timeout + ); + + unless ($ldap) { + print "LDAP Critical : Pb with LDAP connection\n"; + } + + # Bind + + if ( $binddn && $bindpw ) { + + # Bind witch credentials + + my $req_bind = $ldap->bind( $binddn, password => $bindpw ); + + if ( $req_bind->code ) { + print "LDAP Unknown : Bind Error " + . $req_bind->code . " : " + . $req_bind->error . "\n"; + } + } + + else { + + # Bind anonymous + + my $req_bind = $ldap->bind(); + + if ( $req_bind->code ) { + print "LDAP Unknown : Bind Error " + . $req_bind->code . " : " + . $req_bind->error . "\n"; + } + } + + # Base Search + + my $req_search = $ldap->search( + base => $dn, + scope => 'base', + filter => 'objectClass=*', + attrs => ['1.1'] + ); + + if ( $req_search->code == 32 ) { + + # No such object Error + print "LDAP Critical : $dn not present\n"; + $ldap->unbind(); + } + + elsif ( $req_search->code ) { + print "LDAP Unknown : Search Error " + . $req_search->code . " : " + . $req_search->error . "\n"; + $ldap->unbind(); + } + + else { + print "OK\n"; + $ldap->unbind(); + } + +} + +sub options { + + # Get and check args + my %opts; + getopt( 'HpDWb', \%opts ); + &usage unless ( exists( $opts{"H"} ) ); + &usage unless ( exists( $opts{"b"} ) ); + $opts{"p"} = 389 unless ( exists( $opts{"p"} ) ); + $opts{"D"} = 0 unless ( exists( $opts{"D"} ) ); + $opts{"w"} = 0 unless ( exists( $opts{"W"} ) ); + return ( $opts{"H"}, $opts{"p"}, $opts{"D"}, $opts{"W"}, $opts{"b"} ); +} + +sub usage { + + # Print Help/Error message + print +"LDAP Unknown : Usage :\n$0 -H hostname [-p port] [-D binddn -W bindpw] -b dn\n"; +} diff --git a/pandora_plugins/OpenLDAP/Ldap entry/plugin_LDAP.pspz b/pandora_plugins/OpenLDAP/Ldap entry/plugin_LDAP.pspz new file mode 100644 index 0000000000..a9aa519873 Binary files /dev/null and b/pandora_plugins/OpenLDAP/Ldap entry/plugin_LDAP.pspz differ diff --git a/pandora_plugins/OpenLDAP/Ldap entry/plugin_definition.ini b/pandora_plugins/OpenLDAP/Ldap entry/plugin_definition.ini new file mode 100644 index 0000000000..5f0412d134 --- /dev/null +++ b/pandora_plugins/OpenLDAP/Ldap entry/plugin_definition.ini @@ -0,0 +1,32 @@ +[plugin_definition] +name = Check_ldap_query +filename = check_ldap_query.pl +description = This plugin execute remotely LDAP querys +timeout = 20 +ip_opt = -H +execution_command = perl +execution_postcommand = +user_opt = -u +port_opt = +pass_opt = -P +plugin_type = 0 +total_modules_provided = 1 +[module1] +name = Ldap Query +description = Counts entries returned from LDAP query +id_group = 1 +type = 1 +max = 0 +min = 0 +module_interval = 300 +id_module_group = 1 +id_modulo = 4 +plugin_user = root +plugin_pass = +plugin_parameter = +max_timeout = 20 +history_data = 1 +min_warning = 0 +min_critical = 0 +min_ff_event = 0 +tcp_port = 0 diff --git a/pandora_plugins/OpenLDAP/Query ldap/check_ldap_query.pl b/pandora_plugins/OpenLDAP/Query ldap/check_ldap_query.pl new file mode 100644 index 0000000000..547f20987f --- /dev/null +++ b/pandora_plugins/OpenLDAP/Query ldap/check_ldap_query.pl @@ -0,0 +1,242 @@ +#! /usr/bin/perl -w +#--------------------------------------------------------------------------- +# Check LDAP query server plugin Pandora FMS +# +# Request an LDAP server and count entries returned +# Artica ST +# Copyright (C) 2013 mario.pulido@artica.es +# +# License: GPLv2+ +#--------------------------------------------------------------------------- +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# GPL License: http://www.gnu.org/licenses/gpl.txt +#--------------------------------------------------------------------------- + +my $VERSION = 'v1r1'; +#--------------------------------------------------------------------------- +# Modules +#--------------------------------------------------------------------------- +use strict; +use Getopt::Long; +&Getopt::Long::config('bundling'); +use File::Basename; +use Net::LDAP; + +#--------------------------------------------------------------------------- +# Options +#--------------------------------------------------------------------------- +my $progname = basename($0); +my $help; +my $version; +my $verbose = 0; +my $host; +my $authentication; +my $log_file; +my $name; +my $port; +my $regexp; +my $eregexp; +my $exclude; +my $minute = 60; +my $url; + + +# For LDAP plugins +my $ldap_binddn; +my $ldap_bindpw; +my $ldap_filter; +my $ldap_base; +my $ldap_scope; + +GetOptions( + 'h' => \$help, + 'help' => \$help, + 'v+' => \$verbose, + 'verbose+' => \$verbose, + 'H:s' => \$host, + 'host:s' => \$host, + 'p:i' => \$port, + 'port:i' => \$port, + 'u:s' => \$ldap_binddn, + 'binddn:s' => \$ldap_binddn, + 'P:s' => \$ldap_bindpw, + 'bindpw:s' => \$ldap_bindpw, + 'Q:s' => \$ldap_filter, + 'filter:s' => \$ldap_filter, + 'b:s' => \$ldap_base, + 'base:s' => \$ldap_base, + 's:s' => \$ldap_scope, + 'scope:s' => \$ldap_scope, +); + + +#--------------------------------------------------------------------------- +# Functions +#--------------------------------------------------------------------------- + +# DEBUG function +sub verbose { + my $output_code = shift; + my $text = shift; + if ( $verbose >= $output_code ) { + printf "VERBOSE $output_code ===> %s\n", $text; + } +} + +# check if -H -b and -F is used +sub check_host_param { + if ( !defined($host)) { + + print "-H, --host=STRING\n"; + print "\tIP or name (FQDN) of the directory. You can use URI (ldap://, ldaps://, ldap+tls://)\n"; + print "-p, --port=INTEGER\n"; + print "\tDirectory port to connect to.\n"; + print "-u, --binddn=STRING\n"; + print "\tBind DN. Bind anonymous if not present.\n"; + print "-P, --bindpw=STRING\n"; + print "\tBind passwd. Need the Bind DN option to work.\n"; + print "-Q, --filter=STRING\n"; + print "\tLDAP search filter.\n"; + print "-b, --base=STRING\n"; + print "\tLDAP search base.\n"; + print "-s, --scope=STRING\n"; + print "\tLDAP search scope\n"; + print "\n"; + + print "Version=$VERSION"; + } +} + + +# Bind to LDAP server +sub get_ldapconn { + &verbose( '3', "Enter &get_ldapconn" ); + my ( $server, $binddn, $bindpw ) = @_; + my ( $useTls, $tlsParam ); + + # Manage ldap+tls:// URI + if ( $server =~ m{^ldap\+tls://([^/]+)/?\??(.*)$} ) { + $useTls = 1; + $server = $1; + $tlsParam = $2 || ""; + } + else { + $useTls = 0; + } + + my $ldap = Net::LDAP->new( $server ); + + return ('1') unless ($ldap); + &verbose( '2', "Connected to $server" ); + + if ($useTls) { + my %h = split( /[&=]/, $tlsParam ); + my $message = $ldap->start_tls(%h); + $message->code + && &verbose( '1', $message->error ) + && return ( $message->code, $message->error ); + &verbose( '2', "startTLS succeed on $server" ); + } + + if ( $binddn && $bindpw ) { + + # Bind witch credentials + my $req_bind = $ldap->bind( $binddn, password => $bindpw ); + $req_bind->code + && &verbose( '1', $req_bind->error ) + && return ( $req_bind->code, $req_bind->error ); + &verbose( '2', "Bind with $binddn" ); + } + else { + my $req_bind = $ldap->bind(); + $req_bind->code + && &verbose( '1', $req_bind->error ) + && return ( $req_bind->code, $req_bind->error ); + &verbose( '2', "Bind anonym" ); + } + &verbose( '3', "Leave &get_ldapconn" ); + return ( '0', $ldap ); +} + +# Get the master URI from cn=monitor +sub get_entries { + &verbose( '3', "Enter &get_entries" ); + my ( $ldapconn, $base, $scope, $filter ) = @_; + my $message; + my $count; + $message = $ldapconn->search( + base => $base, + scope => $scope, + filter => $filter, + attrs => ['1.1'] + ); + $message->code + && &verbose( '1', $message->error ) + && return ( $message->code, $message->error ); + $count = $message->count(); + &verbose( '2', "Found $count entries" ); + &verbose( '3', "Leave &get_entries" ); + return ( 0, $count ); +} + +#--------------------------------------------------------------------------- +# Main +#--------------------------------------------------------------------------- + +# Options checks +&check_host_param(); +#&check_base_param(); + +# Default values +#$ldap_filter ||= "(objectClass=*)"; +$ldap_scope ||= "sub"; + +my $errorcode; + +# Connect to the directory +# If $host is an URI, use it directly +my $ldap_uri; +if ( $host =~ m#ldap(\+tls)?(s)?://.*# ) { + $ldap_uri = $host; + $ldap_uri .= ":$port" if ( $port and $host !~ m#:(\d)+# ); +} +else { + $ldap_uri = "ldap://$host"; + $ldap_uri .= ":$port" if $port; +} + +my $ldap_server; +( $errorcode, $ldap_server ) = + &get_ldapconn( $ldap_uri, $ldap_binddn, $ldap_bindpw ); +if ($errorcode) { + print "Can't connect to $ldap_uri.\n"; +} + +# Request LDAP +my $nb_entries; +( $errorcode, $nb_entries ) = + &get_entries( $ldap_server, $ldap_base, $ldap_scope, $ldap_filter ); +if ($errorcode) { + print "0\n"; +} + +#--------------------------------------------------------------------------- +# Exit +#--------------------------------------------------------------------------- + +# Print $nb_entries and exit +print "$nb_entries\n"; +exit; + + + + diff --git a/pandora_plugins/OpenLDAP/Query ldap/plugin_QueryLDAP_v1r1.pspz b/pandora_plugins/OpenLDAP/Query ldap/plugin_QueryLDAP_v1r1.pspz new file mode 100644 index 0000000000..85f83849c1 Binary files /dev/null and b/pandora_plugins/OpenLDAP/Query ldap/plugin_QueryLDAP_v1r1.pspz differ diff --git a/pandora_plugins/Pandora Mail transfer daemon/Pandora Mail Transfer ENG.txt b/pandora_plugins/Pandora Mail transfer daemon/Pandora Mail Transfer ENG.txt new file mode 100644 index 0000000000..df9f70dc04 --- /dev/null +++ b/pandora_plugins/Pandora Mail transfer daemon/Pandora Mail Transfer ENG.txt @@ -0,0 +1,89 @@ + +Pandora Mail Transfer + + + + + +Pandora Mail Transfer + +OpenOffice/PDF Version +1st Edition , 3 May 2011 + + +© Artica Soluciones Tecnológicas 2005-2011 +© Juan Manuel Ramon +© Javier Lanz + +1 Description +Pandora Mail Transfer is a tool for sending and receiving xml files via email. +This script sends through a SMTP server, to the desired address, an email with an attached file. +Is able as well to fetch via POP3 that mail and its attached file. +It's designed to be used with an specific email account, so every time the script is called in “receive” mode, all emails on that account will be deleted. Do not use this script in a personal account because all your emails will be deleted. +This script is designed to send only text files, no binary files. +It's only possible to send .data, .txt, or .xml files. +2 Requisites +In order to be able to use this application, it's a must having the following Perl's CPAN packages installed in your system: +Mail::POP3Client +MIME::Parser +Authen::SASL +Net::SMTP; +To install these libraries with CPAN, for example Mail::POP3Client: +cpan install Mail::POP3Client +cpan install MIME::Parser +cpan install Authen::SASL + +To use the program under Windows, you will need to compile with a compiler like ActiveState PERL. The ActiveState environment allows as well to install CPAN modules easily. +Previous the script execution, it's a must having a configuration file, in which the mail server connection parameters will be defined. +Below it's shown a configuration file example, in which the necessary fields for the proper use of the mail transfer script are detailed. + +Sample configuration file +========================= +########################################### +### SMTP DATA +########################################### + +smtp_user username@domain.com +smtp_pass pass +smtp_hostname mailserver.domain.com +########################################### +### POP3 DATA +########################################### +pop3_user username@domain.com +pop3_pass pass +pop3_hostname mailserver.domain.com +# Enable or disable SSL. 1 means Enabled , 0 Disabled +pop3_ssl 0 +# SSL port +pop3_ssl_port 995 +########################################### +### TO SEND INFO +########################################### +# Email receiver where to send the email +receiver_email desired.mail@domain.com +########################################### +### PATH TO SAVE THE ATTACHED FILE +########################################### +# Desired path where the attached file will be stored +pathtosave /path/to/save/attached/file + + +3 Pandora mail transfer execution +The proper way of executing the script should be according to... +./mail_transfer [file_to_send] + +Where the meaning of the fields are: + could be 'send' or 'receive' + configuration file, explained above, contains every necessary data for sending and receiving emails. +[file_to_send] desired xml file to send (Only necessary in case of action = 'send') +Execution examples: +./mail_transfer send config_file.conf textfile.txt + +./mail_transfer receive config_file.conf + +4 Restrictions +4.1. SSL Protocol +In this first version, SSL protocol is only implemented for the mail reception, not for sending. +Another related SSL Protocol restriction is the email erasing once read and downloaded to disk. In case of using SSL, deleting is not possible, on the other hand, if it's not used, the read mail will be properly deleted from the server once download to disk. +4.2. Attached file +There is a wee bug not fixed yet about the attached file name. If this one contains special characters such as '(' ')' '\' and more, while downloading from the server, it will be saved to disk with a different file name, probably wrong, although its content will be the right one. Thus, it's recommended not to use special characters in the file name. diff --git a/pandora_plugins/Pandora Mail transfer daemon/config_file.conf b/pandora_plugins/Pandora Mail transfer daemon/config_file.conf new file mode 100644 index 0000000000..6169ee2a77 --- /dev/null +++ b/pandora_plugins/Pandora Mail transfer daemon/config_file.conf @@ -0,0 +1,33 @@ +########################################### +### SMTP DATA +########################################### + +smtp_user devtest@artica.es +smtp_pass pass1212 +smtp_hostname mail.artica.es + +########################################### +### POP3 DATA +########################################### + +pop3_user devtest@artica.es +pop3_pass pass1212 +pop3_hostname mail.artica.es + +# Enable or disable SSL. 1 means Enabled, 0 Disabled +pop3_ssl 0 + +# SSL port +pop3_ssl_port 995 + +########################################### +### TO SEND INFO +########################################### +# Email receiver where to send the email +receiver_email devtest@artica.es + +########################################### +### PATH TO SAVE THE ATTACHED FILE +########################################### +# Desired path where the attached file will be stored +pathtosave /tmp/ diff --git a/pandora_plugins/Pandora Mail transfer daemon/mail_transfer.pl b/pandora_plugins/Pandora Mail transfer daemon/mail_transfer.pl new file mode 100644 index 0000000000..0efa048508 --- /dev/null +++ b/pandora_plugins/Pandora Mail transfer daemon/mail_transfer.pl @@ -0,0 +1,318 @@ +#!/usr/bin/perl +########################################################################## +# Pandora FMS Mail Transfer +# This is a tool for transfering Pandora FMS data files by mail (SMTP/POP) +########################################################################## +# Copyright (c) 2011 Artica Soluciones Tecnologicas S.L +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; version 2 +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +########################################################################## + +use strict; +use warnings; +use Net::SMTP; +use Mail::POP3Client; +use MIME::Parser; +$| = 1; + +# GLOBAL VARIABLES + +my $boundary='frontier'; + +####### FUNCTIONS ####### + +######################################################################## +## SUB check_args +## Checks the command line arguments given at the function call. +######################################################################## +sub check_args(){ + my $num_args = $#ARGV + 1; + my $action = $ARGV[0]; + my $conf_file = $ARGV[1]; + my $filename = $ARGV[2]; + my $error = "Usage: mail_transfer.pl {send|receive conf_file [FILE]}\n"; + my $error_conf_file = "conf_file does not exist or is not readable\n"; + my $error_filename = "File to send does not exist or is not readable\n"; + + if (($num_args < 2) || (($action ne "send") && ($action ne "receive"))) { + die $error; + } elsif ((!(-e $conf_file)) || (!(-r $conf_file))) { + die $error_conf_file; + } elsif (($action eq "send") && ((!(-e $filename)) || (!(-r $filename)))) { + die $error_filename; + } +} + +######################################################################## +## SUB parse_conf +## Reads the entire conf file and stores all the information given +######################################################################## +sub parse_conf ($$) { + + my $conf_file = $_[0]; + my $conf_hash = $_[1]; + + open (CONF, $conf_file); + my $line; + + while () + { + $line = $_; + # Get the smtp user + if ($line =~ /^smtp_user\s([a-zA-Z0-9\.\_\-\@]+)/) { + $conf_hash -> {smtp_user} = $1; + } + # Get the smtp pass + elsif ($line =~ /^smtp_pass\s(.+)/) { + $conf_hash -> {smtp_pass} = $1; + } + # Get the smtp hostname + elsif ($line =~ /^smtp_hostname\s([a-zA-Z0-9\.\_\-\@]+)/) { + $conf_hash -> {smtp_hostname} = $1; + } + # Get the pop3 user + elsif ($line =~ /^pop3_user\s([a-zA-Z0-9\.\_\-\@]+)/) { + $conf_hash -> {pop3_user} = $1; + } + # Get the pop3 pass + elsif ($line =~ /^pop3_pass\s(.+)/) { + $conf_hash -> {pop3_pass} = $1; + } + # Get the pop3 hostname + elsif ($line =~ /^pop3_hostname\s([a-zA-Z0-9\.\_\-\@]+)/) { + $conf_hash -> {pop3_hostname} = $1; + } + # Get the pop3 ssl flag to know if it's enabled or not + elsif ($line =~ /^pop3_ssl\s(0|1)/) { + $conf_hash -> {pop3_ssl} = $1; + } + # Get the pop3 ssl port + elsif ($line =~ /^pop3_ssl_port\s([0-9]{1,5})/) { + $conf_hash -> {pop3_ssl_port} = $1; + } + # Get the path where to save the attached file + elsif ($line =~ /^pathtosave\s(.+)/) { + $conf_hash -> {pathtosave} = $1; + } + # Get the receiver's email where to send the attached file + elsif ($line =~ /^receiver_email\s([a-zA-Z0-9\.\_\-\@]+)/) { + $conf_hash -> {receiver_email} = $1; + } + } + close CONF; +} + +######################################################################## +## SUB send_mail +## Sends an attachement file via email using smtp +######################################################################## +sub send_mail($) { + + my $conf_hash = $_[0]; + my $smtp; + my $attachment = $conf_hash -> {filename}; + + # Get the filename in case the full path was given + # Split the full path with '/', the last item will be the filename + my @file_path = split ('/', $attachment); + + # Get the array's last position with '-1' index + my $attach_file = $file_path[-1]; + + my $host = $conf_hash -> {smtp_hostname}; + my $from = $conf_hash -> {smtp_user}; + my $password = $conf_hash -> {smtp_pass}; + my $to = $conf_hash -> {receiver_email}; + + open(DATA, $attachment) || die("mail_transfer.pl: ERROR: Could not open the file $attach_file"); + my @xml = ; + close(DATA); + + $smtp = Net::SMTP->new($host, + Hello => $host, + Timeout => 30, + Debug => 0, + ) || die("mail_trasfer.pl: ERROR: Could not connect to $host"); + + $smtp->auth($from, $password); + $smtp->mail($from); + $smtp->to($to); + $smtp->data(); + $smtp->datasend("To: $to\n"); + $smtp->datasend("From: $from\n"); + $smtp->datasend("Subject: Pandora mail transfer\n"); + $smtp->datasend("MIME-Version: 1.0\n"); + $smtp->datasend("Content-Type: application/text; name=" . $attach_file . "\n"); + $smtp->datasend("Content-Disposition: attachment; filename=" . $attach_file . "\n"); + $smtp->datasend("Content-type: multipart/mixed boundary=" . $boundary . "\n"); + $smtp->datasend("\n"); + $smtp->datasend("@xml\n"); + $smtp->dataend() || print "mail_transfer.pl: ERROR: Data end failed: $!"; + $smtp->quit; +} + +######################################################################## +## SUB receive_mail +## Fetch the last email with 'Pandora mail transfer' as subject and +## download the attached file into the specified folder +######################################################################## +sub receive_mail ($) { + + my $conf_hash = $_[0]; + my $user = $conf_hash -> {pop3_user}; + my $password = $conf_hash -> {pop3_pass}; + my $host = $conf_hash -> {pop3_hostname}; + my $ssl = $conf_hash -> {pop3_ssl}; + my $ssl_port = $conf_hash -> {pop3_ssl_port}; + my $pathtosave = $conf_hash -> {pathtosave}; + my $pop3; + + if ($ssl == 1){ + $pop3 = new Mail::POP3Client( + USER => $user, + PASSWORD => $password, + HOST => $host, + USESSL => 1, + PORT => $ssl_port, + DEBUG => 0 + ) or die "mail_transfer.pl: Connection failed\n"; + } else { + $pop3 = new Mail::POP3Client( + USER => $user, + PASSWORD => $password, + HOST => $host, + USESSL => 0, + PORT => 110, + DEBUG => 0 + ) or die "mail_transfer.pl: Connection failed\n"; + } + + my $tot_msg = $pop3->Count(); + + if ($tot_msg == 0){ + print "No more emails avalaible\n"; + return (0); # End program + } + elsif ($tot_msg eq '0E0'){ + print "No new emails available\n"; + return (0); + } + else{ + printf "There are $tot_msg messages \n\n"; + } + + # the list of valid file extensions. we do extensions, not + # mime-types, because they're easier to understand from + # an end-user perspective (no research is required). + + my $valid_exts = "txt xml data"; + my %msg_ids; # used to keep track of seen emails. + + # create a subdirectory if does not exist + #print "Using directory '$pathtosave' for newly downloaded files.\n"; + if (!(-d $pathtosave)) { + mkdir($pathtosave, 0777) or die "mail_transfer.pl: Error creating output directory\n"; + } + + # get the message to feed to MIME::Parser. + my $msg = $pop3->HeadAndBody($tot_msg); + my $header = $pop3->Head($tot_msg); + + if (($header !~ /Subject:\sPandora\smail\stransfer/) || ($header !~ /boundary=$boundary/)) { + print "Deleting message not valid\n"; + + # delete current email + $pop3->Delete($tot_msg); + + # clean up and close the connection. + $pop3->Close; + + return -1; + + } + + # create a MIME::Parser object to + # extract any attachments found within. + my $parser = new MIME::Parser; + + $parser->output_dir($pathtosave); + my $entity = $parser->parse_data($msg); + + # extract our mime parts and go through each one. + my @parts = $entity->parts; + + foreach my $part (@parts) { + + # determine the path to the file in question. + my $path = ($part->bodyhandle) ? $part->bodyhandle->path : undef; + + # move on if it's not defined, + # else figure out the extension. + next unless $path; + $path =~ /\w+\.([^.]+)$/; + my $ext = $1; + next unless $ext; + + # we continue only if our extension is correct. + my $continue; $continue++ if $valid_exts =~ /$ext/i; + + # delete the blasted thing. + unless ($valid_exts =~ /$ext/) { + print " Removing unwanted filetype ($ext): $path\n"; + unlink $path or print " > Error removing file at $path: $!."; + next; # move on to the next attachment or message. + } + + # a valid file type. yummy! + print " Keeping valid file: $path.\n"; + } + + # delete current email + $pop3->Delete($tot_msg); + + # clean up and close the connection. + $pop3->Close; +} + + +####### MAIN ####### + +# Check the given command line arguments +check_args(); + +# Once checked store them +my $action = $ARGV[0]; +my $conf_file = $ARGV[1]; +my $filename = $ARGV[2]; + +# If the action is 'send', store the 'file_to_send' +my %conf_hash; +if ($action eq "send") { + $conf_hash {filename} = $filename; +} + +# Parse the config file +parse_conf($conf_file, \%conf_hash); + +# Call 'send_mail' function in its case +if ($action eq "send") { + send_mail(\%conf_hash); +} + +# Or call the 'receive_mail' function. +my $returncode = 1; + +if ($action eq "receive") { + while ($returncode != 0) { + $returncode = receive_mail(\%conf_hash); + } +} diff --git a/pandora_plugins/PandoraFMS/pandorafms.pl b/pandora_plugins/PandoraFMS/pandorafms.pl new file mode 100644 index 0000000000..8a4d390c7e --- /dev/null +++ b/pandora_plugins/PandoraFMS/pandorafms.pl @@ -0,0 +1,256 @@ +#!/usr/bin/perl +# Pandora FMS server monitoring plugin + + +use strict; +use warnings; +use POSIX qw(strftime); +use PandoraFMS::DB; + +use constant DATASERVER => 0; +use Scalar::Util qw(looks_like_number); + + +my $RDBMS = "mysql"; + + +#### +# Erase blank spaces before and after the string +#################################################### +sub trim($){ + my $string = shift; + if (empty ($string)){ + return ""; + } + + chomp ($string); + return $string; +} + +##### +# Empty +################################### +sub empty($){ + my $str = shift; + + if (! (defined ($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + +##### +## General configuration file parser +## +## log=/PATH/TO/LOG/FILE +## +####################################### +sub parse_configuration($){ + my $conf_file = shift; + my %config; + + open (FILE,"<", "$conf_file") or return undef; + + while (){ + if (($_ =~ /^ *$/) + || ($_ =~ /^#/ )){ + # skip blank lines and comments + next; + } + my @parsed = split /\ /, $_, 2; + $config{trim($parsed[0])} = trim($parsed[1]); + } + close (FILE); + + return %config; +} + +sub disk_free ($) { + my $target = $_[0]; + + # Try to use df command with Posix parameters... + my $command = "df -k -P ".$target." | tail -1 | awk '{ print \$4/1024}'"; + my $output = trim(`$command`); + return $output; +} + +sub load_average { + my $load_average; + + my $OSNAME = $^O; + + if ($OSNAME eq "freebsd"){ + $load_average = ((split(/\s+/, `/sbin/sysctl -n vm.loadavg`))[1]); + } + # by default LINUX calls + else { + $load_average = `cat /proc/loadavg | awk '{ print \$1 }'`; + } + return trim($load_average); +} + + +sub free_mem { + my $free_mem; + + my $OSNAME = $^O; + + if ($OSNAME eq "freebsd"){ + my ($pages_free, $page_size) = `/sbin/sysctl -n vm.stats.vm.v_page_size vm.stats.vm.v_free_count`; + # in kilobytes + $free_mem = $pages_free * $page_size / 1024; + + } + elsif ($OSNAME eq "netbsd"){ + $free_mem = `cat /proc/meminfo | grep MemFree | awk '{ print \$2 }'`; + } + # by default LINUX calls + else { + $free_mem = `free | grep Mem | awk '{ print \$4 }'`; + } + return trim($free_mem); +} + +sub pandora_self_monitoring ($$) { + my ($pa_config, $dbh) = @_; + my $timezone_offset = 0; # PENDING (TODO) ! + my $utimestamp = time (); + my $timestamp = strftime ("%Y-%m-%d %H:%M:%S", localtime()); + + my $xml_output = ""; + + $xml_output .=" \n"; + $xml_output .=" Status\n"; + $xml_output .=" generic_proc\n"; + $xml_output .=" 1\n"; + $xml_output .=" \n"; + + my $load_average = load_average(); + $load_average = '' unless defined ($load_average); + my $free_mem = free_mem(); + $free_mem = '' unless defined ($free_mem); + my $free_disk_spool = disk_free ($pa_config->{"incomingdir"}); + $free_disk_spool = '' unless defined ($free_disk_spool); + my $my_data_server = trim(get_db_value ($dbh, "SELECT id_server FROM tserver WHERE server_type = ? AND name = '".$pa_config->{"servername"}."'", DATASERVER)); + + # Number of unknown agents + my $agents_unknown = 0; + if (defined ($my_data_server)) { + $agents_unknown = trim(get_db_value ($dbh, "SELECT COUNT(DISTINCT tagente_estado.id_agente) " + . "FROM tagente_estado, tagente, tagente_modulo " + . "WHERE tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente " + . "AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo " + . "AND tagente_modulo.disabled = 0 " + . "AND running_by = $my_data_server " + . " AND estado = 3")); + $agents_unknown = 0 if (!defined($agents_unknown)); + } + + my $queued_modules = trim(get_db_value ($dbh, "SELECT SUM(queued_modules) FROM tserver WHERE name = '".$pa_config->{"servername"}."'")); + + if (!defined($queued_modules)) { + $queued_modules = 0; + } + + my $dbmaintance; + if ($RDBMS eq 'postgresql') { + $dbmaintance = trim(get_db_value ($dbh, + "SELECT COUNT(*) " + . "FROM tconfig " + . "WHERE token = 'db_maintance' " + . "AND NULLIF(value, '')::int > UNIX_TIMESTAMP() - 86400")); + } + elsif ($RDBMS eq 'oracle') { + $dbmaintance = trim (get_db_value ($dbh, + "SELECT COUNT(*) " + . "FROM tconfig " + . "WHERE token = 'db_maintance' AND DBMS_LOB.substr(value, 100, 1) > UNIX_TIMESTAMP() - 86400")); + } + else { + $dbmaintance = trim (get_db_value ($dbh, + "SELECT COUNT(*)" + . "FROM tconfig " + . "WHERE token = 'db_maintance' AND value > UNIX_TIMESTAMP() - 86400")); + } + + + $xml_output .=" \n"; + $xml_output .=" Database Maintenance\n"; + $xml_output .=" generic_proc\n"; + $xml_output .=" $dbmaintance\n"; + $xml_output .=" \n"; + + $xml_output .=" \n"; + $xml_output .=" Queued_Modules\n"; + $xml_output .=" generic_data\n"; + $xml_output .=" $queued_modules\n"; + $xml_output .=" \n"; + + $xml_output .=" \n"; + $xml_output .=" Agents_Unknown\n"; + $xml_output .=" generic_data\n"; + $xml_output .=" $agents_unknown\n"; + $xml_output .=" \n"; + + $xml_output .=" \n"; + $xml_output .=" System_Load_AVG\n"; + $xml_output .=" generic_data\n"; + $xml_output .=" $load_average\n"; + $xml_output .=" \n"; + + $xml_output .=" \n"; + $xml_output .=" Free_RAM\n"; + $xml_output .=" generic_data\n"; + $xml_output .=" $free_mem\n"; + $xml_output .=" \n"; + + $xml_output .=" \n"; + $xml_output .=" FreeDisk_SpoolDir\n"; + $xml_output .=" generic_data\n"; + $xml_output .=" $free_disk_spool\n"; + $xml_output .=" \n"; + + return $xml_output; +} + +####################################### +# +# +# MAIN +# +# +####################################### + + +if ($#ARGV < 0) { + print STDERR "Needed 1 argument as last\nUsage:\n$0 pandora_server.conf\n"; + exit 1; +} + +my %config = parse_configuration($ARGV[0]); + + +$config{version} = "6.0"; +$config{'servername'} = trim (`hostname`) if (!(defined ($config{'servername'}))); +$RDBMS = $config{dbengine}; + +# ($rdbms, $db_name, $db_host, $db_port, $db_user, $db_pass) +my $dbh = db_connect($RDBMS, $config{dbname}, $config{dbhost}, $config{dbport}, $config{dbuser}, $config{dbpass}); + + +my $xml_output = pandora_self_monitoring(\%config, $dbh); + + +db_disconnect($dbh); + + +print $xml_output; +exit 0; \ No newline at end of file diff --git a/pandora_plugins/Performance Counters/Pandora_Plugin_PerfCounter.ps1 b/pandora_plugins/Performance Counters/Pandora_Plugin_PerfCounter.ps1 new file mode 100644 index 0000000000..5fed6dd4aa --- /dev/null +++ b/pandora_plugins/Performance Counters/Pandora_Plugin_PerfCounter.ps1 @@ -0,0 +1,74 @@ +# Plugin for monitoring Performance Counters. + +# Pandora FMS Agent Plugin for Microsoft Performance Counters Monitoring +# (c) Toms Palacios 2012 +# v1.1, 02 Aug 2012 - 21:40:00 +# ------------------------------------------------------------------------ + +# Configuration Parameters + +param ([string]$list = "list") + +$host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(512,50); + + if ($list -eq "list") { + + echo "`nPandora FMS Agent Plugin for Microsoft Performance Counters Monitoring`n" + + echo "(c) Toms Palacios 2012 v1.1, 02 Aug 2012 - 20:40:00`n" + + echo "Parameters:`n" + + echo " -list Provides an absolute path to a list of counters to monitor`n" + + echo "Usage example: .\Pandora_Plugin_PerfCounter_v1.0.ps1 -list C:\'Program Files (x86)\pandora_agent\util\counters.txt' 2> plugin_error.log`n" + } + + else { + +#############################CODE BEGINS HERE############################### + +# Funcin para sacar los mdulos en formato XML en el output + + function print_module { + + param ([string]$module_name,[string]$module_type,[string]$module_value,[string]$module_description) + + echo "" + echo "" + echo "" + echo "" + echo "" + echo "" + echo "" + echo "" + + } + + +# Recoleccin de los contadores especificados en la lista +if ($list -eq "none" ) { + + $a=get-counter + +} + +else { + + $a=get-counter -Counter (get-content $list) + +} + + $a.countersamples | select-object -Property * | + + foreach-object { + + $countername = $_.Path + + $value = $_.CookedValue + + print_module "PerfCounter $countername" "generic_data" "$value" "Performance Counter module generated by agent plugin" + + } + +} diff --git a/pandora_plugins/Performance Counters/counters.txt b/pandora_plugins/Performance Counters/counters.txt new file mode 100644 index 0000000000..65a7818934 --- /dev/null +++ b/pandora_plugins/Performance Counters/counters.txt @@ -0,0 +1,319 @@ +\Web Service(*)\Total Bytes Sent +\Web Service(*)\Bytes Sent/sec +\Web Service(*)\Total Bytes Received +\Web Service(*)\Bytes Received/sec +\Web Service(*)\Total Bytes Transferred +\Web Service(*)\Bytes Total/sec +\Web Service(*)\Total Files Sent +\Web Service(*)\Files Sent/sec +\Web Service(*)\Total Files Received +\Web Service(*)\Files Received/sec +\Web Service(*)\Total Files Transferred +\Web Service(*)\Files/sec +\Web Service(*)\Current Anonymous Users +\Web Service(*)\Current NonAnonymous Users +\Web Service(*)\Total Anonymous Users +\Web Service(*)\Anonymous Users/sec +\Web Service(*)\Total NonAnonymous Users +\Web Service(*)\NonAnonymous Users/sec +\Web Service(*)\Maximum Anonymous Users +\Web Service(*)\Maximum NonAnonymous Users +\Web Service(*)\Current Connections +\Web Service(*)\Maximum Connections +\Web Service(*)\Total Connection Attempts (all instances) +\Web Service(*)\Connection Attempts/sec +\Web Service(*)\Total Logon Attempts +\Web Service(*)\Logon Attempts/sec +\Web Service(*)\Total Options Requests +\Web Service(*)\Options Requests/sec +\Web Service(*)\Total Get Requests +\Web Service(*)\Get Requests/sec +\Web Service(*)\Total Post Requests +\Web Service(*)\Post Requests/sec +\Web Service(*)\Total Head Requests +\Web Service(*)\Head Requests/sec +\Web Service(*)\Total Put Requests +\Web Service(*)\Put Requests/sec +\Web Service(*)\Total Delete Requests +\Web Service(*)\Delete Requests/sec +\Web Service(*)\Total Trace Requests +\Web Service(*)\Trace Requests/sec +\Web Service(*)\Total Move Requests +\Web Service(*)\Move Requests/sec +\Web Service(*)\Total Copy Requests +\Web Service(*)\Copy Requests/sec +\Web Service(*)\Total Mkcol Requests +\Web Service(*)\Mkcol Requests/sec +\Web Service(*)\Total Propfind Requests +\Web Service(*)\Propfind Requests/sec +\Web Service(*)\Total Proppatch Requests +\Web Service(*)\Proppatch Requests/sec +\Web Service(*)\Total Search Requests +\Web Service(*)\Search Requests/sec +\Web Service(*)\Total Lock Requests +\Web Service(*)\Lock Requests/sec +\Web Service(*)\Total Unlock Requests +\Web Service(*)\Unlock Requests/sec +\Web Service(*)\Total Other Request Methods +\Web Service(*)\Other Request Methods/sec +\Web Service(*)\Total Method Requests +\Web Service(*)\Total Method Requests/sec +\Web Service(*)\Total CGI Requests +\Web Service(*)\CGI Requests/sec +\Web Service(*)\Total ISAPI Extension Requests +\Web Service(*)\ISAPI Extension Requests/sec +\Web Service(*)\Total Not Found Errors +\Web Service(*)\Not Found Errors/sec +\Web Service(*)\Total Locked Errors +\Web Service(*)\Locked Errors/sec +\Web Service(*)\Current CGI Requests +\Web Service(*)\Current ISAPI Extension Requests +\Web Service(*)\Maximum CGI Requests +\Web Service(*)\Maximum ISAPI Extension Requests +\Web Service(*)\Current CAL count for authenticated users +\Web Service(*)\Maximum CAL count for authenticated users +\Web Service(*)\Total count of failed CAL requests for authenticated users +\Web Service(*)\Current CAL count for SSL connections +\Web Service(*)\Maximum CAL count for SSL connections +\Web Service(*)\Total count of failed CAL requests for SSL connections +\Web Service(*)\Total Blocked Async I/O Requests +\Web Service(*)\Total Allowed Async I/O Requests +\Web Service(*)\Total Rejected Async I/O Requests +\Web Service(*)\Current Blocked Async I/O Requests +\Web Service(*)\Measured Async I/O Bandwidth Usage +\Web Service(*)\Total blocked bandwidth bytes. +\Web Service(*)\Current blocked bandwidth bytes. +\Web Service(*)\Service Uptime +\SQLServer:Access Methods\Full Scans/sec +\SQLServer:Access Methods\Range Scans/sec +\SQLServer:Access Methods\Probe Scans/sec +\SQLServer:Access Methods\Scan Point Revalidations/sec +\SQLServer:Access Methods\Workfiles Created/sec +\SQLServer:Access Methods\Worktables Created/sec +\SQLServer:Access Methods\Worktables From Cache Ratio +\SQLServer:Access Methods\Forwarded Records/sec +\SQLServer:Access Methods\Skipped Ghosted Records/sec +\SQLServer:Access Methods\Index Searches/sec +\SQLServer:Access Methods\FreeSpace Scans/sec +\SQLServer:Access Methods\FreeSpace Page Fetches/sec +\SQLServer:Access Methods\Pages Allocated/sec +\SQLServer:Access Methods\Extents Allocated/sec +\SQLServer:Access Methods\Mixed page allocations/sec +\SQLServer:Access Methods\Extent Deallocations/sec +\SQLServer:Access Methods\Page Deallocations/sec +\SQLServer:Access Methods\Page Splits/sec +\SQLServer:Access Methods\Table Lock Escalations/sec +\SQLServer:Access Methods\Deferred Dropped rowsets +\SQLServer:Access Methods\Dropped rowset cleanups/sec +\SQLServer:Access Methods\Dropped rowsets skipped/sec +\SQLServer:Access Methods\Deferred dropped AUs +\SQLServer:Access Methods\AU cleanups/sec +\SQLServer:Access Methods\AU cleanup batches/sec +\SQLServer:Access Methods\Failed AU cleanup batches/sec +\SQLServer:Access Methods\Used tree page cookie +\SQLServer:Access Methods\Failed tree page cookie +\SQLServer:Access Methods\Used leaf page cookie +\SQLServer:Access Methods\Failed leaf page cookie +\SQLServer:Access Methods\LobSS Provider Create Count +\SQLServer:Access Methods\LobSS Provider Destroy Count +\SQLServer:Access Methods\LobSS Provider Truncation Count +\SQLServer:Access Methods\LobHandle Create Count +\SQLServer:Access Methods\LobHandle Destroy Count +\SQLServer:Access Methods\By-reference Lob Create Count +\SQLServer:Access Methods\By-reference Lob Use Count +\SQLServer:Access Methods\Count Push Off Row +\SQLServer:Access Methods\Count Pull In Row +\SQLServer:Access Methods\Count Lob Readahead +\SQLServer:Access Methods\Page compression attempts/sec +\SQLServer:Access Methods\Pages compressed/sec +\SQLServer:Backup Device(*)\Device Throughput Bytes/sec +\SQLServer:Buffer Manager\Buffer cache hit ratio +\SQLServer:Buffer Manager\Page lookups/sec +\SQLServer:Buffer Manager\Free list stalls/sec +\SQLServer:Buffer Manager\Free pages +\SQLServer:Buffer Manager\Total pages +\SQLServer:Buffer Manager\Target pages +\SQLServer:Buffer Manager\Database pages +\SQLServer:Buffer Manager\Reserved pages +\SQLServer:Buffer Manager\Stolen pages +\SQLServer:Buffer Manager\Lazy writes/sec +\SQLServer:Buffer Manager\Readahead pages/sec +\SQLServer:Buffer Manager\Page reads/sec +\SQLServer:Buffer Manager\Page writes/sec +\SQLServer:Buffer Manager\Checkpoint pages/sec +\SQLServer:Buffer Manager\AWE lookup maps/sec +\SQLServer:Buffer Manager\AWE stolen maps/sec +\SQLServer:Buffer Manager\AWE write maps/sec +\SQLServer:Buffer Manager\AWE unmap calls/sec +\SQLServer:Buffer Manager\AWE unmap pages/sec +\SQLServer:Buffer Manager\Page life expectancy +\SQLServer:Buffer Partition(*)\Free pages +\SQLServer:Buffer Partition(*)\Free list requests/sec +\SQLServer:Buffer Partition(*)\Free list empty/sec +\SQLServer:CLR\CLR Execution +\SQLServer:Cursor Manager by Type(*)\Cache Hit Ratio +\SQLServer:Cursor Manager by Type(*)\Cached Cursor Counts +\SQLServer:Cursor Manager by Type(*)\Cursor Cache Use Counts/sec +\SQLServer:Cursor Manager by Type(*)\Cursor Requests/sec +\SQLServer:Cursor Manager by Type(*)\Active cursors +\SQLServer:Cursor Manager by Type(*)\Cursor memory usage +\SQLServer:Cursor Manager by Type(*)\Cursor worktable usage +\SQLServer:Cursor Manager by Type(*)\Number of active cursor plans +\SQLServer:Cursor Manager Total\Cursor conversion rate +\SQLServer:Cursor Manager Total\Async population count +\SQLServer:Cursor Manager Total\Cursor flushes +\SQLServer:Database Mirroring(*)\Bytes Sent/sec +\SQLServer:Database Mirroring(*)\Pages Sent/sec +\SQLServer:Database Mirroring(*)\Sends/sec +\SQLServer:Database Mirroring(*)\Transaction Delay +\SQLServer:Database Mirroring(*)\Redo Queue KB +\SQLServer:Database Mirroring(*)\Redo Bytes/sec +\SQLServer:Database Mirroring(*)\Log Send Queue KB +\SQLServer:Database Mirroring(*)\Bytes Received/sec +\SQLServer:Database Mirroring(*)\Receives/sec +\SQLServer:Database Mirroring(*)\Log Bytes Received/sec +\SQLServer:Database Mirroring(*)\Log Bytes Sent/sec +\SQLServer:Database Mirroring(*)\Send/Receive Ack Time +\SQLServer:Database Mirroring(*)\Log Compressed Bytes Rcvd/sec +\SQLServer:Database Mirroring(*)\Log Compressed Bytes Sent/sec +\SQLServer:Database Mirroring(*)\Mirrored Write Transactions/sec +\SQLServer:Database Mirroring(*)\Log Scanned for Undo KB +\SQLServer:Database Mirroring(*)\Log Remaining for Undo KB +\SQLServer:Database Mirroring(*)\Log Bytes Sent from Cache/sec +\SQLServer:Database Mirroring(*)\Log Bytes Redone from Cache/sec +\SQLServer:Database Mirroring(*)\Log Send Flow Control Time (ms) +\SQLServer:Database Mirroring(*)\Log Harden Time (ms) +\SQLServer:Databases(*)\Data File(s) Size (KB) +\SQLServer:Databases(*)\Log File(s) Size (KB) +\SQLServer:Databases(*)\Log File(s) Used Size (KB) +\SQLServer:Databases(*)\Percent Log Used +\SQLServer:Databases(*)\Active Transactions +\SQLServer:Databases(*)\Transactions/sec +\SQLServer:Databases(*)\Repl. Pending Xacts +\SQLServer:Databases(*)\Repl. Trans. Rate +\SQLServer:Databases(*)\Log Cache Reads/sec +\SQLServer:Databases(*)\Log Cache Hit Ratio +\SQLServer:Databases(*)\Bulk Copy Rows/sec +\SQLServer:Databases(*)\Bulk Copy Throughput/sec +\SQLServer:Databases(*)\Backup/Restore Throughput/sec +\SQLServer:Databases(*)\DBCC Logical Scan Bytes/sec +\SQLServer:Databases(*)\Shrink Data Movement Bytes/sec +\SQLServer:Databases(*)\Log Flushes/sec +\SQLServer:Databases(*)\Log Bytes Flushed/sec +\SQLServer:Databases(*)\Log Flush Waits/sec +\SQLServer:Databases(*)\Log Flush Wait Time +\SQLServer:Databases(*)\Log Truncations +\SQLServer:Databases(*)\Log Growths +\SQLServer:Databases(*)\Log Shrinks +\SQLServer:Databases(*)\Tracked transactions/sec +\SQLServer:Databases(*)\Write Transactions/sec +\SQLServer:Databases(*)\Commit table entries +\SQLServer:Exec Statistics(*)\Extended Procedures +\SQLServer:Exec Statistics(*)\DTC calls +\SQLServer:Exec Statistics(*)\OLEDB calls +\SQLServer:Exec Statistics(*)\Distributed Query +\SQLServer:General Statistics\Active Temp Tables +\SQLServer:General Statistics\Temp Tables Creation Rate +\SQLServer:General Statistics\Logins/sec +\SQLServer:General Statistics\Connection Reset/sec +\SQLServer:General Statistics\Logouts/sec +\SQLServer:General Statistics\User Connections +\SQLServer:General Statistics\Logical Connections +\SQLServer:General Statistics\Transactions +\SQLServer:General Statistics\Non-atomic yield rate +\SQLServer:General Statistics\Mars Deadlocks +\SQLServer:General Statistics\HTTP Authenticated Requests +\SQLServer:General Statistics\SOAP Empty Requests +\SQLServer:General Statistics\SOAP SQL Requests +\SQLServer:General Statistics\SOAP Method Invocations +\SQLServer:General Statistics\SOAP WSDL Requests +\SQLServer:General Statistics\SOAP Session Initiate Requests +\SQLServer:General Statistics\SOAP Session Terminate Requests +\SQLServer:General Statistics\Processes blocked +\SQLServer:General Statistics\Temp Tables For Destruction +\SQLServer:General Statistics\Event Notifications Delayed Drop +\SQLServer:General Statistics\Trace Event Notification Queue +\SQLServer:General Statistics\SQL Trace IO Provider Lock Waits +\SQLServer:General Statistics\Tempdb recovery unit id +\SQLServer:General Statistics\Tempdb rowset id +\SQLServer:Latches\Latch Waits/sec +\SQLServer:Latches\Average Latch Wait Time (ms) +\SQLServer:Latches\Total Latch Wait Time (ms) +\SQLServer:Latches\Number of SuperLatches +\SQLServer:Latches\SuperLatch Promotions/sec +\SQLServer:Latches\SuperLatch Demotions/sec +\SQLServer:Locks(*)\Lock Requests/sec +\SQLServer:Locks(*)\Lock Timeouts/sec +\SQLServer:Locks(*)\Number of Deadlocks/sec +\SQLServer:Locks(*)\Lock Waits/sec +\SQLServer:Locks(*)\Lock Wait Time (ms) +\SQLServer:Locks(*)\Average Wait Time (ms) +\SQLServer:Locks(*)\Lock Timeouts (timeout > 0)/sec +\SQLServer:Memory Manager\Connection Memory (KB) +\SQLServer:Memory Manager\Granted Workspace Memory (KB) +\SQLServer:Memory Manager\Lock Memory (KB) +\SQLServer:Memory Manager\Lock Blocks Allocated +\SQLServer:Memory Manager\Lock Owner Blocks Allocated +\SQLServer:Memory Manager\Lock Blocks +\SQLServer:Memory Manager\Lock Owner Blocks +\SQLServer:Memory Manager\Maximum Workspace Memory (KB) +\SQLServer:Memory Manager\Memory Grants Outstanding +\SQLServer:Memory Manager\Memory Grants Pending +\SQLServer:Memory Manager\Optimizer Memory (KB) +\SQLServer:Memory Manager\SQL Cache Memory (KB) +\SQLServer:Memory Manager\Target Server Memory (KB) +\SQLServer:Memory Manager\Total Server Memory (KB) +\SQLServer:Plan Cache(*)\Cache Hit Ratio +\SQLServer:Plan Cache(*)\Cache Pages +\SQLServer:Plan Cache(*)\Cache Object Counts +\SQLServer:Plan Cache(*)\Cache Objects in use +\SQLServer:Replication Agents(*)\Running +\SQLServer:Replication Dist.(*)\Dist:Delivery Latency +\SQLServer:Replication Dist.(*)\Dist:Delivered Cmds/sec +\SQLServer:Replication Dist.(*)\Dist:Delivered Trans/sec +\SQLServer:Replication Logreader(*)\Logreader:Delivery Latency +\SQLServer:Replication Logreader(*)\Logreader:Delivered Cmds/sec +\SQLServer:Replication Logreader(*)\Logreader:Delivered Trans/sec +\SQLServer:Replication Merge(*)\Uploaded Changes/sec +\SQLServer:Replication Merge(*)\Downloaded Changes/sec +\SQLServer:Replication Merge(*)\Conflicts/sec +\SQLServer:Replication Snapshot(*)\Snapshot:Delivered Cmds/sec +\SQLServer:Replication Snapshot(*)\Snapshot:Delivered Trans/sec +\SQLServer:SQL Errors(*)\Errors/sec +\SQLServer:SQL Statistics\Batch Requests/sec +\SQLServer:SQL Statistics\Forced Parameterizations/sec +\SQLServer:SQL Statistics\Auto-Param Attempts/sec +\SQLServer:SQL Statistics\Failed Auto-Params/sec +\SQLServer:SQL Statistics\Safe Auto-Params/sec +\SQLServer:SQL Statistics\Unsafe Auto-Params/sec +\SQLServer:SQL Statistics\SQL Compilations/sec +\SQLServer:SQL Statistics\SQL Re-Compilations/sec +\SQLServer:SQL Statistics\SQL Attention rate +\SQLServer:SQL Statistics\Guided plan executions/sec +\SQLServer:SQL Statistics\Misguided plan executions/sec +\SQLServer:Transactions\Transactions +\SQLServer:Transactions\Snapshot Transactions +\SQLServer:Transactions\Update Snapshot Transactions +\SQLServer:Transactions\NonSnapshot Version Transactions +\SQLServer:Transactions\Longest Transaction Running Time +\SQLServer:Transactions\Update conflict ratio +\SQLServer:Transactions\Free Space in tempdb (KB) +\SQLServer:Transactions\Version Generation rate (KB/s) +\SQLServer:Transactions\Version Cleanup rate (KB/s) +\SQLServer:Transactions\Version Store Size (KB) +\SQLServer:Transactions\Version Store unit count +\SQLServer:Transactions\Version Store unit creation +\SQLServer:Transactions\Version Store unit truncation +\SQLServer:User Settable(*)\Query +\SQLServer:Wait Statistics(*)\Lock waits +\SQLServer:Wait Statistics(*)\Memory grant queue waits +\SQLServer:Wait Statistics(*)\Thread-safe memory objects waits +\SQLServer:Wait Statistics(*)\Log write waits +\SQLServer:Wait Statistics(*)\Log buffer waits +\SQLServer:Wait Statistics(*)\Network IO waits +\SQLServer:Wait Statistics(*)\Page IO latch waits +\SQLServer:Wait Statistics(*)\Page latch waits +\SQLServer:Wait Statistics(*)\Non-Page latch waits +\SQLServer:Wait Statistics(*)\Wait for the worker +\SQLServer:Wait Statistics(*)\Workspace synchronization waits +\SQLServer:Wait Statistics(*)\Transaction ownership waits diff --git a/pandora_plugins/SNMP remoto/snmp_remoto.pl b/pandora_plugins/SNMP remoto/snmp_remoto.pl new file mode 100644 index 0000000000..22bd8b3235 --- /dev/null +++ b/pandora_plugins/SNMP remoto/snmp_remoto.pl @@ -0,0 +1,127 @@ +#!/usr/bin/perl +#--------------------------------------------------------------------------- +# SNMP remote plugin +# Depending on the configuration returns the result of these modules: +# - % Memory Use +# - % CPU Use +# - % Disk Use +# - Show if a process is running or not +# +# Artica ST +# Copyright (C) 2013 mario.pulido@artica.es +# +# License: GPLv2+ +#--------------------------------------------------------------------------- +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# GPL License: http://www.gnu.org/licenses/gpl.txt +#--------------------------------------------------------------------------- + +use strict; +use Getopt::Std; + +my $VERSION = 'v1r1'; + +#----------------------------------------------------------------------------- +# HELP +#----------------------------------------------------------------------------- + +if ($#ARGV == -1 ) +{ + print "-H, --host=STRING\n"; + print "\tHost IP\n"; + print "-c, --community=STRING\n"; + print "\tSnmp Community\n"; + print "-m, --module=STRING\n"; + print "\tDefine module (memuse|diskuse|process|cpuload) \n"; + print "-d, --disk=STRING\n"; + print "\tDefine disk name (C:, D: in Windows) or mount point (Linux)(only in diskuse module)\n"; + print "-p, --process=STRING\n"; + print "\tProcess or service name (only in process module)\n"; + print "\n"; + print "Example of use \n"; + print "perl snmp_remoto.pl -H host -c community -m (memuse|diskuse|process|cpuload) [-p process -d disk] \n"; + print "Version=$VERSION"; + exit; +} + +my ( $host, $community, $module, $disk, $process ) = &options; + +#------------------------------------------------------------------------------------- +# OPTIONS +#------------------------------------------------------------------------------------- + +sub options { + + # Get and check args + my %opts; + getopt( 'Hcmdp', \%opts ); + $opts{"H"} = 0 unless ( exists( $opts{"H"} ) ); + $opts{"c"} = 0 unless ( exists( $opts{"c"} ) ); + $opts{"m"} = 0 unless ( exists( $opts{"m"} ) ); + $opts{"d"} = "/" unless ( exists( $opts{"d"} ) ); + $opts{"p"} = 0 unless ( exists( $opts{"p"} ) ); + return ( $opts{"H"}, $opts{"c"}, $opts{"m"}, $opts{"d"}, $opts {"p"}); +} + +#-------------------------------------------------------------------------------------------------- +# Module % Memory use +#-------------------------------------------------------------------------------------------------- + +if ($module eq "memuse"){ + my $memid = `snmpwalk -On -v 1 -c $community $host .1.3.6.1.2.1.25.2.3.1.3 | grep Physical | head -1 | gawk '{print \$1}' | gawk -F "." '{print \$13}' | tr -d "\r"`; + my $memtot = `snmpget -v 1 -c $community $host .1.3.6.1.2.1.25.2.3.1.5.$memid ` ; + my $memtot2 = `echo "$memtot" | gawk '{print \$4}'`; + my $memfree = `snmpget -v 1 -c $community $host .1.3.6.1.2.1.25.2.3.1.6.$memid` ; + my $memfree2 = `echo "$memfree" | gawk '{print \$4}'`; + my $memuse = ($memfree2)*100/$memtot2; + printf("%.2f", $memuse); + } +#-------------------------------------------------------------------------------------------------- +# Module % Disk use +#-------------------------------------------------------------------------------------------------- + +if ($module eq "diskuse"){ + my $diskid = `snmpwalk -On -v 1 -c $community $host .1.3.6.1.2.1.25.2.3.1.3 | grep $disk | head -1 | gawk '{print \$1}' | gawk -F "." '{print \$13}' | tr -d "\r"`; + my $disktot = `snmpget -v 1 -c $community $host .1.3.6.1.2.1.25.2.3.1.5.$diskid ` ; + my $disktot2 = `echo "$disktot" | gawk '{print \$4}'`; + my $diskfree = `snmpget -v 1 -c $community $host .1.3.6.1.2.1.25.2.3.1.6.$diskid` ; + my $diskfree2 = `echo "$diskfree" | gawk '{print \$4}'`; + my $diskuse = ($disktot2 - $diskfree2)*100/$disktot2; + printf("%.2f", $diskuse); + } + +#-------------------------------------------------------------------------------------------------- +# Module Process Status +#-------------------------------------------------------------------------------------------------- + +if ($module eq "process"){ + my $status = `snmpwalk -v 2c -c $community $host 1.3.6.1.2.1.25.4.2.1.2 | grep $process | head -1 | wc -l`; + print $status; + } +#-------------------------------------------------------------------------------------------------- +# Module % Cpu Load +#-------------------------------------------------------------------------------------------------- + +if ($module eq "cpuload"){ + my $cpuload = `snmpwalk -v 1 -c $community $host .1.3.6.1.2.1.25.3.3.1.2 | gawk '{print \$4}' `; + my @cpuload = split(/\n/, $cpuload); + my $sum; + my $counter = 0; + foreach my $val(@cpuload){ + $sum = $sum+$val; + $counter ++; + } + my $cputotal = $sum/$counter; + print $cputotal; + + } + diff --git a/pandora_plugins/VitalFile_Monitoring/Pandora_Plugin_VitalFileMonitoring.pl b/pandora_plugins/VitalFile_Monitoring/Pandora_Plugin_VitalFileMonitoring.pl new file mode 100644 index 0000000000..238f1c1e97 --- /dev/null +++ b/pandora_plugins/VitalFile_Monitoring/Pandora_Plugin_VitalFileMonitoring.pl @@ -0,0 +1,328 @@ +#!/usr/bin/perl +# Pandora FMS Agent Plugin for Tuxedo +# (c) Artica Soluciones Tecnologicas 2012 +# v1.0, 18 Apr 2012 +# ------------------------------------------------------------------------ + +use strict; +use warnings; +use Data::Dumper; + +use IO::Socket::INET; + +# OS and OS version +my $OS = $^O; + +# Store original PATH +my $ORIGINAL_PATH = $ENV{'PATH'}; + +# Load on Win32 only +if ($OS eq "MSWin32"){ + + # Check dependencies + eval 'local $SIG{__DIE__}; use Win32::OLE("in");'; + if ($@) { + print "Error loading Win32::Ole library. Cannot continue\n"; + exit; + } + + use constant wbemFlagReturnImmediately => 0x10; + use constant wbemFlagForwardOnly => 0x20; +} + +my %plugin_setup; # This stores plugin parameters +my %ls_resultset; # This stores tuxedo results +my $archivo_ls = $ARGV[0]; + +my $OS_NAME = `uname -s | tr -d "\n"`; +my $hostname = `hostname | tr -d "\n"`; +my $filecounter = 0; +my $conffilecounter = 0; + + +# FLUSH in each IO +$| = 1; + +# ---------------------------------------------------------------------------- +# This cleans DOS-like line and cleans ^M character. VERY Important when you process .conf edited from DOS +# ---------------------------------------------------------------------------- + +sub parse_dosline ($){ + my $str = $_[0]; + + $str =~ s/\r//g; + return $str; +} + +# ---------------------------------------------------------------------------- +# Strips blank likes +# ---------------------------------------------------------------------------- + +sub trim ($){ + my $string = shift; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} + + +# ---------------------------------------------------------------------------- +# clean_blank +# +# This function return a string without blankspaces, given a simple text string +# ---------------------------------------------------------------------------- + +sub clean_blank($){ + my $input = $_[0]; + $input =~ s/[\s\r\n]*//g; + return $input; +} + +# ---------------------------------------------------------------------------- +# print_module +# +# This function return a pandora FMS valid module fiven name, type, value, description +# ---------------------------------------------------------------------------- + +sub print_module ($$$$){ + my $MODULE_NAME = $_[0]; + my $MODULE_TYPE = $_[1]; + my $MODULE_VALUE = $_[2]; + my $MODULE_DESC = $_[3]; + + # If not a string type, remove all blank spaces! + if ($MODULE_TYPE !~ m/string/){ + $MODULE_VALUE = clean_blank($MODULE_VALUE); + } + + print "\n"; + print "\n"; + print "$MODULE_TYPE\n"; + print "\n"; + print "\n"; + print "\n"; + +} + +# ---------------------------------------------------------------------------- +# load_ls_result (DEPRECATED) +# +# Load temporal ls result file containing ls stats +# ---------------------------------------------------------------------------- + +my $resultfile="/tmp/ls_results.log"; + +sub load_ls_result ($); + +sub load_ls_result ($){ + + my $ls_result = $_[0]; + my $buffer_line; + my @results; + my $parametro =""; + + if (! open (CFG, "< $ls_result")) { + print "[ERROR] Error accessing ls results $ls_result: $!.\n"; + exit 1; + } + + while (){ + $buffer_line = parse_dosline ($_); + # Parse configuration file, this is specially difficult because can contain SQL code, with many things + if ($buffer_line !~ /^\#/){ # begins with anything except # (for commenting) + if ($buffer_line =~ m/(.+)\s(.*)/){ + push @results, $buffer_line; + } + } + } + + close (CFG); + + foreach (@results){ + $parametro = $_; + + $ls_resultset{"perms"}[$filecounter] = `echo "$parametro" | awk '{print \$1}' | tr -d "\n"`; + + if (($ls_resultset{"perms"}[$filecounter] eq "ls:") || ($parametro =~ m/not found.*/)) { + + $ls_resultset{"filename"}[$filecounter] = ""; + $ls_resultset{"filenameerror"}[$filecounter] = `echo "$parametro" | awk -F: '{print \$2}' | awk '{print \$NF}' | tr -d "\n"`;; + $ls_resultset{"fileowner"}[$filecounter] = ""; + $ls_resultset{"filegroup"}[$filecounter] = ""; + $ls_resultset{"filesize"}[$filecounter] = ""; + $ls_resultset{"modified"}[$filecounter] = ""; + $filecounter++; + + } else { + + $ls_resultset{"filenameerror"}[$filecounter] = ""; + $ls_resultset{"filename"}[$filecounter] = `echo "$parametro" | awk '{print \$NF}' | tr -d "\n"`; + $ls_resultset{"fileowner"}[$filecounter] = `echo "$parametro" | awk '{print \$3}' | tr -d "\n"`; + $ls_resultset{"filegroup"}[$filecounter] = `echo "$parametro" | awk '{print \$4}' | tr -d "\n"`; + $ls_resultset{"filesize"}[$filecounter] = `echo "$parametro" | awk '{print \$5}' | tr -d "\n"`; + $ls_resultset{"modified"}[$filecounter] = `echo "$parametro" | awk '{print \$6" "\$7}' | tr -d "\n"`; + $filecounter++; + + } + } + +} +# ---------------------------------------------------------------------------- +# load_external_setup +# +# Load external file containing configuration +# ---------------------------------------------------------------------------- +sub load_external_setup ($); # Declaration due a recursive call to itself on includes +sub load_external_setup ($){ + + my $archivo_ls = $_[0]; + my $buffer_line; + my @config_file; + my $parametro = ""; + + # Collect items from config file and put in an array + if (! open (CFG, "< $archivo_ls")) { + print "[ERROR] Error opening list file $archivo_ls: $!.\n"; + exit 1; + + } + + while (){ + $buffer_line = parse_dosline ($_); + # Parse configuration file, this is specially difficult because can contain SQL code, with many things + if ($buffer_line !~ /^\#/){ # begins with anything except # (for commenting) + if ($buffer_line =~ m/(.+)\s(.*)/){ + push @config_file, $buffer_line; + } + } + + } + + close (CFG); + + foreach (@config_file){ + $parametro = $_; + + $ls_resultset{"conffilename"}[$conffilecounter] = $parametro; + $conffilecounter++; + + } + + # Some plugin setup default options + + $plugin_setup{"ls"}="ls"; + +} + +# ---------------------------------------------------------------------------- +# ls_stats +# +# This function uses ls, greps and awks to get information about each file status +# Given Command (tmadmin or tmconfig), check type and monitored object (optional) +# ---------------------------------------------------------------------------- + +sub ls_stats { + + # Call to ls + + my $ls_call = $plugin_setup{"ls"}; + +# my $stringlist = `cat $archivo_ls | grep -ve ^# | tr -s "\n" " "`; + +# my $lscmd = `$ls_call -l $stringlist 2> $resultfile >> $resultfile`; +# my $lscmdb = `$ls_call -l $stringlist 2>> $resultfile`; + +# load_ls_result ($resultfile); + + if ($conffilecounter > 0) { + my $ax; + my $filename; + my $errfilename; + + for ($ax=0; $ax < $conffilecounter + 0; $ax++){ + + $filename = $ls_resultset{"conffilename"}[$ax]; + + $errfilename = `echo "$filename" | tr -d "\n"`; + + my $lscmd = `$ls_call -l $errfilename 2> /dev/null`; + + if ((!defined $lscmd) || ($lscmd eq "")) { + print_module("VitalFileExists_" . $errfilename, "generic_proc", "0", "File $errfilename does not exist at $hostname"); + + } + + else { + + $ls_resultset{"perms"}[$ax] = `echo "$lscmd" | awk '{print \$1}' | tr -d "\n"`; + $ls_resultset{"filename"}[$ax] = `echo "$lscmd" | awk '{print \$NF}' | tr -d "\n"`; + $ls_resultset{"fileowner"}[$ax] = `echo "$lscmd" | awk '{print \$3}' | tr -d "\n"`; + $ls_resultset{"filegroup"}[$ax] = `echo "$lscmd" | awk '{print \$4}' | tr -d "\n"`; + $ls_resultset{"filesize"}[$ax] = `echo "$lscmd" | awk '{print \$5}' | tr -d "\n"`; + + if ($OS_NAME eq "Linux") { + $ls_resultset{"modified"}[$ax] = `echo "$lscmd" | awk '{print \$6" "\$7}' | tr -d "\n"`; + } + elsif (($OS_NAME eq "HP-UX") || ($OS_NAME eq "AIX") || ($OS_NAME eq "SunOS")){ + $ls_resultset{"modified"}[$ax] = `echo "$lscmd" | awk '{print \$6" "\$7" "\$8}' | tr -d "\n"`; + } + + if (($ls_resultset{"filename"}[$ax] ne "") && ($ls_resultset{"filename"}[$ax] =~ m/($errfilename).*/)) { + print_module("VitalFileExists_" . $ls_resultset{"filename"}[$ax], "generic_proc", "1", "File " . $ls_resultset{"filename"}[$ax] . " exists at $hostname"); + } + + if ($ls_resultset{"filesize"}[$ax] ne "") { + print_module("VitalFileSize_" . $ls_resultset{"filename"}[$ax], "generic_data", $ls_resultset{"filesize"}[$ax], "Current file size in bytes for " . $ls_resultset{"filename"}[$ax] . " at $hostname"); + } + + if (($ls_resultset{"modified"}[$ax] ne "") || (defined $lscmd)) { + print_module("VitalFileModificationDate_" . $ls_resultset{"filename"}[$ax], "generic_data_string", $ls_resultset{"modified"}[$ax], "Last modification date for " . $ls_resultset{"filename"}[$ax] . " at $hostname"); + } + + if ($ls_resultset{"fileowner"}[$ax] ne "") { + print_module("VitalFileOwner_" . $ls_resultset{"filename"}[$ax], "generic_data_string", $ls_resultset{"fileowner"}[$ax], "File owner for " . $ls_resultset{"filename"}[$ax] . " at $hostname"); + } + + if ($ls_resultset{"filegroup"}[$ax] ne "") { + print_module("VitalFileGroup_" . $ls_resultset{"filename"}[$ax], "generic_data_string", $ls_resultset{"filegroup"}[$ax], "File group for " . $ls_resultset{"filename"}[$ax] . " at $hostname"); + } + + if ($ls_resultset{"perms"}[$ax] ne "") { + print_module("VitalFilePerms_" . $ls_resultset{"filename"}[$ax], "generic_data_string", $ls_resultset{"perms"}[$ax], "File perms for " . $ls_resultset{"filename"}[$ax] . " at $hostname"); + } + + } + + } + + } + +} + +#-------------------------------------------------------------------------------- +#-------------------------------------------------------------------------------- +# MAIN PROGRAM +# ------------------------------------------------------------------------------- +#-------------------------------------------------------------------------------- + +# Parse external configuration file + +# Load config file from command line +if ($#ARGV == -1 ){ + print "I need at least one parameter: Complete path to external list file \n"; + exit; +} + +# Check for file +if ( ! -f $archivo_ls ) { + printf "\n [ERROR] Cannot open list file at $archivo_ls. \n\n"; + exit 1; +} + +load_external_setup ($archivo_ls); + +# Check file status + +ls_stats; diff --git a/pandora_plugins/WMI remoto/wmi_remoto.pl b/pandora_plugins/WMI remoto/wmi_remoto.pl new file mode 100644 index 0000000000..06ffdf61b0 --- /dev/null +++ b/pandora_plugins/WMI remoto/wmi_remoto.pl @@ -0,0 +1,115 @@ +#!/usr/bin/perl +#--------------------------------------------------------------------------- +# WMI remote plugin +# Depending on the configuration returns the result of these modules: +# - % Memory Use +# - % CPU Use +# - % Disk Use +# +# Artica ST +# Copyright (C) 2013 mario.pulido@artica.es +# +# License: GPLv2+ +#--------------------------------------------------------------------------- +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# GPL License: http://www.gnu.org/licenses/gpl.txt +#--------------------------------------------------------------------------- + +use strict; +use Getopt::Std; + +my $VERSION = 'v1r1'; + +#----------------------------------------------------------------------------- +# HELP +#----------------------------------------------------------------------------- + +if ($#ARGV == -1 ) +{ + print "-H, --host=STRING\n"; + print "\tHost IP\n"; + print "-U, --user=STRING\n"; + print "\tWMI User\n"; + print "-P, --password=STRING\n"; + print "\tWMI Password\n"; + print "-m, --module=STRING\n"; + print "\tDefine module (memuse|diskuse|cpuload) \n"; + print "-d, --disk=STRING\n"; + print "\tDefine disk name (C:, D: in Windows) or mount point (Linux)(only in diskuse module)\n"; + print "\n"; + print "Example of use \n"; + print "perl swmi_remoto.pl -H host -U user -P password -m (memuse|diskuse|cpuload) [-p process -d disk] \n"; + print "Version=$VERSION"; + exit; +} + +my ( $host, $user, $pass, $module, $disk ) = &options; + +#------------------------------------------------------------------------------------- +# OPTIONS +#------------------------------------------------------------------------------------- + +sub options { + + # Get and check args + my %opts; + getopt( 'HUPmd', \%opts ); + $opts{"H"} = 0 unless ( exists( $opts{"H"} ) ); + $opts{"U"} = 0 unless ( exists( $opts{"U"} ) ); + $opts{"P"} = 0 unless ( exists( $opts{"P"} ) ); + $opts{"m"} = 0 unless ( exists( $opts{"m"} ) ); + $opts{"d"} = "C:" unless ( exists( $opts{"d"} ) ); + return ( $opts{"H"}, $opts{"U"}, $opts{"P"}, $opts{"m"}, $opts {"d"}); +} + + +#------------------------------------------------------------------------------------------------- +# Module % Cpu Load +#-------------------------------------------------------------------------------------------------- + +if($module eq "cpuload"){ + + my $cpuload = `wmic -U '$user'\%'$pass' //$host "select LoadPercentage from Win32_Processor" | grep -v CLASS | grep -v LoadPercentage | gawk -F "|" '{print \$2}'`; + my @cpuload = split(/\n/, $cpuload); + my $sum; + my $counter = 0; + foreach my $val(@cpuload){ + $sum = $sum+$val; + $counter ++; + } + my $cputotal = $sum/$counter; + print $cputotal; + + } + +#-------------------------------------------------------------------------------------------------- +# Module % Disk use +#-------------------------------------------------------------------------------------------------- + +if ($module eq "diskuse"){ + my $disktot = `wmic -U '$user'\%'$pass' //$host "select Size from Win32_LogicalDisk" | grep $disk | gawk -F "|" '{print \$2}' `; + my $diskfree = `wmic -U '$user'%'$pass' //$host "select FreeSpace from Win32_LogicalDisk" | grep $disk | gawk -F "|" '{print \$2}'`; + my $diskuse = ($diskfree*100)/$disktot; + printf("%.2f", $diskuse); + } +#-------------------------------------------------------------------------------------------------- +# Module % Memory use +#-------------------------------------------------------------------------------------------------- + +if ($module eq "memuse"){ + my $memtot = `wmic -U '$user'%'$pass' //$host "select TotalPhysicalMemory from Win32_ComputerSystem" | grep -v TotalPhysicalMemory | grep -v CLASS | gawk -F "|" '{print \$2}' ` ; + my $memfree = `wmic -U '$user'%'$pass' //$host "SELECT AvailableBytes from Win32_PerfRawData_PerfOS_Memory" | grep -v AvailableBytes | grep -v CLASS ` ; + my $memuse = ($memtot - $memfree)*100/$memtot; + printf("%.2f", $memuse); + } + + diff --git a/pandora_plugins/Win_LogEvents/Pandora_Plugin_Win_LogEvents.ps1 b/pandora_plugins/Win_LogEvents/Pandora_Plugin_Win_LogEvents.ps1 new file mode 100644 index 0000000000..994ef63e84 --- /dev/null +++ b/pandora_plugins/Win_LogEvents/Pandora_Plugin_Win_LogEvents.ps1 @@ -0,0 +1,594 @@ +# Plugin for monitoring Windows Event Logs. + +# Pandora FMS Agent Plugin for Microsoft Windows Event Log Monitoring +# (c) Toms Palacios 2012 +# v1.0, 02 Aug 2012 - 13:35:00 +# ------------------------------------------------------------------------ + +# Configuration Parameters + +param ([string]$interval = "i", [string]$select = "select", [string]$list = "list", [string]$name = "name", [string]$source = "source", [string]$eventtype = "eventtype", [string]$eventcode = "eventcode", [string]$application = "application", [string]$pattern = "") + +$host.UI.RawUI.BufferSize = new-object System.Management.Automation.Host.Size(512,50); + + if ($interval -eq "i") { + + echo "`nPandora FMS Agent Plugin for Microsoft Windows Event Log Monitoring`n" + + echo "(c) Toms Palacios 2012 v1.0, 02 Aug 2012 - 13:35:00`n" + + echo "Parameters:`n" + + echo " -i Interval in seconds to look for new events (mandatory)`n" + + echo " -select single Only the events matching the parameters provided in the CLI are monitored `n (not to be used with list option)`n" + +# echo " -select list Events matching the parameters provided in a list are monitored `n (only to be used with list option)`n" + +# echo " -list Complete path to a file containing a list of events to monitor (only to be used with select list option)`n" + + echo " -name Name of the module (only to be used with select single option) (mandatory)`n" + + echo " -source Event source log to search for events (only to be used with select single option) (mandatory)`n" + + echo " -eventtype Event type (only to be used with select single option) (optional)`n" + + echo " -eventcode Event numeric identifier (only to be used with select single option) (optional)`n" + + echo " -application Event source application (only to be used with select single option) (optional)`n" + + echo " -pattern Substring pattern to filter event contents (only with select single option) (optional)`n" + +# echo "Usage example: .\Pandora_Plugin_Win_LogEvents_v1.0.ps1 -i 300 -select list -list .\events.txt 2> plugin_error.log`n" + + echo "Usage example: .\Pandora_Plugin_Win_LogEvents_v1.0.ps1 -i 300 -select single -source System -eventtype Error -eventcode 5355 -application NetLogon -pattern Failure 2> plugin_error.log`n" + } + + else { + + $datainterval = $interval -as [long] + +#############################CODE BEGINS HERE############################### + +# Funcin para sacar los mdulos en formato XML en el output + + function print_module { + + param ([string]$module_name,[string]$module_type,[string]$module_value,[string]$module_description) + + echo "" + echo "$module_name" + echo "$module_type" + echo "" + echo "" + echo "" + echo "" + echo "" + echo "" + echo "" + + } + + +# Recoleccin de los eventos Windows + + if ($select -eq "select") { + + Write-Error "Error: An operation must be selected." -category InvalidArgument + + } + + if ($select -eq "single" -and $name -eq "name") { + + Write-Error "Error: A name must be selected for this module." -category InvalidArgument + + } + + if ($select -eq "single" -and $name -ne "name") { + + if ($source -eq "source") { + + Write-Error "Error: A log source must be provided when selecting this option." -category InvalidArgument + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -eq "eventcode" -and $application -eq "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + +##################################### +#De uno en uno +##################################### + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -eq "eventcode" -and $application -eq "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -ne "eventcode" -and $application -eq "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EventID -eq $eventcode} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -eq "eventcode" -and $application -ne "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.Source -eq $application} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -eq "eventcode" -and $application -eq "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.Message -match $pattern } | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + +##################################### +#De dos en dos +##################################### + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -ne "eventcode" -and $application -eq "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype -and $_.EventID -eq $eventcode} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -eq "eventcode" -and $application -ne "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype -and $_.Source -eq $application} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -eq "eventcode" -and $application -eq "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype -and $_.Message -match $pattern} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -ne "eventcode" -and $application -ne "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.Source -eq $application -and $_.EventID -eq $eventcode} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -ne "eventcode" -and $application -eq "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.Message -match $pattern -and $_.EventID -eq $eventcode} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -eq "eventcode" -and $application -ne "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.Source -eq $application -and $_.Message -match $pattern} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + +##################################### +#De tres en tres +##################################### + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -ne "eventcode" -and $application -ne "application" -and $pattern -eq "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype -and $_.EventID -eq $eventcode -and $_.Source -eq $application} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -ne "eventcode" -and $application -eq "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype -and $_.EventID -eq $eventcode -and $_.Message -match $pattern} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -eq "eventcode" -and $application -ne "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype -and $_.Message -match $pattern -and $_.Source -eq $application} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + if ($source -ne "source" -and $eventtype -eq "eventtype" -and $eventcode -ne "eventcode" -and $application -ne "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.Message -match $pattern -and $_.EventID -eq $eventcode -and $_.Source -eq $application} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + +##################################### +#Todas las operaciones seleccionadas +##################################### + + if ($source -ne "source" -and $eventtype -ne "eventtype" -and $eventcode -ne "eventcode" -and $application -ne "application" -and $pattern -ne "") { + + Get-EventLog $source | Select-Object -Property * | Where-Object { $_.EntryType -eq $eventtype -and $_.EventID -eq $eventcode -and $_.Source -eq $application -and $_.Message -match $pattern} | + + foreach-object { + + $eventid = $_.EventID + + $eventsource = $_.Source + "" + + $eventtype = $_.EntryType + + $message = $_.Message + "" + + $timestamp = $_.TimeGenerated + + $matchtstamp = New-TimeSpan -Start ($timestamp) | ForEach-Object { echo $_.TotalSeconds } | gawk -F "," '{print $1}' + + $matchtimestamp = $matchtstamp -as [long] + + if ($matchtimestamp -lt $datainterval) { + + print_module "$name" "async_string" "$timestamp - $message" "Event source: $source - Event application source: $eventsource - Event ID: $eventid - Event Type: $eventtype" + + } + + } + + } + + } + +} \ No newline at end of file diff --git a/pandora_plugins/Windows custom/df_free_percent.vbs b/pandora_plugins/Windows custom/df_free_percent.vbs new file mode 100644 index 0000000000..1d621741b3 --- /dev/null +++ b/pandora_plugins/Windows custom/df_free_percent.vbs @@ -0,0 +1,48 @@ +' df_all.vbs +' Returns free space (%) for all drives +' Pandora FMS Plugin, (c) 2014 Sancho Lerena +' ------------------------------------------ + +Option Explicit +On Error Resume Next + +' Variables +Dim objWMIService, objItem, colItems, argc, argv, i, Percent + + +' Parse command line parameters +argc = Wscript.Arguments.Count +Set argv = CreateObject("Scripting.Dictionary") +For i = 0 To argc - 1 + argv.Add Wscript.Arguments(i), i +Next + +' Get drive information +Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2") +Set colItems = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk") + +For Each objItem in colItems + If argc = 0 Or argv.Exists(objItem.Name) Then + ' Include only harddrivers (type 3) + If (objItem.FreeSpace <> "") AND (objItem.DriveType =3) Then + Percent = round ((objItem.FreeSpace / objItem.Size) * 100, 2) + Wscript.StdOut.WriteLine "" + Wscript.StdOut.WriteLine " " + Wscript.StdOut.WriteLine " " + If (Percent > 99.99) then + Wscript.StdOut.WriteLine " " + Elseif (Percent < 0.01) then + Wscript.StdOut.WriteLine " " + Else + Wscript.StdOut.WriteLine " " + End If + Wscript.StdOut.WriteLine " %" + Wscript.StdOut.WriteLine " 5" + Wscript.StdOut.WriteLine " 10" + Wscript.StdOut.WriteLine " 0" + Wscript.StdOut.WriteLine " 5" + Wscript.StdOut.WriteLine "" + Wscript.StdOut.flush + End If + End If +Next diff --git a/pandora_plugins/basic_security/README b/pandora_plugins/basic_security/README new file mode 100755 index 0000000000..baebbef7fe --- /dev/null +++ b/pandora_plugins/basic_security/README @@ -0,0 +1,67 @@ +Linux security monitoring Plugin for Pandora FMS +v1.0, 8th June 2016 + +Copyright (c) 2016 Sancho Lerena +Licensed and distributed under BSD Licence. + +Checkout more information about Pandora FMS monitoring at http://pandorafms.com + +ABOUT THIS PLUGIN +================= + +This plugin is intended to run ONLY on modern Linux boxes. It's ready to run on 64 & 32 bits. +It contains a custom build of John the ripper 1.8 + Contrib patches with 32&64 static binaries. The main concept of the plugin is to be monolothic, detect what can be hardened and try to solve differences between distros without asking nothing to the admin, so deployment could be the same for any system, ignoring versions, distro or architecture. + +This plugin will check: + + 1. User password audit check, using dictionary (provided) with the + 500 most common used passwords. This usually don't take more than a few seconds. If you have hundred of users, probably need to customize the plugin execution to be executed only each 2-6 hours. You can customize the password dictionary just adding your organization typical password in the file "basic_security/password-list". + 2. Check SSH on default port + 3. Check FTP on default port + 4. Check SSH to allow root access + 5. Verify if is there a MySQL running without root password defined. + +In the future we want to expand it's features to include file hashing check, detect bruteforce attacks by analyzing logs, improve hardening check on root enviroment, etc. Keep updated to see what's new in the next months. + +USAGE +===== + +1. Copy contents of tarball in a directory (Usually p.e /etc/pandora/plugins which should be linked to /usr/share/pandora_agent/plugins) + + tar xvzf /tmp/linux_basic_security.tar.gz /etc/pandora/plugins + +2. Edit your pandora_agent.conf and define a custom plugin call: + + module_plugin /usr/share/pandora_agent/plugins/basic_security/basic_security + +3. Restart the agent. It should report several modules with the information, all starting with SEC[xxxx]. + + +DEPENDENCIES +============ + +You need to have "john the ripper" installed on your server. We provide CentOS binaries (compatible with Redhat) due the imposibility to install john easily in CentOS servers. Password audit is by the way one of the most important checks you can do to assure your system security. + +With SUSE: + + zypper install john + +With Debian/Ubuntu + + apt-get install install john + +TESTING +======= + +Just call the plugin from commandline (you need root) to see if reports any error. + +This has been tested on: + +-Centos 6.7 32 bits +-Centos 6.7 64 bits +-Centos 7.1 64 bits +-Suse 11.3 64 Bit +-Ubuntu 14.x 64 Bit + +It contains a static build of john for 32 and 64 bits tested on Centos 6.7 and Centos 7, but +we cannot give you any WARRANTIES!. If doesnt work for you, get a running John package. diff --git a/pandora_plugins/basic_security/basic_security_v2 b/pandora_plugins/basic_security/basic_security_v2 new file mode 100755 index 0000000000..7431173edf --- /dev/null +++ b/pandora_plugins/basic_security/basic_security_v2 @@ -0,0 +1,498 @@ +#!/bin/bash + +# Linux security monitoring Plugin for Pandora FMS +# (c) Sancho Lerena 2016 +# (c) Pandora FMS Team +# info@pandorafms.com + +# This plugin is intended to run ONLY on modern Linux boxes +# It's ready to run on 64 & 32 bits. It contains a custom build +# of John the ripper 1.8 + Contrib patches with 32&64 static binaries. +# +# This plugin will check: +# +# 1. Check SSH on default port. +# 2. Check FTP on default port. +# 3. Check SSH to allow root access. +# 4. Check if we have MySQL running. +# 5. Check MySQL without root password (skipped if no MySQL detected). +# 6. Check MySQL bind address. +# 7. Check MySQL on default port if linstening on 0.0.0.0. +# 8. Check if SELinux is enabled. +# 9. Check /etc/shadow file integrity. +# 10. Check /etc/passwd file integrity. +# 11. Check /etc/hosts file integrity. +# 12. Check /etc/resolv file integrity. +# 13. Check /etc/ssh/sshd_config file integrity. +# 14. Check /etc/rsyslog.conf file integrity. +# 15. Check ssh keys on /home directory. +# 16. Check ssh keys on /root directory. +# 17. User password audit check, using dictionary (provided) with the +# 500 most common used passwords. + +# Future versions of this plugin will increase the number of checks +# providing a more advanced hardening monitoring. +# Tested on Centos 6, Centos 7, Suse 13.2 + +# Change to plugin directory +PLUGIN_DIR=`dirname "$0"` +cd $PLUGIN_DIR + +# Detect if SSH is running on port 22 +CHECK_22=`netstat -an | grep tcp | grep ":22 "` +if [ -z "$CHECK_22" ] +then + echo "" + echo "generic_proc" + echo "SEC[ssh_port]" + echo "1" + echo "SSH not running on 22" + echo "" +else + echo "" + echo "generic_proc" + echo "SEC[ssh_port]" + echo "0" + echo "SSH listening on port 22" + echo "" +fi + +# Detect if FTP is running on port 21 +CHECK_21=`netstat -an | grep tcp | grep ":21 "` +if [ -z "$CHECK_21" ] +then + echo "" + echo "generic_proc" + echo "SEC[ftp_port]" + echo "1" + echo "FTP not running on 21" + echo "" +else + echo "" + echo "generic_proc" + echo "SEC[ftp_port]" + echo "0" + echo "FTP listening on port 21" + echo "" +fi + +# Detect if SSH doesnt allow to Root to connect +CHECK_SSH_ROOT=`cat /etc/ssh/sshd_config | grep -E "^\s*PermitRootLogin"` +if [ -z "$CHECK_SSH_ROOT" ] +then + echo "" + echo "generic_proc" + echo "SEC[ssh_allow_root]" + echo "1" + echo "SSH doesn't allow root to connect" + echo "" +else + echo "" + echo "generic_proc" + echo "SEC[ssh_allow_root]" + echo "0" + echo "SSH does allow root to connect" + echo "" +fi + + +# Detect if local Mysql is without password +# First, do we have a running MySQL? +CHECK_MYSQL=`netstat -an | grep LISTEN | grep ":3306 "` +if [ ! -z "$CHECK_MYSQL" ] +then + + CHECK_MYSQL_PASS=`echo "select 1234" | mysql -u root 2> /dev/null | grep 1234` + if [ -z "$CHECK_MYSQL_PASS" ] + then + echo "" + echo "generic_proc" + echo "SEC[mysql_without_pass]" + echo "1" + echo "MySQL have a password" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[mysql_without_pass]" + echo "0" + echo "MySQL do not have a password" + echo "" + fi + + + CHECK_BIND=`netstat -natp | grep mysql | gawk '{print $4}'` + if [[ "$CHECK_BIND" != *"::1:"* ]] && [[ "$CHECK_BIND" != *"127.0.0.1:"* ]] + then + echo "" + echo "generic_proc" + echo "SEC[mysql_bind]" + echo "0" + echo "MySQL bind-address insecure" + echo "" + + CHECK_3306=`netstat -anp | grep mysql | grep ":3306 "` + if [ ! -z "$CHECK_3306" ] + then + echo "" + echo "generic_proc" + echo "SEC[mysql_port]" + echo "0" + echo "MySQL listening on 3306" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[mysql_port]" + echo "1" + echo "MySQL not listening on port 3306" + echo "" + fi + + else + echo "" + echo "generic_proc" + echo "SEC[mysql_bind]" + echo "1" + echo "MySQL bind-address on localhost" + echo "" + fi + +fi + +# Check if SELinux is enabled +CHECK_SELINUX=`sestatus | grep 'SELinux.*enabled'` +if [ ! -z "$CHECK_SELINUX" ] +then + echo "" + echo "generic_proc" + echo "SEC[SELinux_status]" + echo "1" + echo "SELinux is enabled" + echo "" +else + echo "" + echo "generic_proc" + echo "SEC[SELinux_status]" + echo "0" + echo "SELinux is disabled" + echo "" +fi + + +# Check if /etc/shadow has been modified since last execution +# First, check if there was a previous execution +if [ -f /tmp/md5shadow.md5 ] +then + MD5shaprev=`cat /tmp/md5shadow.md5` + MD5shanow=`md5sum /etc/shadow` + + if [ "$MD5shaprev" == "$MD5shanow" ] + then + echo "" + echo "generic_proc" + echo "SEC[shadow_integrity]" + echo "1" + echo "md5 unchanged" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[shadow_integrity]" + echo "0" + echo "md5 modified" + echo "" + fi + + # Update the md5 register file + md5sum /etc/shadow > /tmp/md5shadow.md5 +else + md5sum /etc/shadow > /tmp/md5shadow.md5 + echo "" + echo "generic_proc" + echo "SEC[shadow_integrity]" + echo "1" + echo "Creating md5 for the first time" + echo "" +fi + + +# Check if /etc/passwd has been modified since last execution +# First, check if there was a previous execution +if [ -f /tmp/md5passwd.md5 ] +then + MD5pasprev=`cat /tmp/md5passwd.md5` + MD5pasnow=`md5sum /etc/passwd` + + if [ "$MD5pasprev" == "$MD5pasnow" ] + then + echo "" + echo "generic_proc" + echo "SEC[passwd_integrity]" + echo "1" + echo "md5 unchanged" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[passwd_integrity]" + echo "0" + echo "md5 modified" + echo "" + fi + + # Update the md5 register file + md5sum /etc/passwd > /tmp/md5passwd.md5 +else + md5sum /etc/passwd > /tmp/md5passwd.md5 + echo "" + echo "generic_proc" + echo "SEC[passwd_integrity]" + echo "1" + echo "Creating md5 for the first time" + echo "" +fi + + +# Check if /etc/hosts has been modified since last execution +# First, check if there was a previous execution +if [ -f /tmp/md5hosts.md5 ] +then + MD5pasprev=`cat /tmp/md5hosts.md5` + MD5pasnow=`md5sum /etc/hosts` + + if [ "$MD5hosprev" == "$MD5hosnow" ] + then + echo "" + echo "generic_proc" + echo "SEC[hosts_integrity]" + echo "1" + echo "md5 unchanged" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[hosts_integrity]" + echo "0" + echo "md5 modified" + echo "" + fi + + # Update the md5 register file + md5sum /etc/hosts > /tmp/md5hosts.md5 +else + md5sum /etc/hosts > /tmp/md5hosts.md5 + echo "" + echo "generic_proc" + echo "SEC[hosts_integrity]" + echo "1" + echo "Creating md5 for the first time" + echo "" +fi + +# Check if /etc/resolv.conf has been modified since last execution +# First, check if there was a previous execution +if [ -f /tmp/md5resolv.md5 ] +then + MD5resprev=`cat /tmp/md5resolv.md5` + MD5resnow=`md5sum /etc/resolv.conf` + + if [ "$MD5resprev" == "$MD5resnow" ] + then + echo "" + echo "generic_proc" + echo "SEC[resolv_integrity]" + echo "1" + echo "md5 unchanged" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[resolv_integrity]" + echo "0" + echo "md5 modified" + echo "" + fi + + # Update the md5 register file + md5sum /etc/resolv.conf > /tmp/md5resolv.md5 +else + md5sum /etc/resolv.conf > /tmp/md5resolv.md5 + echo "" + echo "generic_proc" + echo "SEC[resolv_integrity]" + echo "1" + echo "Creating md5 for the first time" + echo "" +fi + +# Check if /etc/ssh/sshd_config has been modified since last execution +# First, check if there was a previous execution +if [ -f /tmp/md5ssh.md5 ] +then + MD5sshprev=`cat /tmp/md5ssh.md5` + MD5sshnow=`md5sum /etc/ssh/sshd_config` + + if [ "$MD5sshprev" == "$MD5sshnow" ] + then + echo "" + echo "generic_proc" + echo "SEC[ssh_config_integrity]" + echo "1" + echo "md5 unchanged" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[ssh_config_integrity]" + echo "0" + echo "md5 modified" + echo "" + fi + + # Update the md5 register file + md5sum /etc/ssh/sshd_config > /tmp/md5ssh.md5 +else + md5sum /etc/ssh/sshd_config > /tmp/md5ssh.md5 + echo "" + echo "generic_proc" + echo "SEC[ssh_config_integrity]" + echo "1" + echo "Creating md5 for the first time" + echo "" +fi + +# Check if /etc/rsyslog.conf has been modified since last execution +# First, check if there was a previous execution +if [ -f /tmp/md5sys.md5 ] +then + MD5sysprev=`cat /tmp/md5sys.md5` + MD5sysnow=`md5sum /etc/rsyslog.conf` + + if [ "$MD5sysprev" == "$MD5sysnow" ] + then + echo "" + echo "generic_proc" + echo "SEC[rsyslog_integrity]" + echo "1" + echo "md5 unchanged" + echo "" + else + echo "" + echo "generic_proc" + echo "SEC[rsyslog_integrity]" + echo "0" + echo "md5 modified" + echo "" + fi + + # Update the md5 register file + md5sum /etc/rsyslog.conf > /tmp/md5sys.md5 +else + md5sum /etc/rsyslog.conf > /tmp/md5sys.md5 + echo "" + echo "generic_proc" + echo "SEC[rsyslog_integrity]" + echo "1" + echo "Creating md5 for the first time" + echo "" +fi + +# Check SSH keys on /home directorie +CHECK_AKEYS=`find /home/ -name authorized_keys | wc -l` +if [ "$CHECK_AKEYS" == 0 ] +then + echo "" + echo "generic_data" + echo "SEC[authorized_keys_/home]" + echo "1" + echo "0" + echo "No authorized_keys found in /home" + echo "" +else + echo "" + echo "generic_data" + echo "SEC[authorized_keys_/home]" + echo "1" + echo "$CHECK_AKEYS" + echo "authorized_keys found in /home" + echo "" +fi + +# Check SSH keys on /root directories +CHECK_RAKEYS=`find /root/.ssh -name authorized_keys | wc -l` +if [ "$CHECK_RAKEYS" == 0 ] +then + echo "" + echo "generic_data" + echo "SEC[authorized_keys_/root]" + echo "1" + echo "0" + echo "No authorized_keys found in /root" + echo "" +else + echo "" + echo "generic_data" + echo "SEC[authorized_keys_/root]" + echo "1" + echo "$CHECK_RAKEYS" + echo "authorized_keys found in /root" + echo "" +fi + +# Password audit +# Check if exist a local John setup +ERROR_CODE=`which john 2> /dev/null` +if [ $? == 0 ] +then + JOHN=`which john` +else + ARCH=`uname -r | grep x86_64 | wc -l` + if [ $ARCH == 1 ] + then + JOHN=./john_64 + else + JOHN=./john_32 + fi +fi + +# Check if valid john kit, if not, skip audit pass +ERROR_CODE=`$JOHN 2> /dev/null ` +if [ $? != 0 ] +then + echo "" + echo "generic_proc" + echo "SEC[password_audit]" + echo "1" + echo "Cannot perform the test due missing John tool" + echo "WARNING" + echo "" +else + rm john.pot 2> /dev/null + rm /root/.john/john.pot 2> /dev/null + + RESULT=`$JOHN --wordlist=password-list /etc/shadow 2> /dev/null | grep -v "hashes with" | awk '{ print $2 }'` + if [ -z "$RESULT" ] + then + echo "" + echo "generic_proc" + echo "SEC[password_audit]" + echo "1" + echo "All users OK" + echo "" + else + RESULT_USER=`echo $RESULT | tr -d "()"` + echo "" + echo "generic_proc" + echo "SEC[password_audit]" + echo "0" + echo "Weak password on users: $RESULT_USER" + echo "" + fi + + rm john.pot 2> /dev/null + rm john.log 2> /dev/null + +fi + +exit 0 \ No newline at end of file diff --git a/pandora_plugins/basic_security/john.conf b/pandora_plugins/basic_security/john.conf new file mode 100755 index 0000000000..dc7e88c6d9 --- /dev/null +++ b/pandora_plugins/basic_security/john.conf @@ -0,0 +1,1987 @@ +# +# This file is part of John the Ripper password cracker, +# Copyright (c) 1996-2006,2008-2013 by Solar Designer +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted. +# +# There's ABSOLUTELY NO WARRANTY, express or implied. +# +# Please note that although this configuration file is under the cut-down BSD +# license above, many source files in John the Ripper are under GPLv2. +# For licensing terms for John the Ripper as a whole, see doc/LICENSE. +# +# ...with changes in the jumbo patch, by various authors +# + +# The [Options] section is for general options only. +# Note that MPI specific options have been moved +# to [Options.MPI] +# There is also a new section [Options.OpenCL] +# for OpenCL specific options +# Default settings for Markov mode have been moved +# to [Markov.Default], but you can define other +# Markov modes as well, see ../doc/MARKOV +[Options] +# Default wordlist file name (including in batch mode) +Wordlist = $JOHN/password.lst +# Use idle cycles only +Idle = Y +# Crash recovery file saving delay in seconds +Save = 60 +# Beep when a password is found (who needs this anyway?) +Beep = N +# if set to Y then dynamic format will always work with bare hashes. Normally +# dynamic only uses bare hashes if a single dynamic type is selected with +# the -format= (so -format=dynamic_0 would use valid bare hashes). +DynamicAlwaysUseBareHashes = N + +# Default Single mode rules +SingleRules = Single + +# Default batch mode Wordlist rules +BatchModeWordlistRules = Wordlist + +# Default wordlist mode rules when not in batch mode (if any) +# If this is set and you want to run once without rules, use --rules:none +#WordlistRules = Wordlist + +# Default loopback mode rules (if any) +# If this is set and you want to run once without rules, use --rules:none +LoopbackRules = Loopback + +# Default/batch mode Incremental mode +# Warning: changing these might currently break resume on existing sessions +DefaultIncremental = ASCII +#DefaultIncrementalUTF8 = UTF8 +DefaultIncrementalLM = LM_ASCII + +# Time formatting string used in status ETA. +# +# TimeFormat24 is used when ETA is within 24h, so it is possible to omit +# the date then if you like, and show seconds instead. +# +# %c means 'local' specific canonical form, such as: +# 05/06/11 18:10:34 +# +# Other examples +# %d/%m/%y %H:%M (day/mon/year hour:min) +# %m/%d/%y %H:%M (mon/day/year hour:min) +# %Y-%m-%d %H:%M (ISO 8601 style, 2011-05-06 18:10) +TimeFormat = %Y-%m-%d %H:%M +TimeFormat24 = %H:%M:%S + +# For single mode, load the full GECOS field (before splitting) as one +# additional candidate. Normal behavior is to only load individual words +# from that field. Enabling this can help when this field contains email +# addresses or other strings that are better used unsplit, but it increases +# the number of words tried so it may also slow things down. If enabling this +# you might want to bump SingleWordsPairMax too, below, to 10 or more. +PristineGecos = N + +# Over-ride SINGLE_WORDS_PAIR_MAX in params.h. This may slow down Single mode +# but it may also help cracking a few more candidates. Default in core John +# is 4 while the Jumbo default is 6. +SingleWordsPairMax = 6 + +# Emit a status line whenever a password is cracked (this is the same as +# passing the --crack-status option flag to john). NOTE: if this is set +# to true here, --crack-status will toggle it back to false. +CrackStatus = N + +# When printing status, show number of candidates tried (eg. 123456p). Note +# that the number *is* now equal to "words tried" and nothing else. +# This is added to the "+ Cracked" line in the log as well. +StatusShowCandidates = N + +# Write cracked passwords to the log file (default is just the user name) +LogCrackedPasswords = N + +# Disable the dupe checking when loading hashes. For testing purposes only! +NoLoaderDupeCheck = N + +# Default --encoding for input files (ie. login/GECOS fields) and wordlists +# etc. If this is not set here (you need to uncomment it) and --encoding is +# not used either, the default is ISO-8859-1 for Unicode conversions and 7-bit +# ASCII encoding is assumed for rules - so eg. uppercasing of letters other +# than a-z will not work at all! +#DefaultEncoding = UTF-8 + +# Default --target-encoding for Microsoft hashes (LM, NETLM et al) when input +# encoding is UTF-8. CP850 would be a universal choice for covering most +# "Latin-1" countries. +#DefaultMSCodepage = CP850 + +# Default --internal-encoding to be used by mask mode, and within the rules +# engine when both input and "target" encodings are Unicode (eg. UTF-8 +# wordlist and NT hashes). In some cases this hits performance but lets us +# do things like case conversions for UTF-8. You can pick any supported +# codepage that has as much support for the input data as possible - eg. for +# "Latin-1" language passwords you can use ISO-8859-1, CP850 or CP1252 and it +# will probably not make a difference. +#DefaultInternalEncoding = CP1252 + +# Warn if seeing UTF-8 when expecting some other encoding, or vice versa. +#WarnEncoding = Y + +# Always report (to screen and log) cracked passwords as UTF-8, regardless of +# input encoding. This is recommended if you have your terminal set for UTF-8. +#AlwaysReportUTF8 = Y + +# Always store Unicode (UTF-16) passwords as UTF-8 in john.pot, regardless +# of input encoding. This prevents john.pot from being filled with mixed +# and eventually unknown encodings. This is recommended if you have your +# terminal set for UTF-8 and/or you want to run --loopback for LM->NT +# including non-ASCII. +#UnicodeStoreUTF8 = Y + +# Always report/store non-Unicode formats as UTF-8, regardless of input +# encoding. Note: The actual codepage that was used is not stored anywhere +# except in the log file. This is needed eg. for --loopback to crack LM->NT +# including non-ASCII. +#CPstoreUTF8 = Y + +# Default verbosity is 3, valid figures are 1-5 right now. +# 4-5 enables some extra output +# 2 mutes rules & incremental output in logs (LOTS of lines) +# 1 even mutes printing (to screen) of cracked passwords +Verbosity = 2 + +# If set to Y, do not output, log or store cracked passwords verbatim. +# This implies a different default .pot database file "secure.pot" instead +# of "john.pot" but it can still be overridden using --pot=FILE. +# This also overrides other options, eg. LogCrackedPasswords. +SecureMode = N + +# If set to Y, a session using --fork or MPI will signal to other nodes when +# it has written cracks to the pot file (note that this writing is delayed +# by buffers and the "Save" timer above), so they will re-sync. +ReloadAtCrack = Y + +# If set to Y, resync pot file when saving session. +ReloadAtSave = Y + +# If this file exists, john will abort cleanly +AbortFile = /var/run/john/abort + +# While this file exists, john will pause +PauseFile = /var/run/john/pause + +[Options:MPI] +# Automagically disable OMP if MPI is used (set to N if +# you want to run one MPI process per multi-core host) +MPIOMPmutex = Y + +# Print a notice if disabling OMP (when MPIOMPmutex = Y) +# or when running OMP and MPI at the same time +MPIOMPverbose = Y + + +# These formats come disabled because of problems with many drivers. Even +# when disabled, you can use them as long as you spell them out with the +# --format option. Or you can delete a line, comment it out, or change to 'N' +[Disabled:Formats] +DEScrypt-opencl = N + + +# Options that affect both CUDA and OpenCL: +[Options:GPU] +# Show GPU temperature, fan and utilization along with normal status output +SensorsStatus = Y + +# Abort session if GPU hits this temperature (in C) +AbortTemperature = 95 + + +[Options:OpenCL] +# Set default OpenCL platform and/or device. Command line options will +# override these. If neither is set, we will search for a GPU or fall-back +# to platform 0, device 0. +#Platform = 0 +#Device = 0 + +# Global max. single kernel invocation duration, in ms. Setting this low +# (eg. 10-100 ms) gives you a better responding desktop but lower performance. +# Setting it high (eg. 200-500 ms) will maximize performance but your desktop +# may lag. Really high values may trip watchdogs (eg. 5 seconds). Some versions +# of AMD Catalyst may hang if you go above 200 ms, and in general any good +# kernel will perform optimally at 100-200 ms anyway. +#Global_MaxDuration = 200 + +# Some formats vectorize their kernels in case the device says it's a good +# idea. Some devices give "improper" hints which means we vectorize but get +# a performance drop. If you have such a device, uncommenting the below +# will disable vectorizing globally. +# With this set to N (or commented out) you can force it per session with +# the --force-scalar command-line option instead. +#ForceScalar = Y + +# Global build options. Format-specific build options below may be +# concatenated to this. +GlobalBuildOpts = -cl-mad-enable + +# Format-specific settings: + +# Uncomment the below for nvidia sm_30 and beyond +#sha512crypt_BuildOpts = -cl-nv-maxrregcount=80 + +# Example: Override auto-tune for RAR format. +#rar_LWS = 128 +#rar_GWS = 8192 + + +# Markov modes, see ../doc/MARKOV for more information +[Markov:Default] +# Default Markov mode settings +# +# Statsfile cannot be specified on the command line, so +# specifying it here is mandatory +Statsfile = $JOHN/stats +# MkvLvl and MkvMaxLen should also be specified here, as a fallback for +# --markov usage without specifying LEVEL and/or LENGTH on the command line +MkvLvl = 200 +MkvMaxLen = 12 +# MkvMinLvl and MkvMinLen should not be specified at all in [Markov:Default], +# or they should be equal to 0 (which is the default if not specified. +# MkvMinLvl and MkvMinLen can be used in other Markov mode sections +# except [Markov:Default] +; MkvMinLvl = 0 +; MkvMinLen = 0 + +# A user defined character class is named with a single digit, ie. 0..9. After +# the equal-sign, just list all characters that this class should match. You +# can specify ranges within brackets, much like pre-processor ranges in rules. +# BEWARE of encoding if using non-ASCII characters. If you put UTF-8 characters +# here, it will *not* work! You must use a singlebyte encoding and it should +# be the same here as you intend to use for your dictionary. +# You can however put characters here in \xA3 format (for codepoint 0xA3 - in +# many iso-8859 codepages that would mean a pound sign). This works in ranges +# too. Using \x00 is not supported though - it will not be parsed as null. +# +# This is a couple of example classes: +# ?0 matches (one version of) base64 characters +# ?1 matches hex digits +# ?2 matches the TAB character (never try to use \x00!) +[UserClasses] +0 = [a-zA-Z0-9/.] +1 = [0-9a-fA-F] +2 = \x09 + +[Mask] +# Default mask for -mask if none is given. This is same as Hashcat's default. +DefaultMask = ?1?2?2?2?2?2?2?3?3?3?3?d?d?d?d + +# Default mask for Hybrid mask mode if none is given. +DefaultHybridMask = ?w?d?d?d?d + +# Mask mode have custom placeholders ?1..?9 that look similar to user classes +# but are a different thing. They are merely defaults for the -1..-9 command +# line options. As delivered, they resemble Hashcat's defaults. +1 = ?l?d?u +2 = ?l?d +3 = ?l?d*!$@_ +4 = +5 = +6 = +7 = +8 = +9 = + +# these are user defined character sets. There purpose is to allow custom salt +# values to be used within the salt_regen logic. These will be the characters +# to use for this character within the salt. So if we had a salt that was 4 +# characters, and 0-9a-m, we can easily do this by 0 = [0-9a-m] If this is used, +# the regen salt value would be ?0?0?0?0 and salts such as a47m 2kd5 would be valid. +[Regen_Salts_UserClasses] +1 = [1-9] + +# A "no rules" rule for super fast Single mode (use with --single=none) +[List.Rules:None] +: + +# A "drop all" rule for even faster Single mode (debugging :) +[List.Rules:Drop] +<1'0 + +# "Single crack" mode rules +[List.Rules:Single] +# Simple rules come first... +: +-s x** +-c (?a c Q +-c l Q +-s-c x** /?u l +# These were not included in crackers I've seen, but are pretty efficient, +# so I include them near the beginning +-<6 >6 '6 +-<7 >7 '7 l +-<6 -c >6 '6 /?u l +-<5 >5 '5 +# Weird order, eh? Can't do anything about it, the order is based on the +# number of successful cracks... +<* d +r c +-c <* (?a d c +-<5 -c >5 '5 /?u l +-c u Q +-c )?a r l +-[:c] <* !?A \p1[lc] p +-c <* c Q d +-<7 -c >7 '7 /?u +-<4 >4 '4 l +-c <+ (?l c r +-c <+ )?l l Tm +-<3 >3 '3 +-<4 -c >4 '4 /?u +-<3 -c >3 '3 /?u l +-c u Q r +<* d M 'l f Q +-c <* l Q d M 'l f Q +# About 50% of single-mode-crackable passwords get cracked by now... +# >2 x12 ... >8 x18 +>[2-8] x1\1 +>9 \[ +# >3 x22 ... >9 x28 +>[3-9] x2\p[2-8] +# >4 x32 ... >9 x37 +>[4-9] x3\p[2-7] +# >2 x12 /?u l ... >8 x18 /?u l +-c >[2-8] x1\1 /?u l +-c >9 \[ /?u l +# >3 x22 /?u l ... >9 x28 /?u l +-c >[3-9] x2\p[2-8] /?u l +# >4 x32 /?u l ... >9 x37 /?u l +-c >[4-9] x3\p[2-7] /?u l +# Now to the suffix stuff... +<* l $[1-9!0a-rt-z"-/:-@\[-`{-~] +-c <* (?a c $[1-9!0a-rt-z"-/:-@\[-`{-~] +-[:c] <* !?A (?\p1[za] \p1[lc] $s M 'l p Q X0z0 'l $s +-[:c] <* /?A (?\p1[za] \p1[lc] $s +<* l r $[1-9!] +-c <* /?a u $[1-9!] +-[:c] <- (?\p1[za] \p1[lc] Az"'s" +-[:c] <- (?\p1[za] \p1[lc] Az"!!" +-[:c] (?\p1[za] \p1[lc] $! <- Az"!!" +# Removing vowels... +-[:c] /?v @?v >2 (?\p1[za] \p1[lc] +/?v @?v >2 <* d +# crack -> cracked, crack -> cracking +<* l [PI] +-c <* l [PI] (?a c +# mary -> marie +-[:c] <* (?\p1[za] \p1[lc] )y omi $e +# marie -> mary +-[:c] <* (?\p1[za] \p1[lc] )e \] )i val1 oay +# The following are some 3l33t rules +-[:c] l /[aelos] s\0\p[4310$] (?\p1[za] \p1[:c] +-[:c] l /a /[elos] sa4 s\0\p[310$] (?\p1[za] \p1[:c] +-[:c] l /e /[los] se3 s\0\p[10$] (?\p1[za] \p1[:c] +-[:c] l /l /[os] sl1 s\0\p[0$] (?\p1[za] \p1[:c] +-[:c] l /o /s so0 ss$ (?\p1[za] \p1[:c] +-[:c] l /a /e /[los] sa4 se3 s\0\p[10$] (?\p1[za] \p1[:c] +-[:c] l /a /l /[os] sa4 sl1 s\0\p[0$] (?\p1[za] \p1[:c] +-[:c] l /a /o /s sa4 so0 ss$ (?\p1[za] \p1[:c] +-[:c] l /e /l /[os] se3 sl1 s\0\p[0$] (?\p1[za] \p1[:c] +-[:c] l /[el] /o /s s\0\p[31] so0 ss$ (?\p1[za] \p1[:c] +-[:c] l /a /e /l /[os] sa4 se3 sl1 s\0\p[0$] (?\p1[za] \p1[:c] +-[:c] l /a /[el] /o /s sa4 s\0\p[31] so0 ss$ (?\p1[za] \p1[:c] +-[:c] l /e /l /o /s se3 sl1 so0 ss$ (?\p1[za] \p1[:c] +-[:c] l /a /e /l /o /s sa4 se3 sl1 so0 ss$ (?\p1[za] \p1[:c] +# Now to the prefix stuff... +l ^[1a-z2-90] +-c l Q ^[A-Z] +^[A-Z] +l ^["-/:-@\[-`{-~] +-[:c] <9 (?a \p1[lc] A0"[tT]he" +-[:c] <9 (?a \p1[lc] A0"[aA]my" +-[:c] <9 (?a \p1[lc] A0"[mdMD]r" +-[:c] <9 (?a \p1[lc] A0"[mdMD]r." +-[:c] <9 (?a \p1[lc] A0"__" +<- !?A l p ^[240-9] +# Some word pair rules... +# johnsmith -> JohnSmith, johnSmith +-p-c (?a 2 (?a c 1 [cl] +# JohnSmith -> john smith, john_smith, john-smith +-p 1 <- $[ _\-] + l +# JohnSmith -> John smith, John_smith, John-smith +-p-c 1 <- (?a c $[ _\-] 2 l +# JohnSmith -> john Smith, john_Smith, john-Smith +-p-c 1 <- l $[ _\-] 2 (?a c +# johnsmith -> John Smith, John_Smith, John-Smith +-p-c 1 <- (?a c $[ _\-] 2 (?a c +# Applying different simple rules to each of the two words +-p-[c:] 1 \p1[ur] 2 l +-p-c 2 (?a c 1 [ur] +-p-[c:] 1 l 2 \p1[ur] +-p-c 1 (?a c 2 [ur] +# jsmith -> smithj, etc... +-[:c] (?a \p1[lc] [{}] +-[:c] (?a \p1[lc] [{}] \0 +# Toggle case... +-c <+ )?u l Tm +-c T0 Q M c Q l Q u Q C Q X0z0 'l +-c T[1-9A-E] Q M l Tm Q C Q u Q l Q c Q X0z0 'l +-c l Q T[1-9A-E] Q M T\0 Q l Tm Q C Q u Q X0z0 'l +-c >2 2 /?l /?u t Q M c Q C Q l Tm Q X0z0 'l +# Deleting chars... +>[2-8] D\p[1-7] +>[8-9A-E] D\1 +-c /?u >[2-8] D\p[1-7] l +-c /?u >[8-9A-E] D\1 l +=1?a \[ M c Q +-c (?a >[1-9A-E] D\1 c +# Inserting a dot... +-[:c] >3 (?a \p1[lc] i[12]. +# More suffix stuff... +<- l Az"[190][0-9]" +-c <- (?a c Az"[190][0-9]" +<- l Az"[782][0-9]" +-c <- (?a c Az"[782][0-9]" +<* l $[A-Z] +-c <* (?a c $[A-Z] +# cracking -> CRACKiNG +-c u /I sIi +# Crack96 -> cRACK96 +%2?a C Q +# Crack96 -> cRACK(^ +/?A S Q +# Crack96 -> CRaCK96 +-c /?v V Q +# Really weird charset conversions, like "england" -> "rmh;smf" +:[RL] Q +l Q [RL] +-c (?a c Q [RL] +:[RL] \0 Q +# Both prefixing and suffixing... +<- l ^[1!@#$%^&*\-=_+.?|:'"] $\1 +<- l ^[({[<] $\p[)}\]>] +# The rest of two-digit suffix stuff, less common numbers... +<- l Az"[63-5][0-9]" +-c <- (?a c Az"[63-5][0-9]" +# Some multi-digit numbers... +-[:c] (?a \p1[lc] Az"007" <+ +-[:c] (?a \p1[lc] Az"123" <+ +-[:c] (?a \p1[lc] Az"[0-9]\0\0" <+ +-[:c] (?a \p1[lc] Az"1234" <+ +-[:c] (?a \p1[lc] Az"[0-9]\0\0\0" <+ +-[:c] (?a \p1[lc] Az"12345" <+ +-[:c] (?a \p1[lc] Az"[0-9]\0\0\0\0" <+ +-[:c] (?a \p1[lc] Az"123456" <+ +-[:c] (?a \p1[lc] Az"[0-9]\0\0\0\0\0" <+ +# Some [birth] years... +l Az"19[7-96-0]" <+ >- +l Az"20[01]" <+ >- +l Az"19[7-9][0-9]" <+ +l Az"20[01][0-9]" <+ +l Az"19[6-0][9-0]" <+ + +[List.Rules:Extra] +# Insert/overstrike some characters... +!?A >[1-6] l i\0[a-z] +!?A l o0[a-z] +!?A >[1-7] l o\0[a-z] +# Toggle case everywhere (up to length 8), assuming that certain case +# combinations were already tried. +-c T1 Q M T0 Q +-c T2 Q M T[z0] T[z1] Q +-c T3 Q M T[z0] T[z1] T[z2] Q +-c T4 Q M T[z0] T[z1] T[z2] T[z3] Q +-c T5 Q M T[z0] T[z1] T[z2] T[z3] T[z4] Q +-c T6 Q M T[z0] T[z1] T[z2] T[z3] T[z4] T[z5] Q +-c T7 Q M T[z0] T[z1] T[z2] T[z3] T[z4] T[z5] T[z6] Q +# Very slow stuff... +l Az"[1-90][0-9][0-9]" <+ +-c (?a c Az"[1-90][0-9][0-9]" <+ +<[\-9] l A\p[z0]"[a-z][a-z]" +<- l ^[a-z] $[a-z] + +# Wordlist mode rules +[List.Rules:Wordlist] +# Try words as they are +: +# Lowercase every pure alphanumeric word +-c >3 !?X l Q +# Capitalize every pure alphanumeric word +-c (?a >2 !?X c Q +# Lowercase and pluralize pure alphabetic words +<* >2 !?A l p +# Lowercase pure alphabetic words and append '1' +<* >2 !?A l $1 +# Capitalize pure alphabetic words and append '1' +-c <* >2 !?A c $1 +# Duplicate reasonably short pure alphabetic words (fred -> fredfred) +<7 >1 !?A l d +# Lowercase and reverse pure alphabetic words +>3 !?A l M r Q +# Prefix pure alphabetic words with '1' +>2 !?A l ^1 +# Uppercase pure alphanumeric words +-c >2 !?X u Q M c Q u +# Lowercase pure alphabetic words and append a digit or simple punctuation +<* >2 !?A l $[2!37954860.?] +# Words containing punctuation, which is then squeezed out, lowercase +/?p @?p >3 l +# Words with vowels removed, lowercase +/?v @?v >3 l +# Words containing whitespace, which is then squeezed out, lowercase +/?w @?w >3 l +# Capitalize and duplicate short pure alphabetic words (fred -> FredFred) +-c <7 >1 !?A c d +# Capitalize and reverse pure alphabetic words (fred -> derF) +-c <+ >2 !?A c r +# Reverse and capitalize pure alphabetic words (fred -> Derf) +-c >2 !?A l M r Q c +# Lowercase and reflect pure alphabetic words (fred -> fredderf) +<7 >1 !?A l d M 'l f Q +# Uppercase the last letter of pure alphabetic words (fred -> freD) +-c <+ >2 !?A l M r Q c r +# Prefix pure alphabetic words with '2' or '4' +>2 !?A l ^[24] +# Capitalize pure alphabetic words and append a digit or simple punctuation +-c <* >2 !?A c $[2!3957468.?0] +# Prefix pure alphabetic words with digits +>2 !?A l ^[379568] +# Capitalize and pluralize pure alphabetic words of reasonable length +-c <* >2 !?A c p +# Lowercase/capitalize pure alphabetic words of reasonable length and convert: +# crack -> cracked, crack -> cracking +-[:c] <* >2 !?A \p1[lc] M [PI] Q +# Try the second half of split passwords +-s x** +-s-c x** M l Q + +# Case toggler for cracking MD4-based NTLM hashes (with the contributed patch) +# given already cracked DES-based LM hashes. +# Use --rules=NT to use this +[List.Rules:NT] +: +-c T0Q +-c T1QT[z0] +-c T2QT[z0]T[z1] +-c T3QT[z0]T[z1]T[z2] +-c T4QT[z0]T[z1]T[z2]T[z3] +-c T5QT[z0]T[z1]T[z2]T[z3]T[z4] +-c T6QT[z0]T[z1]T[z2]T[z3]T[z4]T[z5] +-c T7QT[z0]T[z1]T[z2]T[z3]T[z4]T[z5]T[z6] +-c T8QT[z0]T[z1]T[z2]T[z3]T[z4]T[z5]T[z6]T[z7] +-c T9QT[z0]T[z1]T[z2]T[z3]T[z4]T[z5]T[z6]T[z7]T[z8] +-c TAQT[z0]T[z1]T[z2]T[z3]T[z4]T[z5]T[z6]T[z7]T[z8]T[z9] +-c TBQT[z0]T[z1]T[z2]T[z3]T[z4]T[z5]T[z6]T[z7]T[z8]T[z9]T[zA] +-c TCQT[z0]T[z1]T[z2]T[z3]T[z4]T[z5]T[z6]T[z7]T[z8]T[z9]T[zA]T[zB] +-c TDQT[z0]T[z1]T[z2]T[z3]T[z4]T[z5]T[z6]T[z7]T[z8]T[z9]T[zA]T[zB]T[zC] + +# Used for loopback. This rule will produce candidates "PASSWOR" and "D" for +# an input of "PASSWORD" (assuming LM, which has halves of length 7). +[List.Rules:Split] +: +-s x** + +# Some Office <=2003 files have passwords truncated at 15 +[List.Rules:OldOffice] +: +->F>F'F + +# Rules from Hash Runner 2014 +[List.Rules:o1] +o[0-9A-Z][ -~] + +[List.Rules:o2] +o[0-9A-E][ -~] Q M o[0-9A-E][ -~] Q + +[List.Rules:o3] +o[0-9][ -~] Q M o[0-9][ -~] Q M o[0-9][ -~] Q + +[List.Rules:o] +o[0-9A-Z][ -~] +o[0-9A-E][ -~] Q M o[0-9A-E][ -~] Q + +[List.Rules:i1] +i[0-9A-Z][ -~] + +[List.Rules:i2] +i[0-9A-E][ -~] i[0-9A-E][ -~] + +[List.Rules:i3] +i[0-9][ -~] i[0-9][ -~] i[0-9][ -~] + +[List.Rules:i] +i[0-9A-Z][ -~] +i[0-9A-E][ -~] i[0-9A-E][ -~] + +[List.Rules:oi] +o[0-9A-Z][ -~] +i[0-9A-Z][ -~] +o[0-9A-E][ -~] Q M o[0-9A-E][ -~] Q +i[0-9A-E][ -~] i[0-9A-E][ -~] + + int i, j, s, next, nextp, val, bucket, randnum, used_charsets; + int seedarray[56]; + int candidate[32]; /* This needs to be at-least as big as password-length */ + + seed = 0; + + while(seed > 0) { + /* BEGIN System.Random(seed) */ + s = 161803398 - seed++; + seedarray[55] = s; + i = val = 1; + + while(i < 55) { + bucket = 21 * i % 55; + seedarray[bucket] = val; + val = s - val; + if(val < 0) val += 2147483647; + s = seedarray[bucket]; + i++; + } + + i = 1; + while(i < 5) { + j = 1; + while(j < 56) { + seedarray[j] -= seedarray[1 + (j + 30) % 55]; + if(seedarray[j] < 0) seedarray[j] += 2147483647; + j++; + } + i++; + } + next = 0; + nextp = 21; + /* END System.Random(seed) */ + + used_charsets = 0; + while(used_charsets != 15) { + i = 0; + while(i < password_length) { + /* BEGIN Random.Sample() */ + if (++next >= 56) next = 1; + if (++nextp >= 56) nextp = 1; + randnum = seedarray[next] - seedarray[nextp]; + if (randnum == 2147483647) randnum--; + if (randnum < 0) randnum += 2147483647; + seedarray[next] = randnum; + /* END Random.Sample() */ + + j = 0; + while(boundaries_charclass[j] < randnum) j++; + + candidate[i] = j; + used_charsets |= (1 << j); + i++; + } + } + + i = 0; + while(i < password_length) { + /* BEGIN Random.Sample() */ + if (++next >= 56) next = 1; + if (++nextp >= 56) nextp = 1; + randnum = seedarray[next] - seedarray[nextp]; + if (randnum == 2147483647) randnum--; + if (randnum < 0) randnum += 2147483647; + seedarray[next] = randnum; + /* END Random.Sample() */ + j = 0; + + if(candidate[i] == 0) { + while(boundaries_letters[j] < randnum) j++; + if(lowers[j] != word[i++]) break; + } else if (candidate[i] == 1) { + while(boundaries_letters[j] < randnum) j++; + if(uppers[j] != word[i++]) break; + } else if (candidate[i] == 2) { + while(boundaries_numbers[j] < randnum) j++; + if(numbers[j] != word[i++]) break; + } else { /* if (word[i] == 3) */ + while(boundaries_symbols[j] < randnum) j++; + if(symbols[j] != word[i++]) break; + } + } + if(i == password_length) return; + } +} + +# Try sequences of adjacent keys on a keyboard as candidate passwords +[List.External:Keyboard] +int maxlength, length; // Maximum password length to try, current length +int fuzz; // The desired "fuzz factor", either 0 or 1 +int id[15]; // Current character indices for each position +int m[0x800]; // The keys matrix +int mc[0x100]; // Counts of adjacent keys +int f[0x40], fc; // Characters for the first position, their count + +void init() +{ + int minlength; + int i, j, c, p; + int k[0x40]; + + // Initial password length to try + if (req_minlen) + minlength = req_minlen; + else + minlength = 1; + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = cipher_limit; // the format's limit + fuzz = 1; // "Fuzz factor", set to 0 for much quicker runs + +/* + * This defines the keyboard layout, by default for a QWERTY keyboard. + */ + i = 0; while (i < 0x40) k[i++] = 0; + k[0] = '`'; + i = 0; while (++i <= 9) k[i] = '0' + i; + k[10] = '0'; k[11] = '-'; k[12] = '='; + k[0x11] = 'q'; k[0x12] = 'w'; k[0x13] = 'e'; k[0x14] = 'r'; + k[0x15] = 't'; k[0x16] = 'y'; k[0x17] = 'u'; k[0x18] = 'i'; + k[0x19] = 'o'; k[0x1a] = 'p'; k[0x1b] = '['; k[0x1c] = ']'; + k[0x1d] = '\\'; + k[0x21] = 'a'; k[0x22] = 's'; k[0x23] = 'd'; k[0x24] = 'f'; + k[0x25] = 'g'; k[0x26] = 'h'; k[0x27] = 'j'; k[0x28] = 'k'; + k[0x29] = 'l'; k[0x2a] = ';'; k[0x2b] = '\''; + k[0x31] = 'z'; k[0x32] = 'x'; k[0x33] = 'c'; k[0x34] = 'v'; + k[0x35] = 'b'; k[0x36] = 'n'; k[0x37] = 'm'; k[0x38] = ','; + k[0x39] = '.'; k[0x3a] = '/'; + + i = 0; while (i < 0x100) mc[i++] = 0; + fc = 0; + + /* rows */ + c = 0; + i = 0; + while (i < 0x40) { + p = c; + c = k[i++] & 0xff; + if (!c) continue; + f[fc++] = c; + if (!p) continue; + m[(c << 3) + mc[c]++] = p; + m[(p << 3) + mc[p]++] = c; + } + f[fc] = 0; + + /* columns */ + i = 0; + while (i < 0x30) { + p = k[i++] & 0xff; + if (!p) continue; + j = 1 - fuzz; + while (j <= 1 + fuzz) { + c = k[i + 0x10 - j++] & 0xff; + if (!c) continue; + m[(c << 3) + mc[c]++] = p; + m[(p << 3) + mc[p]++] = c; + } + } + + length = 0; + while (length < minlength) + id[length++] = 0; +} + +void generate() +{ + int i, p, maxcount; + + word[i = 0] = p = f[id[0]]; + while (++i < length) + word[i] = p = m[(p << 3) + id[i]]; + word[i--] = 0; + + if (i) maxcount = mc[word[i - 1]]; else maxcount = fc; + while (++id[i] >= maxcount) { + if (!i) { + if (length < maxlength) { + id[0] = 0; + id[length++] = 0; + } + return; + } + id[i--] = 0; + if (i) maxcount = mc[word[i - 1]]; else maxcount = fc; + } +} + +void restore() +{ + int i; + + /* Calculate the length */ + length = 0; + while (word[length]) + id[length++] = 0; + + /* Infer the first character index */ + i = -1; + while (++i < fc) { + if (f[i] == word[0]) { + id[0] = i; + break; + } + } + + /* This sample can be enhanced to infer the rest of the indices here */ +} + +# Simplest (fastest?) possible dumb exhaustive search, demonstrating a +# mode that does not need any special restore() handling. +# Defaults to printable ASCII. +[List.External:DumbDumb] +int maxlength; // Maximum password length to try +int startchar, endchar; // Range of characters (inclusive) + +void init() +{ + int i; + + startchar = ' '; // Start with space + endchar = '~'; // End with tilde + + // Create first word, honoring --min-len + if (!(i = req_minlen)) + i++; + word[i] = 0; + while (i--) + word[i] = startchar; + word[0] = startchar - 1; + + if (req_maxlen) + maxlength = req_maxlen; // --max-len + else + maxlength = cipher_limit; // format's limit +} + +void generate() +{ + int i; + + if (++word <= endchar) + return; + + i = 0; + + while (word[i] > endchar) { + word[i++] = startchar; + if (!word[i]) { + word[i] = startchar; + word[i + 1] = 0; + } else + word[i]++; + } + + if (i >= maxlength) + word = 0; +} + +/* + * This mode will resume correctly without any restore handing. + * The empty function just confirms to John that everything is in order. + */ +void restore() +{ +} + +# Generic implementation of "dumb" exhaustive search, given a range of lengths +# and an arbitrary charset. This is pre-configured to try 8-bit characters +# against LM hashes, which is only reasonable to do for very short password +# half lengths. +[List.External:DumbForce] +int maxlength; // Maximum password length to try +int last; // Last character position, zero-based +int lastid; // Character index in the last position +int id[0x7f]; // Current character indices for other positions +int charset[0x100], c0; // Character set + +void init() +{ + int minlength; + int i, c; + + // Initial password length to try, must be at least 1 + if (req_minlen) + minlength = req_minlen; + else + minlength = 1; + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = cipher_limit; // the format's limit + +/* + * This defines the character set. + * + * Let's say, we want to try TAB, all non-control ASCII characters, and all + * 8-bit characters, including the 8-bit terminal controls range (as these are + * used as regular national characters with some 8-bit encodings), but except + * for known terminal controls (risky for the terminal we may be running on). + * + * Also, let's say our hashes are case-insensitive, so skip lowercase letters + * (this is right for LM hashes). + */ + i = 0; + charset[i++] = 9; // Add horizontal TAB (ASCII 9), then + c = ' '; // start with space (ASCII 32) and + while (c < 'a') // proceed till lowercase 'a' + charset[i++] = c++; + c = 'z' + 1; // Skip lowercase letters and + while (c <= 0x7e) // proceed for all printable ASCII + charset[i++] = c++; + c++; // Skip DEL (ASCII 127) and + while (c < 0x84) // proceed over 8-bit codes till IND + charset[i++] = c++; + charset[i++] = 0x86; // Skip IND (84 hex) and NEL (85 hex) + charset[i++] = 0x87; + c = 0x89; // Skip HTS (88 hex) + while (c < 0x8d) // Proceed till RI (8D hex) + charset[i++] = c++; + c = 0x91; // Skip RI, SS2, SS3, DCS + while (c < 0x96) // Proceed till SPA (96 hex) + charset[i++] = c++; + charset[i++] = 0x99; // Skip SPA, EPA, SOS + c = 0xa0; // Skip DECID, CSI, ST, OSC, PM, APC + while (c <= 0xff) // Proceed with the rest of 8-bit codes + charset[i++] = c++; + +/* Zero-terminate it, and cache the first character */ + charset[i] = 0; + c0 = charset[0]; + + last = minlength - 1; + i = 0; + while (i <= last) { + id[i] = 0; + word[i++] = c0; + } + lastid = -1; + word[i] = 0; +} + +void generate() +{ + int i; + +/* Handle the typical case specially */ + if (word[last] = charset[++lastid]) return; + + lastid = 0; + word[i = last] = c0; + while (i--) { // Have a preceding position? + if (word[i] = charset[++id[i]]) return; + id[i] = 0; + word[i] = c0; + } + + if (++last < maxlength) { // Next length? + id[last] = lastid = 0; + word[last] = c0; + word[last + 1] = 0; + } else // We're done + word = 0; +} + +void restore() +{ + int i, c; + +/* Calculate the current length and infer the character indices */ + last = 0; + while (c = word[last]) { + i = 0; while (charset[i] != c && charset[i]) i++; + if (!charset[i]) i = 0; // Not found + id[last++] = i; + } + lastid = id[--last]; +} + +# Generic implementation of exhaustive search for a partially-known password. +# This is pre-configured for length 8, lowercase and uppercase letters in the +# first 4 positions (52 different characters), and digits in the remaining 4 +# positions - however, the corresponding part of init() may be modified to use +# arbitrary character sets or even fixed characters for each position. +[List.External:KnownForce] +int last; // Last character position, zero-based +int lastofs; // Last character position offset into charset[] +int lastid; // Current character index in the last position +int id[0x7f]; // Current character indices for other positions +int charset[0x7f00]; // Character sets, 0x100 elements for each position + +void init() +{ + int length, maxlength; + int pos, ofs, i, c; + + if (req_minlen) + length = req_minlen; + else + length = 8; // Password length to try (NOTE: other [eg. shorter] + // lengths will not be tried!) + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = cipher_limit; // the format's limit + +/* This defines the character sets for different character positions */ + if (length > maxlength) + length = maxlength; + pos = 0; + while (pos < 4) { + ofs = pos++ << 8; + i = 0; + c = 'a'; + while (c <= 'z') + charset[ofs + i++] = c++; + c = 'A'; + while (c <= 'Z') + charset[ofs + i++] = c++; + charset[ofs + i] = 0; + } + while (pos < length) { + ofs = pos++ << 8; + i = 0; + c = '0'; + while (c <= '9') + charset[ofs + i++] = c++; + charset[ofs + i] = 0; + } + + last = length - 1; + pos = -1; + while (++pos <= last) + word[pos] = charset[id[pos] = pos << 8]; + lastid = (lastofs = last << 8) - 1; + word[pos] = 0; +} + +void generate() +{ + int pos; + +/* Handle the typical case specially */ + if (word[last] = charset[++lastid]) return; + + word[pos = last] = charset[lastid = lastofs]; + while (pos--) { // Have a preceding position? + if (word[pos] = charset[++id[pos]]) return; + word[pos] = charset[id[pos] = pos << 8]; + } + + word = 0; // We're done +} + +void restore() +{ + int i, c; + +/* Calculate the current length and infer the character indices */ + last = 0; + while (c = word[last]) { + i = lastofs = last << 8; + while (charset[i] != c && charset[i]) i++; + if (!charset[i]) i = lastofs; // Not found + id[last++] = i; + } + lastid = id[--last]; +} + +# A variation of KnownForce configured to try likely date and time strings. +[List.External:DateTime] +int last; // Last character position, zero-based +int lastofs; // Last character position offset into charset[] +int lastid; // Current character index in the last position +int id[0x7f]; // Current character indices for other positions +int charset[0x7f00]; // Character sets, 0x100 elements for each position + +void init() +{ + int length; + int pos, ofs, i, c; + + length = 8; // Must be one of: 4, 5, 7, 8 + +/* This defines the character sets for different character positions */ + pos = 0; + while (pos < length - 6) { + ofs = pos++ << 8; + i = 0; + c = '0'; + while (c <= '9') + charset[ofs + i++] = c++; + charset[ofs + i] = 0; + } + if (pos) { + ofs = pos++ << 8; + charset[ofs] = '/'; + charset[ofs + 1] = '.'; + charset[ofs + 2] = ':'; + charset[ofs + 3] = 0; + } + while (pos < length - 3) { + ofs = pos++ << 8; + i = 0; + c = '0'; + while (c <= '9') + charset[ofs + i++] = c++; + charset[ofs + i] = 0; + } + ofs = pos++ << 8; + charset[ofs] = '/'; + charset[ofs + 1] = '.'; + charset[ofs + 2] = ':'; + charset[ofs + 3] = 0; + while (pos < length) { + ofs = pos++ << 8; + i = 0; + c = '0'; + while (c <= '9') + charset[ofs + i++] = c++; + charset[ofs + i] = 0; + } + + last = length - 1; + pos = -1; + while (++pos <= last) + word[pos] = charset[id[pos] = pos << 8]; + lastid = (lastofs = last << 8) - 1; + word[pos] = 0; +} + +void generate() +{ + int pos; + +/* Handle the typical case specially */ + if (word[last] = charset[++lastid]) return; + + word[pos = last] = charset[lastid = lastofs]; + while (pos--) { // Have a preceding position? + if (word[pos] = charset[++id[pos]]) return; + word[pos] = charset[id[pos] = pos << 8]; + } + + word = 0; // We're done +} + +void restore() +{ + int i, c; + +/* Calculate the current length and infer the character indices */ + last = 0; + while (c = word[last]) { + i = lastofs = last << 8; + while (charset[i] != c && charset[i]) i++; + if (!charset[i]) i = lastofs; // Not found + id[last++] = i; + } + lastid = id[--last]; +} + +# Try strings of repeated characters. +# +# This is the code which is common for all [List.External:Repeats*] +# sections which include this External_base section. +# The generate() function will limit the maximum length of generated +# candidates to either the format's limit (maximum password length) +# or to the limit specified with --stdout=LENGTH (Default: 125), +# thus avoiding duplicate candidates for formats with limited maximum +# passwortd length. +# The comparison of the current length and the limit is only done +# after switching to a new length. +# So, if the minimum length specified already exceeds this limit, +# then all the candidates for the minimum length will be generated +# nevertheless. +[List.External_base:Repeats] +int minlength, maxlength, minc, maxc, length, c; + +void generate() +{ + int i; + + i = 0; + while (i < length) + word[i++] = c; + word[i] = 0; + + if (c++ < maxc) + return; + + c = minc; + + if (++length > maxlength) + c = 0; // Will NUL out the next "word" and thus terminate +} + +# Try strings of repeated characters (range: space - 0xff). +[List.External:Repeats] +.include [List.External_base:Repeats] +void init() +{ + if (req_minlen) + minlength = req_minlen; + else + minlength = 1; + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = cipher_limit; // the format's limit + minc = 0x20; + maxc = 0xff; + + length = minlength; c = minc; +} + +# Try strings of repeated digits (range: '0' - '9'). +[List.External:Repeats_digits] +.include [List.External_base:Repeats] +void init() +{ + if (req_minlen) + minlength = req_minlen; + else + minlength = 1; + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = cipher_limit; // the format's limit + minc = '0'; + maxc = '9'; + + length = minlength; c = minc; +} + +# Try strings of repeated lowercase letters (range: 'a' - 'z'). +[List.External:Repeats_lowercase] +.include [List.External_base:Repeats] +void init() +{ + if (req_minlen) + minlength = req_minlen; + else + minlength = 1; + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = cipher_limit; // the format's limit + minc = 'a'; + maxc = 'z'; + + length = minlength; c = minc; +} + +# Try strings of repeated printable ASCII characters +# (range: ' ' - '~'). +[List.External:Repeats_printable_ASCII] +.include [List.External_base:Repeats] +void init() +{ + if (req_minlen) + minlength = req_minlen; + else + minlength = 1; + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = cipher_limit; // the format's limit + minc = ' '; + maxc = '~'; + + length = minlength; c = minc; +} + +# Try character sequences ("0123456", "acegikmoqs", "ZYXWVU", etc.). +# +# The generate() function will limit the maximum length of generated +# candidates to either the format's limit (maximum password length) +# or to the limit specified with --stdout=LENGTH (Default: 125), +# thus avoiding duplicate candidates for formats with limited maximum +# passwortd length. +# The comparison of the current length and the limit is only done +# after switching to a new length. +# So, if the minimum length specified already exceeds this limit, +# then all the candidates for the minimum length will be generated +# nevertheless. +# External modes reusing this External_base mode should only need to +# adjust the init() function. +# In the init() function, a minimum length which is > 1 should be +# specified. +# Otherwise, the generated candidates will not depend on the increment +# specified. +# For length = 1, the candidates will be the same as for external mode +# Repeats with length 1. +# Actually, Repeats is a special case of Sequence, using increment = 0. +# External modes reusing this External_base mode should also make sure +# that the number of different characters (specified as a range from "from" +# to "to") is not smaller than the minimum length ("minlength"), +# if the start increment "inc" is 1. +# For a start increment > 1, the number of different characters in the +# range "from" - "to" must be greater than or equal to +# (1 + ("minlength" - 1) * "inc"). +# Otherwise you might get unexpected results. +# The range of characters to be used for the sequences needs to be +# specified by adjusting the "from" and "to" variables. +# To generate sequences which decrement characters ("987654"), +# "from" must be > "to". +# Otherwise, the generated sequences will increment characters ("abcdef"). +# +# Variables to be used and the generate() function are common +# for all sections which include this External_base section. +[List.External_base:Sequence] +/* + * See the [List.External:Sequence_0-9] section to learn more about + * the meaning of these variables which can be adjusted to define + * new external modes based on an existing one: + */ +int minlength, from, to, maxlength, inc, direction; + +/* + * The value of these variables shouldn't be changed when copying + * an existing external mode: + */ +int length, first; + +void generate() +{ + int i; + + i = 0; + + while (i < length) { + word[i] = first + (i * inc * direction); + ++i; + } + word[i] = 0; + + // start the next sequence of the same length + // with the next character + first = first + direction; + + // But check that a sequence of the current length + // is still possible (without leaving the range of + // characters allowed + if ((direction > 0 && first + (length - 1) * inc > to) || + (direction < 0 && first - (length - 1) * inc < to)) { + // No more sequence is possible. Reset start character + first = from; + // Now try the next length. + // But just in case an individual External mode reusing + // this External_base mode did specify a maxlength + // which is larger than the one supported by the format + // or by --stdout=LENGTH, make sure no more candidates + // are generated. + // Checking this just once per length per increment + // doen't really hurt performance. + if (maxlength > cipher_limit) + maxlength = cipher_limit; + + // For a similar reason, the maximum length of a + // sequence is limited by the number of different + // characters and by the increment. + // The larger the increment, the smaller + // the maximum possible length for a given + // character range. + while (inc * (maxlength - 1) > direction * (to - from)) + --maxlength; + + if (++length > maxlength) { + // The maximum length for this increment has been reached. + // Restart at minimum length with the next possible + // increment + ++inc; + // Unfortunately, we have to check again + // if the maximum length needs to be reduced + // for the new increment + while (inc * (maxlength - 1) > direction * (to - from)) + --maxlength; + + length = minlength; + } + if (maxlength < minlength) + // With the current increment, we can't even generate + // sequences of the minimum required length. + // So we need to stop here. + // This will make sure that no more candidiates + // will be generated: + first = 0; + } +} + +# Try sequences of digits (range: '0' - '9'). +# +# Aditional comments can be found in the +# section [List.External_base:Sequence] +# +# This external mode is thoroughly commented, +# to make it easier to copy and adjust it as needed. +[List.External:Sequence_0-9] +.include [List.External_base:Sequence] +void init() +{ + // Adjust the following 4 variables if you want to define + // a different external mode. + + // This is the start character for the generated sequence + // if "from" is smaller than "to", the increment from + // first to second character ... will be positive ("0123456789"). + // Otherwise, it will be negative ("987654321"). + from = '0'; + to = '9'; + + // minimum length of the sequence + // make sure it is not larger than the number of different characters + // in the range between "from" and "to" specified above + minlength = 2; + + // start increment for generating the sequence, usually 1 + // if it is larger than 1, you need even more characters + // in the range between "from" and "to" + // Don't specify a negative value here. + // If you want to generate sequences like "zyxwvu" or "86420", + // adjust "from" and "to" so that "from" is larger than "to". + // (A start increment of 0 is also possible, in that case the first + // sequences will be candidates which just repeat the same character.) + inc = 1; + + // For copied external modes, no further changes should be required + // in the statements following this comment + + length = minlength; + first = from; + + if (from <= to) { + maxlength = to - from + 1; + direction = 1; + } else { + // We have to create sequences which decrement the previous character + maxlength = from - to + 1; + direction = -1; + } +} + +# Try sequence of lower case letters (range: 'a' - 'z'). +# This external mode is not very well documented. +# Refer to [List.External:Sequence_0-9] for more detailed information. +[List.External:Sequence_a-z] +.include [List.External_base:Sequence] +void init() +{ + from = 'a'; + to = 'z'; + minlength = 2; + inc = 1; + + length = minlength; + first = from; + + if (from <= to) { + maxlength = to - from + 1; + direction = 1; + } else { + maxlength = from - to + 1; + direction = -1; + } +} + +# Try sequence of lower case letters (range: 'a' - 'z'), but reversed +# ("zxywvu"). +# This external mode is not very well documented. +# Refer to [List.External:Sequence_0-9] for more detailed information. +[List.External:Sequence_z-a] +.include [List.External_base:Sequence] +void init() +{ + from = 'z'; + to = 'a'; + minlength = 2; + inc = 1; + + length = minlength; + first = from; + + if (from <= to) { + maxlength = to - from + 1; + direction = 1; + } else { + maxlength = from - to + 1; + direction = -1; + } +} + +# Try sequence of printable ASCII characters (range: ' ' - '~'). +# This external mode is not very well documented. +# Refer to [List.External:Sequence_0-9] for more detailed information. +[List.External:Sequence_printable_ascii] +.include [List.External_base:Sequence] +void init() +{ + from = ' '; + to = '~'; + minlength = 2; + inc = 1; + + length = minlength; + first = from; + + if (from <= to) { + maxlength = to - from + 1; + direction = 1; + } else { + maxlength = from - to + 1; + direction = -1; + } +} + +# Try sequence of printable ASCII characters (range: ' ' - '~'), +# but decrementing characters ("fedcba") instead of incrementing. +# This external mode is not very well documented. +# Refer to [List.External:Sequence_0-9] for more detailed information. +[List.External:Sequence_reversed_ascii] +.include [List.External_base:Sequence] +void init() +{ + from = '~'; + to = ' '; + minlength = 2; + inc = 1; + + length = minlength; + first = from; + + if (from <= to) { + maxlength = to - from + 1; + direction = 1; + } else { + maxlength = from - to + 1; + direction = -1; + } +} + +# Try sequence of characters (range: space - 0xff). +# This external mode is not very well documented. +# Refer to [List.External:Sequence_0-9] for more detailed information. +[List.External:Sequence] +.include [List.External_base:Sequence] +void init() +{ + from = ' '; + to = 0xff; + minlength = 2; + inc = 1; + + length = minlength; + first = from; + + if (from <= to) { + maxlength = to - from + 1; + direction = 1; + } else { + maxlength = from - to + 1; + direction = -1; + } +} + + +# Generate candidate passwords from many small subsets of characters from a +# much larger full character set. This will test for passwords containing too +# few different characters. As currently implemented, this code will produce +# some duplicates, although their number is relatively small when the maximum +# number of different characters (the maxdiff setting) is significantly lower +# than the maximum length (the maxlength setting). Nevertheless, you may want +# to pass the resulting candidate passwords through "unique" if you intend to +# test them against hashes that are salted and/or of a slow to compute type. +[List.External:Subsets] +int minlength; // Minimum password length to try +int maxlength; // Maximum password length to try +int startdiff; // Initial number of characters in a subset to try +int maxdiff; // Maximum number of characters in a subset to try +int last; // Last character position, zero-based +int lastid; // Character index in the last position +int id[0x7f]; // Current character indices for other positions +int subset[0x100], c0; // Current subset +int subcount; // Number of characters in the current subset +int subid[0x100]; // Indices into charset[] of characters in subset[] +int charset[0x100]; // Full character set +int charcount; // Number of characters in the full charset + +void init() +{ + int i, c; + + // Minimum password length to try, must be at least 1 + if (req_minlen) + minlength = req_minlen; + else + minlength = 1; + + // Maximum password length to try, must be at least same as minlength + // This external mode's default maximum length can be adjusted + // using --max-length= on the command line + if (req_maxlen) + maxlength = req_maxlen; + else + maxlength = 8; + + // "cipher_limit" is the variable which contains the format's + // maximum password length + if (maxlength > cipher_limit) + maxlength = cipher_limit; + + startdiff = 1; // Initial number of different characters to try + maxdiff = 3; // Maximum number of different characters to try + +/* This defines the character set */ + i = 0; + c = 0x20; + while (c <= 0x7e) + charset[i++] = c++; + + if (maxdiff > (charcount = i)) + maxdiff = i; + if (maxdiff > maxlength) + maxdiff = maxlength; + +/* + * Initialize the variables such that generate() gets to its "next subset" + * code, which will initialize everything for real. + */ + subcount = (i = startdiff) - 1; + while (i--) + subid[i] = charcount; + subset[0] = c0 = 0; + last = maxlength - 1; + lastid = -1; +} + +void generate() +{ + int i; + +/* Handle the typical case specially */ + if (word[last] = subset[++lastid]) return; + + lastid = 0; + word[i = last] = c0; + while (i--) { // Have a preceding position? + if (word[i] = subset[++id[i]]) return; + id[i] = 0; + word[i] = c0; + } + + if (++last < maxlength) { // Next length? + id[last] = lastid = 0; + word[last] = c0; + word[last + 1] = 0; + return; + } + +/* Next subset */ + if (subcount) { + int j; + i = subcount - 1; + j = charcount; + while (++subid[i] >= j) { + if (i--) { + j--; + continue; + } + subid[i = 0] = 0; + subset[++subcount] = 0; + break; + } + } else { + subid[i = 0] = 0; + subset[++subcount] = 0; + } + subset[i] = charset[subid[i]]; + while (++i < subcount) + subset[i] = charset[subid[i] = subid[i - 1] + 1]; + + if (subcount > maxdiff) { + word = 0; // Done + return; + } + +/* + * We won't be able to fully use the subset if the length is smaller than the + * character count. We assume that we've tried all smaller subsets before, so + * we don't bother with such short lengths. + */ + if (minlength < subcount) + last = subcount - 1; + else + last = minlength - 1; + c0 = subset[0]; + i = 0; + while (i <= last) { + id[i] = 0; + word[i++] = c0; + } + lastid = 0; + word[i] = 0; +} + +# Simple password policy matching: require at least one digit. +[List.External:AtLeast1-Simple] +void filter() +{ + int i, c; + + i = 0; + while (c = word[i++]) + if (c >= '0' && c <= '9') + return; // Found at least one suitable character, good + + word = 0; // No suitable characters found, skip this "word" +} + +# The same password policy implemented in a more efficient and more generic +# fashion (easy to expand to include other "sufficient" characters as well). +[List.External:AtLeast1-Generic] +int mask[0x100]; + +void init() +{ + int c; + + mask[0] = 0; // Terminate the loop in filter() on NUL + c = 1; + while (c < 0x100) + mask[c++] = 1; // Continue looping in filter() on most chars + + c = '0'; + while (c <= '9') + mask[c++] = 0; // Terminate the loop in filter() on digits +} + +void filter() +{ + int i; + + i = -1; + while (mask[word[++i]]) + continue; + if (word[i]) + return; // Found at least one suitable character, good + + word = 0; // No suitable characters found, skip this "word" +} + +# An efficient and fairly generic password policy matcher. The policy to match +# is specified in the check at the end of filter() and in mask[]. For example, +# lowercase and uppercase letters may be treated the same by initializing the +# corresponding mask[] elements to the same value, then adjusting the value to +# check "seen" for accordingly. +[List.External:Policy] +int mask[0x100]; + +void init() +{ + int c; + + mask[0] = 0x100; + c = 1; + while (c < 0x100) + mask[c++] = 0x200; + + c = 'a'; + while (c <= 'z') + mask[c++] = 1; + c = 'A'; + while (c <= 'Z') + mask[c++] = 2; + c = '0'; + while (c <= '9') + mask[c++] = 4; +} + +void filter() +{ + int i, seen; + +/* + * This loop ends when we see NUL (sets 0x100) or a disallowed character + * (sets 0x200). + */ + i = -1; seen = 0; + while ((seen |= mask[word[++i]]) < 0x100) + continue; + +/* + * We should have seen at least one character of each type (which "add up" + * to 7) and then a NUL (adds 0x100), but not any other characters (would + * add 0x200). The length must be 8. + */ + if (seen != 0x107 || i != 8) + word = 0; // Does not conform to policy +} + +# Append the Luhn algorithm digit to arbitrary all-digit strings. Optimized +# for speed, not for size nor simplicity. The primary optimization trick is to +# compute the length and four sums in parallel (in two SIMD'ish variables). +# Then whether the length is even or odd determines which two of the four sums +# are actually used. Checks for non-digits and for NUL are packed into the +# SIMD'ish bitmasks as well. +[List.External:AppendLuhn] +int map1[0x100], map2[0x1fff]; + +void init() +{ + int i; + + map1[0] = ~0x7fffffff; + i = 1; + while (i < 0x100) + map1[i++] = ~0x7effffff; + i = -1; + while (++i < 10) + map1['0' + i] = i + ((i * 2 % 10 + i / 5) << 12); + i = -1; + while (++i < 0x1fff) { + if (i % 10) + map2[i] = '9' + 1 - i % 10; + else + map2[i] = '0'; + } +} + +void filter() +{ + int i, o, e; + + i = o = e = 0; + while ((o += map1[word[i++]]) >= 0) { + if ((e += map1[word[i++]]) >= 0) + continue; + if (e & 0x01000000) + return; // Not all-digit, leave unmodified + word[i--] = 0; + word[i] = map2[(e & 0xfff) + (o >> 12)]; + return; + } + if (o & 0x01000000) + return; // Not all-digit, leave unmodified + word[i--] = 0; + word[i] = map2[(o & 0xfff) + (e >> 12)]; +} + +# Trivial Rotate function, which rotates letters in a word +# by a given number of places (like 13 in case of ROT13). +# Words which don't contain any letters (and thus wouldn't be changed +# by this filter) are skipped, because these unchanged words probably +# should have been tried before trying a mangled version. +[List.External_base:Filter_Rotate] + +int rot; // The number of places to rotate each letter in a word + +void filter() +{ + int i, j, c; + + i = 0; + j = 0; // j counts the number of changed characters + + while (c = word[i]) { + if (c >= 'a' && c <= 'z') { + c = c - 26 + rot; + if (c < 'a') c += 26; + word[i] = c; + j++; + } else if (c >= 'A' && c <= 'Z' ) { + c = c - 26 + rot; + if (c < 'A') c += 26; + word[i] = c; + j++; + } + i++; + } + if (j == 0) + // Noting changed. Reject this word. + word = 0; +} + +# ROT13 Example +[List.External:Filter_ROT13] +.include [List.External_base:Filter_Rotate] +void init() +{ + // Just in case someone wants to "rotate" by other values, + // adjust the value of the rot variable + // (may be in a copied external mode): + // 13: "abcABCxyzXYZ" -> "nopNOPklmKLM" + // 1: "abcABCxyzXYZ" -> "bcdBCDyzaYZA" + // 25: "abcABCxyzXYZ" -> "zabZABwxyWXY" + // -1: "abcABCxyzXYZ" -> "zabZABwxyWXY" + // and so on + // Allowed range: -25 <= rot <= -1, or 1 <= rot <= 25 + rot = 13; + + // Don't change the following statement. + // It is supposed to "sanitize" the value to be in the + // range + rot = (rot + 26) % 26; +} + +# Trivial parallel processing example (obsoleted by the "--node" option) +[List.External:Parallel] +/* + * This word filter makes John process some of the words only, for running + * multiple instances on different CPUs. It can be used with any cracking + * mode except for "single crack". Note: this is not a good solution, but + * is just an example of what can be done with word filters. + */ + +int node, total; // This node's number, and node count +int number; // Current word number + +void init() +{ + node = 1; total = 2; // Node 1 of 2, change as appropriate + number = node - 1; // Speedup the filter a bit +} + +void filter() +{ + if (number++ % total) // Word for a different node? + word = 0; // Yes, skip it +} + +# Interrupt the cracking session after "max" words tried +[List.External:AutoAbort] +int max; // Maximum number of words to try +int number; // Current word number + +void init() +{ + max = 1000; + number = 0; +} + +void filter() +{ + if (++number > max) + abort = 1; // Interrupt the cracking session +} + +# Print the status line after every "interval" words tried +[List.External:AutoStatus] +int interval; // How often to print the status +int number; // Current word number + +void init() +{ + interval = 1000; + number = 0; +} + +void filter() +{ + if (number++ % interval) + return; + status = 1; // Print the status line +} + +# End of john.conf file. +# Keep this comment, and blank line above it, to make sure a john.local.conf +# that does not end with \n is properly loaded. diff --git a/pandora_plugins/basic_security/john_32 b/pandora_plugins/basic_security/john_32 new file mode 100755 index 0000000000..c2c8d63476 Binary files /dev/null and b/pandora_plugins/basic_security/john_32 differ diff --git a/pandora_plugins/basic_security/john_64 b/pandora_plugins/basic_security/john_64 new file mode 100755 index 0000000000..e739703dec Binary files /dev/null and b/pandora_plugins/basic_security/john_64 differ diff --git a/pandora_plugins/basic_security/password-list b/pandora_plugins/basic_security/password-list new file mode 100755 index 0000000000..34dda115e2 --- /dev/null +++ b/pandora_plugins/basic_security/password-list @@ -0,0 +1,504 @@ +rosebud +prince +firebird +porsche +jaguar +beach +butter +guitar +password +great +amateur +united +chelsea +12345678 +cool +7777777 +turtle +black +1234 +cooper +muffin +steelers +diamond +pussy +1313 +redsox +tiffany +nascar +12345 +scorpio +star +zxcvbn +jackson +dragon +mountain +testing +tomcat +cameron +qwerty +madison +shannon +golf +654321 +696969 +987654 +murphy +bond007 +computer +mustang +brazil +frank +bear +amanda +letmein +lauren +hannah +tiger +wizard +baseball +japan +dave +doctor +xxxxxxxx +master +naked +eagle1 +gateway +money +michael +squirt +11111 +gators +phoenix +football +stars +mother +angel +mickey +shadow +apple +nathan +junior +bailey +monkey +alexis +raiders +thx1138 +knight +abc123 +aaaa +steve +porno +iceman +pass +bonnie +forever +badboy +tigers +fuckme +peaches +angela +debbie +purple +6969 +jasmine +viper +spider +andrea +jordan +kevin +ou812 +melissa +horny +harley +matt +jake +booger +dakota +ranger +qwertyui +lovers +1212 +aaaaaa +iwantu +danielle +suckit +flyers +player +jennifer +beaver +gregory +fish +sunshine +hunter +4321 +buddy +porn +morgan +fuck +4128 +whatever +matrix +starwars +2000 +runner +young +teens +boomer +test +swimming +nicholas +scooby +cowboys +batman +dolphin +lucky +jason +edward +trustno1 +gordon +helpme +walter +charles +thomas +casper +jackie +cumshot +girls +tigger +stupid +monica +boston +booboo +robert +shit +midnight +braves +coffee +access +saturn +college +yankee +xxxxxx +love +gemini +baby +lover +bulldog +buster +apples +cunt +barney +ncc1701 +1234567 +august +brian +victor +rabbit +soccer +3333 +mark +tucker +peanut +hockey +canada +startrek +princess +john +killer +blazer +sierra +mercedes +johnny +george +cumming +leather +5150 +gandalf +sexy +hunting +232323 +doggie +spanky +andrew +kitty +4444 +none +artica +6683 +pandora +s1s3m4s +sistemas +zzzzzz +winter +charlie +rainbow +beavis +gunner +brandy +superman +112233 +bigcock +horney +compaq +asshole +arthur +happy +bubba +carlos +fuckyou +cream +sophie +2112 +tennis +dallas +calvin +ladies +fred +james +jessica +shaved +naughty +johnson +mike +panties +surfer +giants +xxxxx +brandon +pepper +samson +booty +tits +fender +1111 +kelly +blonde +member +anthony +austin +paul +fucked +boobs +blowme +william +mine +golden +donald +ferrari +daniel +king +bigdaddy +cookie +golfer +racing +fire +bronco +chicken +summer +5555 +sandra +penis +maverick +heather +eagle +pookie +voyager +chicago +hammer +hentai +packers +rangers +joseph +yankees +newyork +einstein +birdie +diablo +joshua +little +dolphins +trouble +sexsex +maggie +redwings +white +hardcore +biteme +smith +chevy +topgun +666666 +enter +sticky +winston +bigtits +willie +ashley +cocacola +warrior +bitches +welcome +thunder +animal +sammy +green +chris +cowboy +broncos +slut +super +panther +silver +private +8675309 +qazwsx +yamaha +richard +skippy +zxcvbnm +magic +justin +fucker +marvin +nipples +lakers +banana +orange +blondes +power +rachel +driver +merlin +enjoy +victoria +slayer +marine +michelle +girl +asdfgh +scott +angels +corvette +apollo +vagina +2222 +fishing +bigdog +parker +toyota +asdf +david +cheese +qwert +travis +video +maddog +matthew +time +hotdog +london +hooters +121212 +sydney +paris +7777 +wilson +patrick +women +rock +marlboro +butthead +martin +voodoo +xxxx +srinivas +dennis +freedom +magnum +extreme +internet +fucking +ginger +juice +redskins +action +captain +blowjob +abgrtyu +erotic +carter +bigdick +nicole +777777 +dirty +jasper +chester +sparky +dreams +ford +monster +smokey +yellow +maxwell +freddy +teresa +xavier +camaro +music +arsenal +jeremy +steven +secret +rush2112 +access14 +11111111 +viking +dick +russia +wolf +bill +snoopy +falcon +scorpion +nipple +crystal +blue +taylor +rebecca +iloveyou +peter +eagles +111111 +tester +alex +pussies +winner +131313 +mistress +florida +cock +samantha +123123 +phantom +eric +beer +house +bitch +billy +legend +rocket +miller +hello +6666 +movie +theman +flower +scooter +albert +success +oliver +jack +please +666 diff --git a/pandora_plugins/intel_dcm/IntelDcmPlugin.java b/pandora_plugins/intel_dcm/IntelDcmPlugin.java new file mode 100644 index 0000000000..2b7e626f3b --- /dev/null +++ b/pandora_plugins/intel_dcm/IntelDcmPlugin.java @@ -0,0 +1,479 @@ +// ______ __ _______ _______ _______ +//| __ \.---.-.-----.--| |.-----.----.---.-. | ___| | | __| +//| __/| _ | | _ || _ | _| _ | | ___| |__ | +//|___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______| +// +// ============================================================================ +// Copyright (c) 2007-2010 Artica Soluciones Tecnologicas, http://www.artica.es +// This code is NOT free software. This code is NOT licenced under GPL2 licence +// You cannnot redistribute it without written permission of copyright holder. +// ============================================================================ + +import java.util.*; +import java.net.MalformedURLException; +import java.net.URL; +import javax.xml.datatype.*; +import javax.xml.namespace.QName; +import Intel_Dcm.*; + +public class IntelDcmPlugin { + private static QName qName = new QName("http://wsdl.intf.dcm.intel.com/", "Dcm"); + private static String result = ""; + private static URL url = null; + private static boolean retry = true; + private static int retries = 0; + private static final int MAX_RETRIES = 10; + private static Dcm dcm; + + private static String getParam(String key, String[] params) { + + key = "--"+key; + + for (int i = 0; i < params.length; i++) { + + if (key.equals(params[i])) { + return params[i+1]; + } + } + + return ""; + } + + private static QueryType strToQueryType(String str) { + if (str.equals("max_pwr")) { + return QueryType.MAX_PWR; + + } else if (str.equals("avg_pwr")) { + return QueryType.AVG_PWR; + + } else if (str.equals("min_pwr")) { + return QueryType.MIN_PWR; + + } else if (str.equals("max_avg_pwr")) { + return QueryType.MAX_AVG_PWR; + + } else if (str.equals("total_max_pwr")) { + return QueryType.TOTAL_MAX_PWR; + + } else if (str.equals("total_avg_pwr")) { + return QueryType.TOTAL_AVG_PWR; + + } else if (str.equals("max_avg_pwr_cap")) { + return QueryType.MAX_AVG_PWR_CAP; + + } else if (str.equals("total_max_pwr_cap")) { + return QueryType.TOTAL_MAX_PWR_CAP; + + } else if (str.equals("total_avg_pwr_cap")) { + return QueryType.TOTAL_AVG_PWR_CAP; + + } else if (str.equals("total_min_pwr")) { + return QueryType.TOTAL_MIN_PWR; + + } else if (str.equals("min_avg_pwr")) { + return QueryType.MIN_AVG_PWR; + + } else if (str.equals("max_inlet_temp")) { + return QueryType.MAX_INLET_TEMP; + + } else if (str.equals("avg_inlet_temp")) { + return QueryType.AVG_INLET_TEMP; + + } else if (str.equals("min_inlet_temp")) { + return QueryType.MIN_INLET_TEMP; + + } else if (str.equals("ins_pwr")) { + return QueryType.INS_PWR; + + } + + return null; + } + + + private static MetricType strToMetricType(String str) { + if (str.equals("mnged_nodes_energy")) { + return MetricType.MNGED_NODES_ENERGY; + + } else if (str.equals("mnged_nodes_energy_bill")) { + return MetricType.MNGED_NODES_ENERGY_BILL; + + } else if (str.equals("it_eqpmnt_energy")) { + return MetricType.IT_EQPMNT_ENERGY; + + } else if (str.equals("it_eqpmnt_energy_bill")) { + return MetricType.IT_EQPMNT_ENERGY_BILL; + + } else if (str.equals("calc_cooling_energy")) { + return MetricType.CALC_COOLING_ENERGY; + + } else if (str.equals("calc_cooling_energy_bill")) { + return MetricType.CALC_COOLING_ENERGY_BILL; + + } else if (str.equals("mnged_nodes_pwr")) { + return MetricType.MNGED_NODES_PWR; + + } else if (str.equals("it_eqpmnt_pwr")) { + return MetricType.IT_EQPMNT_PWR; + + } else if (str.equals("calc_cooling_pwr")) { + return MetricType.CALC_COOLING_PWR; + + } else if (str.equals("avg_pwr_per_dimension")) { + return MetricType.AVG_PWR_PER_DIMENSION; + + } else if (str.equals("derated_pwr")) { + return MetricType.DERATED_PWR; + + } else if (str.equals("inlet_temperature_span")) { + return MetricType.INLET_TEMPERATURE_SPAN; + + } + + return null; + } + + public static void printUsage () { + + System.out.print("\n\n Usage: DcmPlugin --server --port --action [--value and other values or option depending on action]\n\n"); + } + + public static XMLGregorianCalendar getEndDate() { + + try { + GregorianCalendar gcal = new GregorianCalendar(); + + return DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal); + + } catch (DatatypeConfigurationException e) { + return null; + } + + } + + public static XMLGregorianCalendar getStartDate(int interval) { + try { + GregorianCalendar gcal = new GregorianCalendar(); + + //Ge time in milliseconds + long time = gcal.getTimeInMillis(); + + //Convert time to seconds + time = time / 1000; + + //Substract interval + time = time - interval; + + //Convert to milliseconds + time = time * 1000; + + //Set calendar to real time + gcal.setTimeInMillis(time); + + XMLGregorianCalendar auxDate = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal); + + return auxDate; + + } catch (DatatypeConfigurationException e) { + return null; + } + } + + /** + * @param args + */ + public static void main(String[] args) { + + while (retry) { + + retry = false; + retries++; + + try{ + + //Check arguments + if (args.length < 6) { + printUsage(); + System.exit(-1); + } + + String server = getParam("server", args); + String port = getParam("port", args); + String action = getParam("action", args); + String value = getParam("value", args); + + url = new URL("http://"+server+":"+port+"/DCMWsdl/dcm.wsdl"); + + Dcm_Service dcmService = new Dcm_Service(url, qName); + dcm = dcmService.getDcmPort(); + + //Execute actions + if (action.equals("resume_monitoring")) { + dcm.setCollectionState(true); + + } else if (action.equals("suspend_monitoring")) { + dcm.setCollectionState(false); + + } else if (action.equals("status_monitoring")) { + if (dcm.getCollectionState()) { + result = "1"; + } else { + result = "0"; + } + + } else if (action.equals("set_power_sampling")) { + dcm.setGlobalProperty(GlobalProperty.NODE_POWER_SAMPLING_FREQUENCY, value); + + } else if (action.equals("get_power_sampling")) { + result = dcm.getGlobalProperty(GlobalProperty.NODE_POWER_SAMPLING_FREQUENCY); + + } else if (action.equals("set_power_granularity")) { + dcm.setGlobalProperty(GlobalProperty.NODE_POWER_MEASUREMENT_GRANULARITY, value); + + } else if (action.equals("get_power_granularity")) { + result = dcm.getGlobalProperty(GlobalProperty.NODE_POWER_MEASUREMENT_GRANULARITY); + + } else if (action.equals("set_thermal_sampling")) { + dcm.setGlobalProperty(GlobalProperty.NODE_THERMAL_SAMPLING_FREQUENCY, value); + + } else if (action.equals("get_thermal_sampling")) { + result = dcm.getGlobalProperty(GlobalProperty.NODE_THERMAL_SAMPLING_FREQUENCY); + + } else if (action.equals("set_thermal_granularity")) { + dcm.setGlobalProperty(GlobalProperty.NODE_THERMAL_MEASUREMENT_GRANULARITY, value); + + } else if (action.equals("get_thermal_granularity")) { + result = dcm.getGlobalProperty(GlobalProperty.NODE_THERMAL_MEASUREMENT_GRANULARITY); + + } else if (action.equals("set_cooling_multiplier")) { + dcm.setGlobalProperty(GlobalProperty.COOLING_MULT, value); + + } else if (action.equals("get_cooling_multiplier")) { + result = dcm.getGlobalProperty(GlobalProperty.COOLING_MULT); + + } else if (action.equals("set_power_cost")) { + dcm.setGlobalProperty(GlobalProperty.COST_PER_KW_HR, value); + + } else if (action.equals("get_power_cost")) { + result = dcm.getGlobalProperty(GlobalProperty.COST_PER_KW_HR); + + } else if(action.equals("add_entity")) { + + Property entityType = new Property(); + entityType.setName(EntityProperty.ENTITY_TYPE); + entityType.setValue(getParam("type", args)); + + Property address = new Property(); + address.setName(EntityProperty.BMC_ADDRESS); + address.setValue(getParam("address", args)); + + Property name = new Property(); + name.setName(EntityProperty.NAME); + name.setValue(getParam("value", args)); + + Property deratedPower = new Property(); + deratedPower.setName(EntityProperty.DERATED_PWR); + deratedPower.setValue(getParam("derated_power", args)); + + Property connectorName = new Property(); + connectorName.setName(EntityProperty.CONNECTOR_NAME); + connectorName.setValue(getParam("connector", args)); + + Property bmcUser = new Property(); + bmcUser.setName(EntityProperty.BMC_USER); + bmcUser.setValue(getParam("bmc_user", args)); + + Property bmcPass = new Property(); + bmcPass.setName(EntityProperty.BMC_PASSWORD); + bmcPass.setValue(getParam("bmc_pass", args)); + + List properties = new ArrayList(); + + properties.add(entityType); + properties.add(address); + properties.add(name); + properties.add(deratedPower); + properties.add(connectorName); + properties.add(bmcUser); + properties.add(bmcPass); + + int res = dcm.addEntity(EntityType.NODE, properties, true); + System.out.print(res); + } else if (action.equals("connector_list")) { + + List connectorList = dcm.getConnectorList(); + Iterator iter = connectorList.iterator(); + + result = ""; + while (iter.hasNext()) { + ConnectorInfo connector = (ConnectorInfo) iter.next(); + String name = connector.getDisplayName(); + String uname = connector.getUname(); + result = result+name+":"+uname+"|"; + } + //Delete last "|" + int lastIdx = result.length() - 1; + result = result.substring(0, lastIdx); + } else if (action.equals("entity_properties")) { + String entId = getParam("entity_id",args); + + List properties = dcm.getEntityProperties(Integer.parseInt(entId)); + + Iterator iter = properties.iterator(); + + result = ""; + while (iter.hasNext()) { + Property property = (Property) iter.next(); + + EntityProperty name = property.getName(); + String val = property.getValue(); + result = result+name+":"+val+"|"; + } + //Delete last "|" + int lastIdx = result.length() - 1; + result = result.substring(0, lastIdx); + + } else if (action.equals("delete_entity")) { + String entId = getParam("entity_id",args); + + dcm.removeEntity(Integer.parseInt(entId), true); + + System.out.println(1); + + } else if (action.equals("update_entity")) { + + Property address = new Property(); + address.setName(EntityProperty.BMC_ADDRESS); + address.setValue(getParam("address", args)); + + Property name = new Property(); + name.setName(EntityProperty.NAME); + name.setValue(getParam("value", args)); + + Property deratedPower = new Property(); + deratedPower.setName(EntityProperty.DERATED_PWR); + deratedPower.setValue(getParam("derated_power", args)); + + List properties = new ArrayList(); + + properties.add(address); + properties.add(name); + properties.add(deratedPower); + + String entId = getParam("entity_id",args); + + dcm.setEntityProperties(Integer.parseInt(entId), properties, false); + + System.out.print(1); + + } else if (action.equals("query_data")) { + String entId = getParam("entity_id", args); + + QueryType queryType = strToQueryType(getParam("value", args)); + + XMLGregorianCalendar startDate = getStartDate(300); + XMLGregorianCalendar endDate = getEndDate(); + + EnumerationRawData query = dcm.dumpMeasurementData(Integer.parseInt(entId), queryType, startDate, endDate); + + List queryData = query.getQueryData(); + + Iterator iter = queryData.iterator(); + + //Calculate an average + int numberItems = 0; + int accValue = 0; + + while (iter.hasNext()) { + RawPtData data = (RawPtData) iter.next(); + + accValue = accValue + data.getValue(); + numberItems++; + } + + int avg = accValue / numberItems; + + result = String.valueOf(avg); + + } else if (action.equals("metric_data")) { + String entId = getParam("entity_id", args); + + MetricType metricType = strToMetricType(getParam("value", args)); + + XMLGregorianCalendar startDate = getStartDate(360); + XMLGregorianCalendar endDate = getEndDate(); + + List aggList = dcm.getMetricAggregationPeriodList(startDate, endDate, metricType); + + Iterator aggIter = aggList.iterator(); + + int max = 0; + + while (aggIter.hasNext()) { + + AggregationPeriod aggData = (AggregationPeriod) aggIter.next(); + + if (aggData.getValue() > max) { + max = aggData.getValue(); + startDate = aggData.getStart(); + endDate = aggData.getEnd(); + } + } + + EnumerationData metrics = dcm.getMetricData (Integer.parseInt(entId), metricType, AggregationLevel.SELF, startDate, endDate, -1); + + List metricsData = metrics.getQueryData(); + + Iterator iter = metricsData.iterator(); + + //Calculate an average + int numberItems = 0; + int accValue = 0; + + while (iter.hasNext()) { + + PtData data = (PtData) iter.next(); + + accValue = accValue + data.getValue(); + numberItems++; + } + + int avg = accValue / numberItems; + + result = String.valueOf(avg); + } + } catch (Exception_Exception e) { + System.out.println("Web Service Exception:"); + System.out.println(e); + + } catch (java.lang.Exception e2) { + //Only retry if exception is different of MalformedURLException + if (!(e2 instanceof MalformedURLException)) { + + //Only do MAX_RETRIES + if (retries < MAX_RETRIES) { + + retry = true; + + try { + //Sleep 1 seconds + Thread.sleep(1000); + } catch (InterruptedException ie) { + //TODO InterruptedException handler + } + } else { + System.out.println("Max number of retries reached: Timeout error"); + } + + } + + } finally{ + + + if (!result.equals("")) { + System.out.print(result); + } + } + } + } +} diff --git a/pandora_plugins/intel_dcm/extensions/intel_dcm/intel_blue_small.png b/pandora_plugins/intel_dcm/extensions/intel_dcm/intel_blue_small.png new file mode 100644 index 0000000000..e948879813 Binary files /dev/null and b/pandora_plugins/intel_dcm/extensions/intel_dcm/intel_blue_small.png differ diff --git a/pandora_plugins/intel_dcm/extensions/intel_dcm/intel_dcm_lib.php b/pandora_plugins/intel_dcm/extensions/intel_dcm/intel_dcm_lib.php new file mode 100644 index 0000000000..d9135e22eb --- /dev/null +++ b/pandora_plugins/intel_dcm/extensions/intel_dcm/intel_dcm_lib.php @@ -0,0 +1,238 @@ + "Managed Nodes Energy", + "desc" => "The total energy consumed by all managed nodes in the specified entity, in Wh", + "value" => "mnged_nodes_energy"), + array("name" => "Managed Nodes Energy Bill", + "desc" => "The total power bill for all energy consumed by all managed nodes in the specified entity", + "value" => "mnged_nodes_energy_bill"), + array("name" => "IT Equipment Energy", + "desc" => "The total energy consumed by IT equipment, including managed nodes, unmanaged nodes and other IT equipment in the selected entity, in Wh", + "value" => "it_eqpmnt_energy"), + array("name" => "IT Equipment Energy Bill", + "desc" => "The calculated power bill for IT equipment, including managed nodes, unmanaged nodes and other IT equipment in the selected entity", + "value" => "it_eqpmnt_energy_bill"), + array("name" => "Calculated Cooling Energy", + "desc" => "The energy needed to cool the selected entity, in Wh", + "value" => "calc_cooling_energy"), + array("name" => "Calculated Cooling Energy Bill", + "desc" => "The calculated power bill for the energy needed to cool the selected entity", + "value" => "calc_cooling_energy_bill"), + array("name" => "Managed Nodes Power", + "desc" => "The total average power consumption by the managed nodes in the selected entity, in watts", + "value" => "mnged_nodes_pwr"), + array("name" => "IT Equipment Power", + "desc" => "Provides the total average power consumption by IT equipment, including managed nodes, unmanaged nodes and other IT equipment in the selected entity in watts", + "value" => "it_eqpmnt_pwr"), + array("name" => "Calculated Cooling Power", + "desc" => "Provides the average cooling power based on the IT_EQPMNT_PWR multiplied by COOLING_MULT in watts", + "value" => "calc_cooling_pwr"), + array("name" => "Avg. Power Per Dimension", + "desc" => "The average power consumption per dimension", + "value" => "avg_pwr_per_dimension"), + array("name" => "Derated power", + "desc" => "Adds the de-rated values of all the nodes in the entity to the nameplate power value of all unmanaged nodes and equipment associated with the entity, as defined by NAMEPLATE_PWR_UNMNGD_EQPMNT", + "value" => "derated_pwr"), + array("name" => "Inlet Temperature Span", + "desc" => "The average inlet temperature differential between the highest and lowest node temperature in a group (degC/degF)", + "value" => "inlet_temperature_span"), + ); + + + $plugin_action = "--action \'metric_data\' --entity_id \'".$dcm_id."\'"; + $plugin_name = io_safe_input("Intel DCM Plugin"); + $id_plugin = db_get_value("id", "tplugin", "name", $plugin_name); + + foreach ($modules_array as $mod) { + + $aux_params = $plugin_action." --value \'".$mod['value']."\'"; + + $values = array ('id_tipo_modulo' => 1, + 'descripcion' => $mod['desc'], + 'tcp_port' => $config['dcm_port'], + 'ip_target' => $config['dcm_server'], + 'plugin_parameter' => $aux_params, + 'id_plugin' => $id_plugin, + 'max_timeout' => 300, + 'id_modulo' => 4); + + modules_create_agent_module ($id_agent, io_safe_input($mod['name']), $values); + } +} + + +function create_query_modules($id_agent, $dcm_id) { + global $config; + + $modules_array = array( + array("name" => "Max. Power", + "desc" => "The maximum power consumed by any single node/enclosure", + "value" => "max_pwr"), + array("name" => "Avg. Power", + "desc" => "The average power consumption across all nodes/enclosures", + "value" => "avg_pwr"), + array("name" => "Min. Power", + "desc" => "The minimum power consumed by any single node/enclosure", + "value" => "min_pwr"), + array("name" => "Max. Avg. Power", + "desc" => "The maximum of group sampling (in a monitoring cycle) power in specified aggregation period for the sum of average power measurement in a group of nodes/enclosures within the specified entity", + "value" => "max_avg_pwr"), + array("name" => "Total Max. Power", + "desc" => "The maximum of group sampling (in a monitoring cycle) power in specified aggregation period for sum of maximum power measurement in a group of nodes/enclosures within the specified entity", + "value" => "total_max_pwr"), + array("name" => "Total Avg. Power", + "desc" => "The average (in specified aggregation period) of group power for sum of average power measurement in a group of nodes/enclosures within the specified entity", + "value" => "total_avg_pwr"), + array("name" => "Max. Avg. Power Capping", + "desc" => "The maximum of group sampling (in a monitoring cycle) power in specified aggregation period for the sum of average power measurement in a group of nodes/enclosures with power capping capability", + "value" => "max_avg_pwr_cap"), + array("name" => "Total Max. Power Capping", + "desc" => "The maximum group sampling (in a monitoring cycle) power in specified aggregation period for sum of maximum power measurement in a group of nodes/enclosures with power capping capability", + "value" => "total_max_pwr_cap"), + array("name" => "Total Avg. Power Capping", + "desc" => "The average (in specified aggregation period) of group power for sum of average power measurement in a group of nodes/enclosures with power capping capability", + "value" => "total_avg_pwr_cap"), + array("name" => "Total Min. Power", + "desc" => "The minimal group sampling (in a monitoring cycle) power in specified aggregation period for sum of minimum power measurement in a group of nodes/enclosures within the specified entity", + "value" => "total_min_pwr"), + array("name" => "Min. Avg. Power", + "desc" => "The minimal group sampling (in a monitoring cycle) power in specified aggregation period for sum of average power measurement in a group of nodes/enclosures within the specified entity", + "value" => "min_avg_pwr"), + array("name" => "Max. Inlet Temperature", + "desc" => "The maximum temperature for any single node within the specified entity", + "value" => "max_inlet_temp"), + array("name" => "Avg. Inlet Temperature", + "desc" => "The average temperature for any single node within the specified entity", + "value" => "avg_inlet_temp"), + array("name" => "Min. Inlet Temperature", + "desc" => "The minimum temperature for any single node within the specified entity", + "value" => "min_inlet_temp"), + array("name" => "Instantaneous Power", + "desc" => "The instantaneous power consumption of a specified node/enclosure or the sum of the instantaneous power of the nodes/enclosures within the specified entity", + "value" => "ins_pwr"), + ); + + + $plugin_action = "--action \'query_data\' --entity_id \'".$dcm_id."\'"; + $plugin_name = io_safe_input("Intel DCM Plugin"); + $id_plugin = db_get_value("id", "tplugin", "name", $plugin_name); + + foreach ($modules_array as $mod) { + + $aux_params = $plugin_action." --value \'".$mod['value']."\'"; + + $values = array ('id_tipo_modulo' => 1, + 'descripcion' => $mod['desc'], + 'tcp_port' => $config['dcm_port'], + 'ip_target' => $config['dcm_server'], + 'plugin_parameter' => $aux_params, + 'id_plugin' => $id_plugin, + 'max_timeout' => 300, + 'id_modulo' => 4); + + modules_create_agent_module ($id_agent, io_safe_input($mod['name']), $values); + } +} + +function create_custom_field () { + + $result = db_get_value("id_field", "tagent_custom_fields", "name", "DCM_Entity_Id"); + + if (!$result) { + + $result = db_process_sql_insert('tagent_custom_fields', array('name' => "DCM_Entity_Id", 'display_on_front' => 0)); + + } + + return $result; +} + +function create_derated_power_custom_field () { + + $result = db_get_value("id_field", "tagent_custom_fields", "name", "DCM_Entity_Derated_Power"); + + if (!$result) { + + $result = db_process_sql_insert('tagent_custom_fields', array('name' => "DCM_Entity_Derated_Power", 'display_on_front' => 0)); + + } + + return $result; +} + +function set_dcm_id ($id_agent, $id_field, $dcm_id) { + + $sql = "SELECT description FROM tagent_custom_data WHERE id_field = $id_field AND id_agent = $id_agent"; + $result = db_get_value_sql($sql); + + if (!$result) { + db_process_sql_insert('tagent_custom_data', array('id_field' => $id_field,'id_agent' => $id_agent, 'description' => $dcm_id)); + + } else { + db_process_sql_update("tagent_custom_data", array('description' => $dcm_id), "id_field = $id_field AND id_agent = $id_agent"); + } + +} + +function set_dcm_derated_power ($id_agent, $id_field, $derated_power) { + + $sql = "SELECT description FROM tagent_custom_data WHERE id_field = $id_field AND id_agent = $id_agent"; + $result = db_get_value_sql($sql); + + if (!$result) { + db_process_sql_insert('tagent_custom_data', array('id_field' => $id_field,'id_agent' => $id_agent, 'description' => $derated_power)); + + } else { + db_process_sql_update("tagent_custom_data", array('description' => $derated_power), "id_field = $id_field AND id_agent = $id_agent"); + } + +} + +function exec_dcm_action ($action, $values=false) { + global $config; + + $plugin_command = db_get_value("execute", "tplugin", "name", io_safe_input("Intel DCM Plugin")); + + $plugin_command = io_safe_output($plugin_command); + + $command = $plugin_command." --server \"".$config['dcm_server']."\" --port ".$config['dcm_port']; + + $command .= " --action \"".$action."\""; + + if ($values) { + + if (is_array($values)) { + + foreach ($values as $key => $val) { + + $command .= " --$key \"".$val."\""; + + } + + } else { + + $command .= " --value \"".$values."\""; + } + + } + + $res = shell_exec($command); + + return $res; +} + +?> diff --git a/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_management.php b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_management.php new file mode 100644 index 0000000000..a9abad9757 --- /dev/null +++ b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_management.php @@ -0,0 +1,226 @@ +width = '98%'; + $table->data = array (); + + $type = get_parameter("type"); + $connection_name = get_parameter("connection_name"); + $derated_power = get_parameter("derated_power"); + $action = get_parameter("action"); + $del = get_parameter("delete_button"); + $id_agent = get_parameter("id_agente"); + $dcm_id = get_parameter("dcm_id"); + + $id_field = create_custom_field(); + + $id_field_derated_power = create_derated_power_custom_field(); + + if ($del) { + $action = "delete"; + } + + switch ($action) { + case "create": + case "update"; + + if (!$type || !$connection_name || !$derated_power) { + ui_print_error_message (__('The fields: Type, Connection Name and Derrated Power are requiered')); + + } else { + + $agent_name = io_safe_output(agents_get_name ($id_agent)); + $agent_address = agents_get_address($id_agent); + + if ($action == "create") { + + $values = array("type" => $type, + "value" => $agent_name, + "address" => $agent_address, + "derated_power" => $derated_power, + "connector" => $connection_name); + + $res = exec_dcm_action("add_entity", $values); + + if ($res) { + set_dcm_id ($id_agent, $id_field, $res); + + set_dcm_derated_power($id_agent, $id_field_derated_power, $derated_power); + + create_query_modules($id_agent, $res); + + create_metric_modules($id_agent, $res); + + } + + ui_print_result_message ($res, + __('DCM Entity created'), + __('Error creating DCM Entity')); + + } else { + $values = array("value" => $agent_name, + "address" => $agent_address, + "derated_power" => $derated_power, + "entity_id" => $dcm_id); + + $res = exec_dcm_action("update_entity", $values); + + if ($res) { + set_dcm_derated_power($id_agent, $id_field_derated_power, $derated_power); + } + + ui_print_result_message ($res, + __('DCM Entity updated'), + __('Error updating DCM Entity')); + + } + } + + break; + + case "delete": + $res = exec_dcm_action("delete_entity", array("entity_id" => $dcm_id)); + + if ($res) { + $res = db_process_sql_delete("tagent_custom_data", "id_field = $id_field AND id_agent = $id_agent"); + $res = db_process_sql_delete("tagent_custom_data", "id_field = $id_field_derated_power AND id_agent = $id_agent"); + } + + ui_print_result_message ($res, + __('DCM Entity deleted'), + __('Error deleting DCM Entity')); + + $type = ""; + $connection_name = ""; + $derated_power = ""; + break; + } + + + $type_values = array("NODE" => "Server", + "ENCLOSURE" => "Enclosure", + "RACK" => "Rack", + "ROW" => "Row", + "ROOM" => "Room", + "DATACENTER" => "Datacenter", + "LOGICAL_GROUP" => "Logical Group", + "DCM_SERVER" => "DCM Server"); + + $connector_str = exec_dcm_action("connector_list"); + $connector_list = array(); + if ($connector_str && !$connector_str == null) { + + $connector_list = explode ("|", $connector_str); + } else { + ui_print_error_message (__('Error getting connector list')); + } + + $connection_values = array(); + + if ($connector_list) { + + foreach ($connector_list as $connector) { + + $aux = explode(":", $connector); + + $aux[0] = trim($aux[0] , "\""); + $aux[1] = trim($aux[1], "\""); + + $connection_values[$aux[1]] = $aux[0]; + } + } + + //Get dcm agent data + $sql = "SELECT id_field FROM tagent_custom_fields WHERE name = 'DCM_Entity_Id'"; + $id_field = db_get_value_sql($sql); + $sql = "SELECT description FROM tagent_custom_data WHERE id_field = $id_field AND id_agent = $id_agent"; + $dcm_id = db_get_value_sql($sql); + + //If we have a DCM ID then get information from DCM Server + if ($dcm_id) { + + $entity_str = exec_dcm_action("entity_properties", array("entity_id" => $dcm_id)); + + if (!$entity_str) { + ui_print_error_message (__('Error getting entity information')); + } else { + $entity_properties = explode ("|", $entity_str); + + foreach ($entity_properties as $prop) { + + $aux = explode(":", $prop); + + $aux[0] = trim($aux[0] , "\""); + $aux[1] = trim($aux[1], "\""); + + switch($aux[0]) { + case "CONNECTOR_NAME": + $connection_name = $aux[1]; + break; + case "DERATED_PWR": + $derated_power = $aux[1]; + break; + case "DEVICE_TYPE": + $type = $aux[1]; + break; + } + } + } + + } + + $table->data[0][0] = __('Type'); + + $table->data[0][1] = html_print_select ($type_values, "type", $type, '', '', '', true); + + $table->data[1][0] = __('Connection Name'); + + $table->data[1][1] = html_print_select ($connection_values, "connection_name", $connection_name, '', '', '', true); + + $table->data[2][0] = __('Derated Power'); + + $table->data[2][1] = html_print_input_text ('derated_power', $derated_power, '', 30, 100, true); + + echo '
'; + + if ($dcm_id) { + echo "
"; + echo '
'; + html_print_input_hidden ('dcm_id', $dcm_id); + html_print_submit_button (__('Delete Entity'), 'delete_button', false, 'class="sub delete"'); + echo '
'; + } + + html_print_table ($table); + echo '
'; + + if ($dcm_id) { + html_print_input_hidden ('action', "update"); + html_print_input_hidden ('dcm_id', $dcm_id); + html_print_submit_button (__('Update Entity'), 'update_button', false, 'class="sub upd"'); + } else { + html_print_input_hidden ('action', "create"); + html_print_submit_button (__('Create Entity'), 'create_button', false, 'class="sub wand"'); + } + echo '
'; + + echo '
'; +} +?> diff --git a/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php new file mode 100644 index 0000000000..69e2a9cd81 --- /dev/null +++ b/pandora_plugins/intel_dcm/extensions/intel_dcm_agent_view.php @@ -0,0 +1,210 @@ +cellpadding = 4; + $table->cellspacing = 4; + $table->width = "800px"; + $table->class = "databox"; + + $table->head = array(); + $table->data = array(); + + $table->head[0] = __('Power stats'); + $table->head[1] = __('Average power demand'); + + $data = array(); + + $data_period = 604800; + + $id_agent = get_parameter("id_agente"); + $agent_interval = agents_get_interval($id_agent); + + //Caculate current power stats + $module = modules_get_agentmodule_id (io_safe_input("Avg. Power"), $id_agent); + $avg_power = modules_get_last_value ($module['id_agente_modulo']); + + + + $module = modules_get_agentmodule_id (io_safe_input("Avg. Inlet Temperature"), $id_agent); + $avg_temp = modules_get_last_value ($module['id_agente_modulo']); + + $module = modules_get_agentmodule_id (io_safe_input("Managed Nodes Energy"), $id_agent); + $aux = modules_get_agentmodule_data ($module['id_agente_modulo'], $data_period); + + $num = 0; + $sum = 0; + foreach ($aux as $v) { + if ($v["data"] > 0) { + $num++; + $sum = $sum +$v["data"]; + } + } + $avg = 0; + if ($num != 0) { + $avg = $sum/$num; + } else { + $avg = $sum; + } + $mnged_energy = $avg; + + $module = modules_get_agentmodule_id (io_safe_input("Managed Nodes Energy Bill"), $id_agent); + $aux = modules_get_agentmodule_data ($module['id_agente_modulo'], $data_period); + + $num = 0; + $sum = 0; + foreach ($aux as $v) { + if ($v["data"] > 0) { + $num++; + $sum = $sum +$v["data"]; + } + } + $avg = 0; + if ($num != 0) { + $avg = $sum/$num; + } else { + $avg = $sum; + } + $mnged_energy_bill = $avg; + + $module = modules_get_agentmodule_id (io_safe_input("Calculated Cooling Energy"), $id_agent); + $aux = modules_get_agentmodule_data ($module['id_agente_modulo'], $data_period); + + $num = 0; + $sum = 0; + foreach ($aux as $v) { + if ($v["data"] > 0) { + $num++; + $sum = $sum +$v["data"]; + } + } + $avg = 0; + if ($num != 0) { + $avg = $sum/$num; + } else { + $avg = $sum; + } + $cooling_energy = $avg; + + $module = modules_get_agentmodule_id (io_safe_input("Calculated Cooling Energy Bill"), $id_agent); + $aux = modules_get_agentmodule_data ($module['id_agente_modulo'], $data_period); + + $num = 0; + $sum = 0; + foreach ($aux as $v) { + if ($v["data"] > 0) { + $num++; + $sum = $sum +$v["data"]; + } + } + $avg = 0; + if ($num != 0) { + $avg = $sum/$num; + } else { + $avg = $sum; + } + $cooling_energy_bill = $avg; + + //Calculate power utilization + $id_field_derated_power = create_derated_power_custom_field(); + $sql = "SELECT description FROM tagent_custom_data WHERE id_field = $id_field_derated_power AND id_agent = $id_agent"; + $derated_power = db_get_value_sql($sql); + + $percent = number_format(($avg_power/$derated_power)*100, 2); + + $data[0] = "".__("Power utilization")." $percent%"; + $data[0] .= progress_bar($percent, 400, 30, "", 2); + $data[0] .= "

"; + $data[0] .= "".__("Current stats").""; + $data[0] .= "

"; + $data[0] .= __("Power demand").": ".number_format($avg_power, 2)." Wh"; + $data[0] .= "
"; + $data[0] .= __("Inlet temp").": ".number_format($avg_temp, 2)." ºC"; + $data[0] .= "


"; + $data[0] .= "".__("Last week summary").""; + $data[0] .= "

"; + $data[0] .= __("Equipment energy consumed").": ".number_format($mnged_energy, 2)." Wh"; + $data[0] .= "
"; + $data[0] .= __("Equipment energy bill").": ".number_format($mnged_energy_bill, 2)." €"; + $data[0] .= "
"; + $data[0] .= __("Calculated cooling energy").": ".number_format($cooling_energy, 2)." Wh"; + $data[0] .= "
"; + $data[0] .= __("Calculated cooling energy bill").": ".number_format($cooling_energy_bill, 2)." €"; + + //Print avg. power graph + $start_date = date("Y-m-d"); + $date = get_system_time (); + $draw_events = false; + $draw_alerts = false; + $period = 7200; + $avg_only = true; + + $module = modules_get_agentmodule_id (io_safe_input("Avg. Power"), $id_agent); + $unit = modules_get_unit ($module['id_agente_modulo']); + + $data[1] = grafico_modulo_sparse($module['id_agente_modulo'], 7200, $draw_events, 400, 250, + $module['nombre'], null, $draw_alerts, $avg_only, false, $date, $unit); + + array_push ($table->data, $data); + + echo "
"; + html_print_table($table); + echo "
"; + + + $table->head = array(); + $table->data = array(); + + + $table->head[0] = __("Average inlet temperature"); + $table->head[1] = __("Calculated cooling power"); + + $data = array(); + + $module = modules_get_agentmodule_id (io_safe_input("Avg. Inlet Temperature"), $id_agent); + $unit = modules_get_unit ($module['id_agente_modulo']); + + $data[0] = grafico_modulo_sparse($module['id_agente_modulo'], 7200, $draw_events, 400, 250, + $module['nombre'], null, $draw_alerts, $avg_only, false, $date, $unit); + + + $module = modules_get_agentmodule_id (io_safe_input("Calculated Cooling Power"), $id_agent); + $unit = modules_get_unit ($module['id_agente_modulo']); + + $data[1] = grafico_modulo_sparse($module['id_agente_modulo'], 7200, $draw_events, 400, 250, + $module['nombre'], null, $draw_alerts, $avg_only, false, $date, $unit); + + array_push ($table->data, $data); + + echo "
"; + html_print_table($table); + echo "
"; +} +?> diff --git a/pandora_plugins/intel_dcm/extensions/intel_dcm_setup.php b/pandora_plugins/intel_dcm/extensions/intel_dcm_setup.php new file mode 100644 index 0000000000..1817ea313b --- /dev/null +++ b/pandora_plugins/intel_dcm/extensions/intel_dcm_setup.php @@ -0,0 +1,167 @@ + "dcm_server", + "value" => "")); + + } + + $aux = db_get_value("value", "tconfig", "token", "dcm_port"); + + if ($aux === false) { + db_process_sql_insert("tconfig", array("token" => "dcm_port", + "value" => "")); + + } +} + +function main_intel_dcm() { + global $config; + + ui_print_page_header (__("Intel DCM Setup"), "images/setup.png", false, "", true, ""); + + if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { + db_pandora_audit("ACL Violation", "Trying to access Setup Management"); + require ("general/noaccess.php"); + + return; + } + + $activate_monitoring = get_parameter("activate_monitoring"); + $power_interval = get_parameter("power_interval"); + $thermal_interval = get_parameter("thermal_interval"); + $power_granularity = get_parameter("power_granularity"); + $thermal_granularity = get_parameter("thermal_granularity"); + $multiplier = get_parameter("multiplier"); + $cost = get_parameter("cost"); + $update = get_parameter("update"); + $dcm_server = get_parameter("dcm_server", ""); + $dcm_port = get_parameter("dcm_port", ""); + + + create_tcongif_structures(); + + //Update info + if ($update) { + + //Info from pandora database + + //Otherwise the field value is updated + db_process_sql_update("tconfig", array("value" => $dcm_server), array("token" => "dcm_server")); + + db_process_sql_update("tconfig", array("value" => $dcm_port), array("token" => "dcm_port")); + + //Update info on Intel DCM + exec_dcm_action("set_power_sampling", $power_interval); + exec_dcm_action("set_thermal_sampling", $thermal_interval); + exec_dcm_action("set_power_granularity", $power_granularity); + exec_dcm_action("set_thermal_granularity", $thermal_granularity); + exec_dcm_action("set_cooling_multiplier", $multiplier); + exec_dcm_action("set_power_cost", $cost); + + if ($activate_monitoring) { + exec_dcm_action("resume_monitoring"); + + } else { + exec_dcm_action("suspend_monitoring"); + + } + } + + $activate_dcm_plugin = db_get_value("value", "tconfig", "token", "active_dcm_plugin"); + $dcm_server = db_get_value("value", "tconfig", "token", "dcm_server"); + $dcm_port = db_get_value("value", "tconfig", "token", "dcm_port"); + + //Get current value from DCM API + $power_interval = exec_dcm_action("get_power_sampling"); + $thermal_interval = exec_dcm_action("get_thermal_sampling"); + $power_granularity = exec_dcm_action("get_power_granularity"); + $thermal_granularity = exec_dcm_action("get_thermal_granularity"); + $multiplier = exec_dcm_action("get_cooling_multiplier"); + $cost = exec_dcm_action("get_power_cost"); + $activate_monitoring = exec_dcm_action("status_monitoring"); + + $measure_values = array("0" => "0", + "30" => "30", + "60" => "60", + "180" => "180", + "360" => "360", + "600" => "600"); + + $storage_values = array("30" => "30", + "60" => "60", + "180" => "180", + "360" => "360", + "600" => "600", + "1800" => "1800", + "3600" => "3600"); + + $table->width = '98%'; + $table->data = array (); + + + $table->data[0][0] = __('Server'); + + $table->data[0][1] = html_print_input_text ('dcm_server', $dcm_server, '', 30, 100, true); + + $table->data[1][0] = __('Port'); + + $table->data[1][1] = html_print_input_text ('dcm_port', $dcm_port, '', 30, 100, true); + + $table->data[2][0] = __('Activate/Suspend Monitoring'); + + $table->data[2][1] = html_print_checkbox ("activate_monitoring", "1", $activate_monitoring, true); + + $table->data[3][0] = __('Power Measuring Period (seconds)'); + + $table->data[3][1] = html_print_select ($measure_values, "power_interval", $power_interval, '', '', '', true); + + $table->data[4][0] = __('Thermal Measuring Period (seconds)'); + + $table->data[4][1] = html_print_select ($measure_values, "thermal_interval", $thermal_interval, '', '', '', true); + + $table->data[5][0] = __('Power Data Storage Granularity (seconds)'); + + $table->data[5][1] = html_print_select ($storage_values, "power_granularity", $power_granularity, '', '', '', true); + + $table->data[6][0] = __('Thermal Data Storage Granularity (seconds)'); + + $table->data[6][1] = html_print_select ($storage_values, "thermal_granularity", $thermal_granularity, '', '', '', true); + + $table->data[7][0] = __('Cooling/Power Multiplier'); + + $table->data[7][1] = html_print_input_text ('multiplier', $multiplier, '', 30, 100, true); + + $table->data[8][0] = __('Power Cost'); + + $table->data[8][1] = html_print_input_text ('cost', $cost, '', 30, 100, true); + + echo '
'; + html_print_input_hidden ('update', 1); + html_print_table ($table); + echo '
'; + html_print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"'); + echo '
'; + echo '
'; +} + +extensions_add_godmode_menu_option (__("Intel DCM Setup"), "PM", "gsetup", null); +extensions_add_godmode_function('main_intel_dcm'); +?> diff --git a/pandora_plugins/intel_dcm/intel_dcm_discovery.pl b/pandora_plugins/intel_dcm/intel_dcm_discovery.pl new file mode 100644 index 0000000000..1dc81598f6 --- /dev/null +++ b/pandora_plugins/intel_dcm/intel_dcm_discovery.pl @@ -0,0 +1,420 @@ +#!/usr/bin/perl +# (c) Dario Rodriguez 2011 +# Intel DCM Discovery + +use POSIX qw(setsid strftime strftime ceil); + +use strict; +use warnings; + +use IO::Socket::INET; +use NetAddr::IP; + +# Default lib dir for RPM and DEB packages + +use lib '/usr/lib/perl5'; + +use PandoraFMS::Tools; +use PandoraFMS::DB; +use PandoraFMS::Core; +use PandoraFMS::Config; + +sub getParam($) { + my $param = shift; + + $param = "--".$param; + + my $value_aux = undef; + my $i; + for($i=0; $i<$#ARGV; $i++) { + if ($param eq $ARGV[$i]) { + $value_aux = $ARGV[$i+1]; + } + } + + return $value_aux; +} + +########################################################################## +# Global variables so set behaviour here: + +my $target_timeout = 5; # Fixed to 5 secs by default + +########################################################################## +# Code begins here, do not touch +########################################################################## +my $pandora_conf = "/etc/pandora/pandora_server.conf"; +my $task_id = $ARGV[0]; # Passed automatically by the server +my $target_group = $ARGV[1]; # Defined by user +my $create_incident = $ARGV[2]; # Defined by user + +# Used Custom Fields in this script +my $target_network = getParam("net"); # Filed1 defined by user +my $username = getParam("ipmi_user"); # Field2 defined by user +my $password = getParam("ipmi_pass"); # Field3 defined by user +my $dcm_server = getParam("dcm_server"); +my $dcm_port = getParam("dcm_port"); +my $derated_power = getParam("derated_power"); + +########################################################################## +# Update recon task status. +########################################################################## +sub update_recon_task ($$$) { + my ($dbh, $id_task, $status) = @_; + + db_do ($dbh, 'UPDATE trecon_task SET utimestamp = ?, status = ? WHERE id_rt = ?', time (), $status, $id_task); +} + +########################################################################## +# Show help +########################################################################## +sub show_help { + print "\nSpecific Pandora FMS Intel DCM Discovery\n"; + print "(c) Artica ST 2011 \n\n"; + print "Usage:\n\n"; + print " $0 more params, see doc\n\n"; + exit; +} + +sub ipmi_ping ($$$$) { + my ($conf, $addr, $user, $pass) = @_; + + my $cmd = "ipmiping $addr -c 3"; + + my $res = `$cmd`; + + if ($res =~ /100\.0% packet loss/) { + + return 0; + } + + #If we have credentials we must check it + if (defined($user) && defined($pass) && $user && $pass) { + + # Check if the credentials are valid + $cmd = "bmc-info -h $addr -u $user -p $pass 2>&1"; + + $res = `$cmd`; + + if ($? != 0) { + + logger ($conf, "[Intel DCM Discovery] Host $addr reports a BMC error", 1); + return 0; + } + } + + return 1; +} + +sub create_custom_fields ($) { + my $dbh = shift; + + my $id_entity = get_db_value($dbh, 'SELECT id_field FROM tagent_custom_fields WHERE name = "DCM_Entity_Id"'); + + if (!$id_entity) { + db_insert ($dbh, 'id_field', 'INSERT INTO tagent_custom_fields (name, display_on_front) VALUES ("DCM_Entity_Id", 0)'); + + } + + my $id_derated = get_db_value($dbh, 'SELECT id_field FROM tagent_custom_fields WHERE name = "DCM_Entity_Derated_Power"'); + + if (!$id_derated) { + db_insert ($dbh, 'id_field', 'INSERT INTO tagent_custom_fields (name, display_on_front) VALUES ("DCM_Entity_Derated_Power", 0)'); + + } + + ($id_derated, $id_entity) +} + +sub set_dcm_derated_power ($$$$) { + my ($dbh, $id_agent, $id_field, $derated_power) = @_; + + db_insert ($dbh, 'id_field', 'INSERT INTO tagent_custom_data (id_field, id_agent, description) VALUES (?, ? ,?)', $id_field, $id_agent, $derated_power); +} + +sub set_dcm_id ($$$$) { + my ($dbh, $id_agent, $id_field, $dcm_id) = @_; + + db_insert ($dbh, 'id_field', 'INSERT INTO tagent_custom_data (id_field, id_agent, description) VALUES (?, ? ,?)', $id_field, $id_agent, $dcm_id); +} + +sub create_dcm_entity ($$$$$$$$) { + my ($dbh, $dcm_server, $dcm_port, $agent_name, $agent_address, $derated_power, $bmc_user, $bmc_pass)= @_; + + my $plugin_command = get_db_value($dbh, 'SELECT execute FROM tplugin WHERE name = "'.safe_input("Intel DCM Plugin").'"'); + + + my $command = safe_output($plugin_command)." --server \"".$dcm_server."\" --port ".$dcm_port; + + $command .= " --action 'add_entity' --type 'NODE' --value '$agent_name'"; + + $command .= " --address '$agent_address' --derated_power '$derated_power'"; + + $command .= " --connector 'com.intel.dcm.plugin.Nm15Plugin'"; + + $command .= " --bmc_user '$bmc_user' --bmc_pass '$bmc_pass'"; + + my $res = `$command`; + + return $res; +} + +sub create_metric_modules($$$$$$) { + my ($conf, $dbh, $id_agent, $dcm_id, $dcm_server, $dcm_port) = @_; + + my @modules_array = ( + {"name" => "Managed Nodes Energy", + "desc" => "The total energy consumed by all managed nodes in the specified entity, in Wh", + "value" => "mnged_nodes_energy"}, + {"name" => "Managed Nodes Energy Bill", + "desc" => "The total power bill for all energy consumed by all managed nodes in the specified entity", + "value" => "mnged_nodes_energy_bill"}, + {"name" => "IT Equipment Energy", + "desc" => "The total energy consumed by IT equipment, including managed nodes, unmanaged nodes and other IT equipment in the selected entity, in Wh", + "value" => "it_eqpmnt_energy"}, + {"name" => "IT Equipment Energy Bill", + "desc" => "The calculated power bill for IT equipment, including managed nodes, unmanaged nodes and other IT equipment in the selected entity", + "value" => "it_eqpmnt_energy_bill"}, + {"name" => "Calculated Cooling Energy", + "desc" => "The energy needed to cool the selected entity, in Wh", + "value" => "calc_cooling_energy"}, + {"name" => "Calculated Cooling Energy Bill", + "desc" => "The calculated power bill for the energy needed to cool the selected entity", + "value" => "calc_cooling_energy_bill"}, + {"name" => "Managed Nodes Power", + "desc" => "The total average power consumption by the managed nodes in the selected entity, in watts", + "value" => "mnged_nodes_pwr"}, + {"name" => "IT Equipment Power", + "desc" => "Provides the total average power consumption by IT equipment, including managed nodes, unmanaged nodes and other IT equipment in the selected entity in watts", + "value" => "it_eqpmnt_pwr"}, + {"name" => "Calculated Cooling Power", + "desc" => "Provides the average cooling power based on the IT_EQPMNT_PWR multiplied by COOLING_MULT in watts", + "value" => "calc_cooling_pwr"}, + {"name" => "Avg. Power Per Dimension", + "desc" => "The average power consumption per dimension", + "value" => "avg_pwr_per_dimension"}, + {"name" => "Derated power", + "desc" => "Adds the de-rated values of all the nodes in the entity to the nameplate power value of all unmanaged nodes and equipment associated with the entity, as defined by NAMEPLATE_PWR_UNMNGD_EQPMNT", + "value" => "derated_pwr"}, + {"name" => "Inlet Temperature Span", + "desc" => "The average inlet temperature differential between the highest and lowest node temperature in a group (degC/degF)", + "value" => "inlet_temperature_span"}); + + + my $plugin_action = "--action \'metric_data\' --entity_id \'".$dcm_id."\'"; + + my $id_plugin = get_db_value($dbh, 'SELECT id FROM tplugin WHERE name = "'.safe_input("Intel DCM Plugin").'"'); + + + foreach my $mod (@modules_array) { + + my %aux_mod = %{$mod}; + + my $aux_params = $plugin_action." --value \'".$aux_mod{'value'}."\'"; + + my %parameters; + + $parameters{"nombre"} = safe_input($aux_mod{'name'}); + $parameters{"id_tipo_modulo"} = 1; + $parameters{"id_agente"} = $id_agent; + $parameters{"id_plugin"} = $id_plugin; + $parameters{"ip_target"} = $dcm_server; + $parameters{"tcp_port"} = $dcm_port; + $parameters{"id_modulo"} = 4; + $parameters{"max_timeout"} = 300; + $parameters{"descripcion"} = $aux_mod{'desc'}; + $parameters{"plugin_parameter"} = $aux_params; + + pandora_create_module_from_hash ($conf, \%parameters, $dbh); + + } +} + +sub create_query_modules($$$$$$) { + my ($conf, $dbh, $id_agent, $dcm_id, $dcm_server, $dcm_port) = @_; + + my @modules_array = ( + {"name" => "Max. Power", + "desc" => "The maximum power consumed by any single node/enclosure", + "value" => "max_pwr"}, + {"name" => "Avg. Power", + "desc" => "The average power consumption across all nodes/enclosures", + "value" => "avg_pwr"}, + {"name" => "Min. Power", + "desc" => "The minimum power consumed by any single node/enclosure", + "value" => "min_pwr"}, + {"name" => "Max. Avg. Power", + "desc" => "The maximum of group sampling (in a monitoring cycle) power in specified aggregation period for the sum of average power measurement in a group of nodes/enclosures within the specified entity", + "value" => "max_avg_pwr"}, + {"name" => "Total Max. Power", + "desc" => "The maximum of group sampling (in a monitoring cycle) power in specified aggregation period for sum of maximum power measurement in a group of nodes/enclosures within the specified entity", + "value" => "total_max_pwr"}, + {"name" => "Total Avg. Power", + "desc" => "The average (in specified aggregation period) of group power for sum of average power measurement in a group of nodes/enclosures within the specified entity", + "value" => "total_avg_pwr"}, + {"name" => "Max. Avg. Power Capping", + "desc" => "The maximum of group sampling (in a monitoring cycle) power in specified aggregation period for the sum of average power measurement in a group of nodes/enclosures with power capping capability", + "value" => "max_avg_pwr_cap"}, + {"name" => "Total Max. Power Capping", + "desc" => "The maximum group sampling (in a monitoring cycle) power in specified aggregation period for sum of maximum power measurement in a group of nodes/enclosures with power capping capability", + "value" => "total_max_pwr_cap"}, + {"name" => "Total Avg. Power Capping", + "desc" => "The average (in specified aggregation period) of group power for sum of average power measurement in a group of nodes/enclosures with power capping capability", + "value" => "total_avg_pwr_cap"}, + {"name" => "Total Min. Power", + "desc" => "The minimal group sampling (in a monitoring cycle) power in specified aggregation period for sum of minimum power measurement in a group of nodes/enclosures within the specified entity", + "value" => "total_min_pwr"}, + {"name" => "Min. Avg. Power", + "desc" => "The minimal group sampling (in a monitoring cycle) power in specified aggregation period for sum of average power measurement in a group of nodes/enclosures within the specified entity", + "value" => "min_avg_pwr"}, + {"name" => "Max. Inlet Temperature", + "desc" => "The maximum temperature for any single node within the specified entity", + "value" => "max_inlet_temp"}, + {"name" => "Avg. Inlet Temperature", + "desc" => "The average temperature for any single node within the specified entity", + "value" => "avg_inlet_temp"}, + {"name" => "Min. Inlet Temperature", + "desc" => "The minimum temperature for any single node within the specified entity", + "value" => "min_inlet_temp"}, + {"name" => "Instantaneous Power", + "desc" => "The instantaneous power consumption of a specified node/enclosure or the sum of the instantaneous power of the nodes/enclosures within the specified entity", + "value" => "ins_pwr"}); + + + my $plugin_action = "--action \'query_data\' --entity_id \'".$dcm_id."\'"; + + my $id_plugin = get_db_value($dbh, 'SELECT id FROM tplugin WHERE name = "'.safe_input("Intel DCM Plugin").'"'); + + + foreach my $mod (@modules_array) { + + my %aux_mod = %{$mod}; + + my $aux_params = $plugin_action." --value \'".$aux_mod{'value'}."\'"; + + my %parameters; + + $parameters{"nombre"} = safe_input($aux_mod{'name'}); + $parameters{"id_tipo_modulo"} = 1; + $parameters{"id_agente"} = $id_agent; + $parameters{"id_plugin"} = $id_plugin; + $parameters{"ip_target"} = $dcm_server; + $parameters{"tcp_port"} = $dcm_port; + $parameters{"id_modulo"} = 4; + $parameters{"max_timeout"} = 300; + $parameters{"descripcion"} = $aux_mod{'desc'}; + $parameters{"plugin_parameter"} = $aux_params; + + pandora_create_module_from_hash ($conf, \%parameters, $dbh); + + } +} + + +########################################################################## +########################################################################## +# M A I N C O D E +########################################################################## +########################################################################## + + +if ($#ARGV == -1){ + show_help(); +} + +# Pandora server configuration +my %conf; +$conf{"quiet"} = 0; +$conf{"verbosity"} = 1; # Verbose 1 by default +$conf{"daemon"}=0; # Daemon 0 by default +$conf{'PID'}=""; # PID file not exist by default +$conf{'pandora_path'} = $pandora_conf; + +# Read config file +pandora_load_config (\%conf); + +# Connect to the DB +my $dbh = db_connect ('mysql', $conf{'dbname'}, $conf{'dbhost'}, '3306', $conf{'dbuser'}, $conf{'dbpass'}); + + +# Start the network sweep +# Get a NetAddr::IP object for the target network +my $net_addr = new NetAddr::IP ($target_network); +if (! defined ($net_addr)) { + logger (\%conf, "Invalid network " . $target_network . " for Intel DCM Discovery task", 1); + update_recon_task ($dbh, $task_id, -1); + return -1; +} + +#Get id of custom fields +my ($id_derated_cf, $id_entity_cf) = create_custom_fields($dbh); + +# Scan the network for hosts +my ($total_hosts, $hosts_found, $addr_found) = ($net_addr->num, 0, ''); + +my $last = 0; +for (my $i = 1; $net_addr <= $net_addr->broadcast; $i++, $net_addr++) { + if($last == 1) { + last; + } + + my $net_addr_temp = $net_addr + 1; + if($net_addr eq $net_addr_temp) { + $last = 1; + } + + if ($net_addr =~ /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.(\d{1,3})\b/) { + if($1 eq '0' || $1 eq '255') { + next; + } + } + + my $addr = (split(/\//, $net_addr))[0]; + $hosts_found ++; + + # Update the recon task + update_recon_task ($dbh, $task_id, ceil ($i / ($total_hosts / 100))); + + my $alive = 0; + if (ipmi_ping (\%conf, $addr, $username, $password) == 1) { + $alive = 1; + } + + next unless ($alive > 0); + + # Resolve the address + my $host_name = gethostbyaddr(inet_aton($addr), AF_INET); + $host_name = $addr unless defined ($host_name); + + logger(\%conf, "Intel DCM Device found host $host_name.", 10); + + # Check if the agent exists + my $agent_id = get_agent_id($dbh, $host_name); + + # If the agent exists go for the next + if($agent_id != -1) { + next; + } + + # Create DCM Entity + my $dcm_id = create_dcm_entity ($dbh, $dcm_server, $dcm_port, $host_name, $addr, $derated_power, $username, $password); + + # Create a new agent + $agent_id = pandora_create_agent (\%conf, $conf{'servername'}, $host_name, $addr, $target_group, 0, 11, 'Created by Intel DCM Discovery', 300, $dbh); + + # Create modules + create_query_modules(\%conf, $dbh, $agent_id, $dcm_id, $dcm_server, $dcm_port); + create_metric_modules(\%conf, $dbh, $agent_id, $dcm_id, $dcm_server, $dcm_port); + + # Set custom fields + set_dcm_derated_power ($dbh, $agent_id, $id_derated_cf, $derated_power); + set_dcm_id ($dbh, $agent_id, $id_entity_cf, $dcm_id); + + # Generate an event + pandora_event (\%conf, "[RECON] New Intel DCM host [$host_name] detected on network [" . $target_network . ']', $target_group, $agent_id, 2, 0, 0, 'recon_host_detected', 0, $dbh); +} + +# Mark recon task as done +update_recon_task ($dbh, $task_id, -1); + +# End of code diff --git a/pandora_plugins/ipmi_sensors b/pandora_plugins/ipmi_sensors new file mode 100755 index 0000000000..b522f0579c --- /dev/null +++ b/pandora_plugins/ipmi_sensors @@ -0,0 +1,322 @@ +#!/usr/bin/perl +# -------------------------------------------------------------- +# IPMI Sensors parser for Unix +# Used as Plugin in Pandora FMS Monitoring System +# Written by Robert Nelson 2015 +# Licensed under BSD Licence +# -------------------------------------------------------------- + +use strict; +use warnings; + +use Getopt::Std; +use File::Copy; + + +$Getopt::Std::STANDARD_HELP_VERSION = 1; +$Getopt::Std::OUTPUT_HELP_VERSION = \*STDERR; + +my $TMP_DIR = "/tmp"; + +our $VERSION = "0.9.0"; + +sub VERSION_MESSAGE($) { + my ($fh) = @_; + + print $fh "$0 Version $VERSION\n"; +} + +sub HELP_MESSAGE($) { + my ($fh) = @_; + + print $fh "usage: $0 (-l | -h -u -p ) [-g ] [-a -d ]\n"; + print $fh "\nThis agent plugin can be used for local or remote IPMI monitoring\n"; + print $fh "For local monitoring:\n"; + print $fh "-l\n"; + print $fh "For remote monitoring:\n"; + print $fh "-h\tIPMI host name or IP address\n"; + print $fh "-u\tIPMI user name\n"; + print $fh "-p\tIPMI password\n"; + print $fh "In either case the module can be assigned to a module group using:\n"; + print $fh "-g\tModule group (must already exist in PandoraFMS)\n\n"; + print $fh "-a\tAgent name, requires also -d option\n"; + print $fh "-d\tLocal directory pool for agent data files\n"; + print $fh "-D\tdriver to be used\n"; +} + +sub exec_program($) { + use IPC::Open3; + use IO::Select; + + my $cmd = shift; + + my $pid = open3(\*CHILD_STDIN, \*CHILD_STDOUT, \*CHILD_STDERR, $cmd); + + close(CHILD_STDIN); + + my $sel = new IO::Select(\*CHILD_STDOUT, \*CHILD_STDERR); + + my ($child_stdout, $child_stderr) = ('', ''); + + while (my @ready = $sel->can_read(60)) { + foreach my $h (@ready) + { + my ($buf, $count); + if ($h eq \*CHILD_STDERR) + { + $count = sysread(CHILD_STDERR, $buf, 4096); + if ($count > 0) { + $child_stderr .= $buf; + } else { + $sel->remove(\*CHILD_STDERR); + } + } else { + $count = sysread(CHILD_STDOUT, $buf, 4096); + if ($count > 0) { + $child_stdout .= $buf; + } else { + $sel->remove(\*CHILD_STDOUT); + } + } + } + my @active_handles = $sel->handles; + if ($#active_handles < 0) { + last; + } + } + + waitpid($pid, 1); + + my $retval = $? >> 8; + + return ($retval, $child_stdout, $child_stderr); +} + +my %options; + +if (!getopts('lh:u:p:g:a:d:', \%options)) { + exit 1; +} + +if (defined $options{'l'}) { + if (defined $options{'h'} || defined $options{'u'} || defined $options{'p'} || defined $options{'v'}) { + print STDERR "Option -l can't be used with -h, -u, -p or -v\n"; + HELP_MESSAGE(\*STDERR); + exit 1; + } +} elsif (!defined $options{'h'} || !defined $options{'u'} || !defined $options{'p'}) { + print STDERR "Either -l or all of -h, -u and -p must be specified\n"; + HELP_MESSAGE(\*STDERR); + exit 1; +} +if ( ( defined $options{'a'} && !defined $options{'d'} ) || ( !defined $options{'a'} && defined $options{'d'} ) ) { + print STDERR "Arguments -a and -d must be specified together\n"; + HELP_MESSAGE(\*STDERR); + exit 1; +} + +my $host_name = $options{'h'}; +my $user_name = $options{'u'}; +my $user_password = $options{'p'}; +my $module_group = $options{'g'}; +my $agent_name = $options{'a'}; +my $dest_dir = $options{'d'}; +my $driver = $options{'D'}; + + +# Map Sensor type to module type and thresholds +# 0 = numeric, record has thresholds +# 1 = simple flag, 0 normal, > 0 critical +# 2 = complex flags, for now ignore alert settings +# 3 = string or unknown + +my %sensor_types = ( + 'Temperature' => 0, + 'Voltage' => 0, + 'Current' => 0, + 'Fan' => 0, + 'Physical Security' => 1, + 'Platform Security Violation Attempt' => 1, + 'Processor' => 2, + 'Power Supply' => 2, + 'Power Unit' => 2, + 'Cooling Device' => 0, + 'Other Units Based Sensor' => 0, + 'Memory' => 2, + 'Drive Slot' => 3, + 'POST Memory Resize' => 3, + 'System Firmware Progress' => 1, + 'Event Logging Disabled' => 2, + 'Watchdog 1' => 2, + 'System Event' => 2, + 'Critical Interrupt' => 1, + 'Button Switch' => 2, + 'Module Board' => 3, + 'Microcontroller Coprocessor' => 3, + 'Add In Card' => 3, + 'Chassis' => 3, + 'Chip Set' => 3, + 'Other Fru' => 3, + 'Cable Interconnect' => 3, + 'Terminator' => 3, + 'System Boot Initiated' => 2, + 'Boot Error' => 1, + 'OS Boot' => 2, + 'OS Critical Stop' => 1, + 'Slot Connector' => 2, + 'System ACPI Power State' => 2, + 'Watchdog 2' => 2, + 'Platform Alert' => 2, + 'Entity Presence' => 2, + 'Monitor ASIC IC' => 3, + 'LAN' => 2, + 'Management Subsystem Health' => 1, + 'Battery' => 2, + 'Session Audit' => 3, + 'Version Change' => 3, + 'FRU State' => 3, + 'OEM Reserved' => 3 +); + +my $command = 'ipmi-sensors'; +if (defined $driver){ + $command .= " -D $driver " +} +if (defined $host_name) { + $command .= " -h $host_name -u $user_name -p $user_password -l user"; +} +$command .= ' --ignore-not-available-sensors --no-header-output --comma-separated-output --non-abbreviated-units --output-sensor-thresholds --output-event-bitmask'; + +my ($retval, $stdout, $stderr) = exec_program($command); + + +my $module_list = ""; + +if ($retval == 0) { + my ($module_name, $module_type, $module_warn_min, $module_warn_max, $module_warn_invert, $module_critical_min, $module_critical_max, $module_critical_invert); + + foreach my $line (split(/\n/, $stdout)) { + my ($sensor, $name, $type, $value, $units, $lowerNR, $lowerC, $lowerNC, $upperNC, $upperC, $upperNR, $eventmask) = split(/,/, $line); + + $module_name = "$type: $name"; + + my ($module_warn_min, $module_warn_max, $module_warn_invert, $module_critical_min, $module_critical_max, $module_critical_invert); + + my $sensor_type = $sensor_types{$type}; + if ($sensor_type == 0) { + $module_type = 'generic_data'; + if ($lowerC ne 'N/A' and $upperC ne 'N/A') { + if ($lowerC <= $upperC) { + $module_critical_min = $lowerC; + $module_critical_max = $upperC; + } else { + $module_critical_min = $upperC; + $module_critical_max = $lowerC; + } + $module_critical_invert = '1'; + } + if ($lowerNC ne 'N/A' and $upperNC ne 'N/A') { + if ($lowerNC <= $upperNC) { + $module_warn_min = $lowerNC; + $module_warn_max = $upperNC; + } else { + $module_warn_min = $upperNC; + $module_warn_max = $lowerNC; + } + $module_warn_invert = '1'; + } + } elsif ($sensor_type == 1) { + $module_type = 'generic_data'; + $module_critical_min = '1'; + $module_critical_max = '0'; + } elsif ($sensor_type == 2) { + $module_type = 'generic_data'; + } elsif ($sensor_type == 3) { + $module_type = 'generic_data_string'; + } else { + $module_type = 'generic_data_string'; + } + + $module_list .= "\n"; + $module_list .= " \n"; + $module_list .= " \n"; + $module_list .= " \n" if defined $module_group; + if ($value eq 'N/A') { + if ($eventmask =~ /([0-9A-Fa-f]+)h/) { + $value = hex $1; + } else { + $value = $eventmask; + } + } + $module_list .= " \n"; + $module_list .= " \n" if ($units ne 'N/A'); + $module_list .= " $module_warn_min\n" if defined $module_warn_min; + $module_list .= " $module_warn_max\n" if defined $module_warn_max; + $module_list .= " $module_warn_invert\n" if defined $module_warn_invert; + $module_list .= " $module_critical_min\n" if defined $module_critical_min; + $module_list .= " $module_critical_max\n" if defined $module_critical_max; + $module_list .= " $module_critical_invert\n" if defined $module_critical_invert; + $module_list .= "\n"; + } + + if (defined ($agent_name)){ + + my $xml = "\n"; + + # print header + $xml .= ">", $file_path); + + my $bin_opts = ':raw:encoding(UTF8)'; + + if ($^O eq "Windows") { + $bin_opts .= ':crlf'; + } + + binmode(FD, $bin_opts); + + print FD $xml; + + close (FD); + + # transfer file + my $rc = copy($file_path, $dest_dir); + + #If there was no error, delete file + if ($rc == 0) { + print STDERR "There was a problem copying local file to $dest_dir: $!\n"; + } else { + unlink ($file_path); + } + + + } + else { + print $module_list; + } + +} else { + print STDERR "ipmi_sensors: Error Executing - $command\n"; + print STDERR $stderr; + exit 1; +} diff --git a/pandora_plugins/top1_cpu_ram/README.txt b/pandora_plugins/top1_cpu_ram/README.txt new file mode 100644 index 0000000000..e927ea4f57 --- /dev/null +++ b/pandora_plugins/top1_cpu_ram/README.txt @@ -0,0 +1,7 @@ + +Genera dos módulos: + +Uso CPU +Uso Memoria + +Para cada uno de los procesos que tengan un consumo mayor. diff --git a/pandora_plugins/top1_cpu_ram/performance.vbs b/pandora_plugins/top1_cpu_ram/performance.vbs new file mode 100644 index 0000000000..b60c9faf86 --- /dev/null +++ b/pandora_plugins/top1_cpu_ram/performance.vbs @@ -0,0 +1,31 @@ + +Sub PrintPerf(item) + Set objShell = CreateObject("WScript.Shell") + Set objExec = objShell.Exec("powershell Get-Process | Sort-Object " & item & " -desc | Select-Object -first 1 | Format-Table " & item & ",ProcessName -hidetableheader") + Do + line = Trim(objExec.StdOut.ReadLine()) + If Len(line) > 0 Then + value = Left (line, InStr (line, " ")-1) + process = Mid (line, InStr (line, " ")+1, Len (line) ) + WScript.StdOut.WriteLine "" + WScript.StdOut.WriteLine "process name: " & process & " " + End If + Loop While Not objExec.Stdout.atEndOfStream +End Sub + + + +' Generate module: CPU ussage +WScript.StdOut.WriteLine "" +WScript.StdOut.WriteLine "" +WScript.StdOut.WriteLine "" +PrintPerf "CPU" +WScript.StdOut.WriteLine "" + +' Generate module: MEM ussage +WScript.StdOut.WriteLine "" +WScript.StdOut.WriteLine "" +WScript.StdOut.WriteLine "" +PrintPerf "WS" +WScript.StdOut.WriteLine "" + diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm new file mode 100644 index 0000000000..02769f96f0 --- /dev/null +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -0,0 +1,1874 @@ +package PandoraFMS::PluginTools; +################################################################################ +# +# Pandora FMS Plugin functions library +# +# (c) Fco de Borja Sanchez +# +# Requirements: +# Library Centos package +# ------- -------------- +# LWP::UserAgent perl-libwww-perl +# +# +# +# Version Date +# a1 17-11-2015 +# ** Revision handler in gitlab ** +# +################################################################################ + +use strict; +use warnings; + +use LWP::UserAgent; +use HTTP::Cookies; +use HTTP::Request::Common; + +use File::Copy; +use Scalar::Util qw(looks_like_number); +use Time::HiRes qw(time); +use POSIX qw(strftime setsid floor); +use MIME::Base64; + +use base 'Exporter'; + +our @ISA = qw(Exporter); + +# version: Defines actual version of Pandora Server for this module only +my $pandora_version = "7.0NG.715"; +my $pandora_build = "171114"; +our $VERSION = $pandora_version." ".$pandora_build; + +our %EXPORT_TAGS = ( 'all' => [ qw() ] ); + +our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); + +our @EXPORT = qw( + api_available + api_create_custom_field + api_create_tag + api_create_group + call_url + decrypt + empty + encrypt + extract_key_map + get_lib_version + get_unit + get_unix_time + get_sys_environment + getCurrentUTimeMilis + head + in_array + init + is_enabled + load_perl_modules + logger + merge_hashes + parse_arguments + parse_configuration + parse_php_configuration + process_performance + post_url + print_agent + print_error + print_execution_result + print_message + print_module + print_warning + print_stderror + read_configuration + simple_decode_json + snmp_data_switcher + snmp_get + snmp_walk + tail + to_number + transfer_xml + trim +); + +################################################################################ +# +################################################################################ +sub get_lib_version { + return $VERSION; +} + + +################################################################################ +# Get current time (milis) +################################################################################ +sub getCurrentUTimeMilis { + #return trim (`date +"%s%3N"`); # returns 1449681679712 + return floor(time*1000); +} + +################################################################################ +# Mix hashses +################################################################################ +sub merge_hashes { + my $_h1 = shift; + my $_h2 = shift; + + if (ref($_h1) ne "HASH") { + return \%{$_h2} if (ref($_h2) eq "HASH"); + } + + if (ref($_h2) ne "HASH") { + return \%{$_h1} if (ref($_h1) eq "HASH"); + } + + if ((ref($_h1) ne "HASH") && (ref($_h2) ne "HASH")) { + return {}; + } + + my %ret = (%{$_h1}, %{$_h2}); + + return \%ret; +} + +################################################################################ +# Regex based tail command +################################################################################ +sub tail { + my $string = shift; + my $n = shift; + my $reverse_flag = shift; + my $nlines = $string =~ tr/\n//; + + if (empty ($string)){ + return ""; + } + + if (defined($reverse_flag)) { + $n = $n-1; + } + else { + $n = $nlines-$n; + } + + $string =~ s/^(?:.*\n){0,$n}//; + return $string; +} + +################################################################################ +# Regex based head command +################################################################################ +sub head { + my $string = shift; + my $n = shift; + my $reverse_flag = shift; + my $nlines = $string =~ tr/\n//; + if (empty ($string)){ + return ""; + } + + if (defined($reverse_flag)) { + $n = $nlines - $n +1; + } + my $str=""; + my @lines = split /\n/, $string; + for (my $x=0; $x < $n; $x++) { + $str .= $lines[$x] . "\n"; + } + return $str; +} + +################################################################################ +# Check if a given variable contents a number +################################################################################ +sub to_number { + my $n = shift; + + if(empty($n)) { + return undef; + } + + if ($n =~ /[\d+,]*\d+\.\d+/) { + # American notation + $n =~ s/,//g; + } + elsif ($n =~ /[\d+\.]*\d+,\d+/) { + # Spanish notation + $n =~ s/\.//g; + $n =~ s/,/./g; + } + if(looks_like_number($n)) { + return $n; + } + return undef; +} + +################################################################################ +# Erase blank spaces before and after the string +################################################################################ +sub trim { + my $string = shift; + if (empty ($string)){ + return ""; + } + + $string =~ s/\r//g; + + chomp ($string); + $string =~ s/^\s+//g; + $string =~ s/\s+$//g; + + return $string; +} + +################################################################################ +# Empty +################################################################################ +sub empty { + my $str = shift; + + if (! (defined ($str)) ){ + return 1; + } + + if(looks_like_number($str)){ + return 0; + } + + if (ref ($str) eq "ARRAY") { + return (($#{$str}<0)?1:0); + } + + if (ref ($str) eq "HASH") { + my @tmp = keys %{$str}; + return (($#tmp<0)?1:0); + } + + if ($str =~ /^\ *[\n\r]{0,2}\ *$/) { + return 1; + } + return 0; +} + +################################################################################ +# Assing a value to a string key as subkeys in a hash map +################################################################################ +sub extract_key_map; +sub extract_key_map { + my ($hash, $string, $value) = @_; + + my ($key, $str) = split /\./, $string, 2; + if (empty($str)) { + $hash->{$key} = $value; + + return $hash; + } + + $hash->{$key} = extract_key_map($hash->{$key}, $str, $value); + + return $hash; +} + +################################################################################ +# Check if a value is in an array +################################################################################ +sub in_array { + my ($array, $value) = @_; + + if (empty($value)) { + return 0; + } + + my %params = map { $_ => 1 } @{$array}; + if (exists($params{$value})) { + return 1; + } + return 0; +} + +################################################################################ +# Get unit +################################################################################ +sub get_unit { + my $str = shift; + $str =~ s/[\d\.\,]//g; + return $str; +} + +################################################################################ +## Decodes a json strin into an hash +################################################################################ +sub simple_decode_json; +sub simple_decode_json { + my $json = shift; + my $hash_reference; + + if (empty ($json)){ + return undef; + + } + if ($json =~ /^\".*\"\:\{.*}$/ ){ # key => tree + my @data = split /:/, $json, 2; + + # data[0] it's key, remove " + $data[0] =~ s/^\"//; + $data[0] =~ s/\"$//; + + $hash_reference->{$data[0]} = simple_decode_json($data[1]); + return $hash_reference; + + } + if ($json =~ /^\{(.*)\}$/) { # parse tree + $hash_reference = simple_decode_json($1); + return $hash_reference; + + } + if ($json =~ /^(\".*[\"|\}]),(\".*[\"|\}])/) { # multi keys + my @data = split /,/, $json, 2; + + if ($data[0] =~ /{/ ){ + @data = split /},/, $json, 2; + $data[0] .= "}"; + } + + my $left_tree; + my $right_tree; + + $left_tree = simple_decode_json($data[0]); + $right_tree = simple_decode_json($data[1]); + + + # join both sides + foreach (keys %{$left_tree}){ + $hash_reference->{$_} = $left_tree->{$_}; + } + foreach (keys %{$right_tree}){ + $hash_reference->{$_} = $right_tree->{$_}; + } + + return $hash_reference; + + } + if ($json =~ /^\"(.*)\"\:(\".*\")$/ ) { # return key => value + $hash_reference->{$1} = simple_decode_json($2); + + return $hash_reference; + + } + if ($json =~ /^"(.*)"$/) { + return $1; + + } + + + return $hash_reference; + +} + +################################################################################ +# print_agent +################################################################################ +sub print_agent { + my ($config, $agent_data, $modules_def, $str_flag) = @_; + + my $xml = "\n"; + + # print header + $xml .= "{name})) { + return undef; + } + + my $xml_module = ""; + # If not a string type, remove all blank spaces! + if ($data->{type} !~ m/string/){ + $data->{value} = trim($data->{value}); + } + + $data->{tags} = $data->{tags}?$data->{tags}:($conf->{MODULE_TAG_LIST}?$conf->{MODULE_TAG_LIST}:undef); + $data->{interval} = $data->{interval}?$data->{interval}:($conf->{MODULE_INTERVAL}?$conf->{MODULE_INTERVAL}:undef); + $data->{module_group} = $data->{module_group}?$data->{module_group}:($conf->{MODULE_GROUP}?$conf->{MODULE_GROUP}:undef); + + # Global instructions (if defined) + $data->{unknown_instructions} = $conf->{unknown_instructions} unless (defined($data->{unknown_instructions}) || (!defined($conf->{unknown_instructions}))); + $data->{warning_instructions} = $conf->{warning_instructions} unless (defined($data->{warning_instructions}) || (!defined($conf->{warning_instructions}))); + $data->{critical_instructions} = $conf->{critical_instructions} unless (defined($data->{critical_instructions}) || (!defined($conf->{critical_instructions}))); + + $xml_module .= "\n"; + $xml_module .= "\t{name} . "]]>\n"; + $xml_module .= "\t" . $data->{type} . "\n"; + + if (ref ($data->{value}) eq "ARRAY") { + $xml_module .= "\t\n"; + foreach (@{$data->{value}}) { + $xml_module .= "\t{value} . "]]>\n"; + } + $xml_module .= "\t\n"; + } + else { + $xml_module .= "\t{value} . "]]>\n"; + } + + if ( !(empty($data->{desc}))) { + $xml_module .= "\t{desc} . "]]>\n"; + } + if ( !(empty ($data->{unit})) ) { + $xml_module .= "\t{unit} . "]]>\n"; + } + if (! (empty($data->{interval})) ) { + $xml_module .= "\t{interval} . "]]>\n"; + } + if (! (empty($data->{tags})) ) { + $xml_module .= "\t" . $data->{tags} . "\n"; + } + if (! (empty($data->{module_group})) ) { + $xml_module .= "\t" . $data->{module_group} . "\n"; + } + if (! (empty($data->{module_parent})) ) { + $xml_module .= "\t" . $data->{module_parent} . "\n"; + } + if (! (empty($data->{wmin})) ) { + $xml_module .= "\t{wmin} . "]]>\n"; + } + if (! (empty($data->{wmax})) ) { + $xml_module .= "\t{wmax} . "]]>\n"; + } + if (! (empty ($data->{cmin})) ) { + $xml_module .= "\t{cmin} . "]]>\n"; + } + if (! (empty ($data->{cmax})) ){ + $xml_module .= "\t{cmax} . "]]>\n"; + } + if (! (empty ($data->{wstr}))) { + $xml_module .= "\t{wstr} . "]]>\n"; + } + if (! (empty ($data->{cstr}))) { + $xml_module .= "\t{cstr} . "]]>\n"; + } + if (! (empty ($data->{cinv}))) { + $xml_module .= "\t{cinv} . "]]>\n"; + } + if (! (empty ($data->{winv}))) { + $xml_module .= "\t{winv} . "]]>\n"; + } + if (! (empty ($data->{max}))) { + $xml_module .= "\t{max} . "]]>\n"; + } + if (! (empty ($data->{min}))) { + $xml_module .= "\t{min} . "]]>\n"; + } + if (! (empty ($data->{post_process}))) { + $xml_module .= "\t{post_process} . "]]>\n"; + } + if (! (empty ($data->{disabled}))) { + $xml_module .= "\t{disabled} . "]]>\n"; + } + if (! (empty ($data->{min_ff_event}))) { + $xml_module .= "\t{min_ff_event} . "]]>\n"; + } + if (! (empty ($data->{status}))) { + $xml_module .= "\t{status} . "]]>\n"; + } + if (! (empty ($data->{timestamp}))) { + $xml_module .= "\t{timestamp} . "]]>\n"; + } + if (! (empty ($data->{custom_id}))) { + $xml_module .= "\t{custom_id} . "]]>\n"; + } + if (! (empty ($data->{critical_instructions}))) { + $xml_module .= "\t{critical_instructions} . "]]>\n"; + } + if (! (empty ($data->{warning_instructions}))) { + $xml_module .= "\t{warning_instructions} . "]]>\n"; + } + if (! (empty ($data->{unknown_instructions}))) { + $xml_module .= "\t{unknown_instructions} . "]]>\n"; + } + if (! (empty ($data->{quiet}))) { + $xml_module .= "\t{quiet} . "]]>\n"; + } + if (! (empty ($data->{module_ff_interval}))) { + $xml_module .= "\t{module_ff_interval} . "]]>\n"; + } + if (! (empty ($data->{crontab}))) { + $xml_module .= "\t{crontab} . "]]>\n"; + } + if (! (empty ($data->{min_ff_event_normal}))) { + $xml_module .= "\t{min_ff_event_normal} . "]]>\n"; + } + if (! (empty ($data->{min_ff_event_warning}))) { + $xml_module .= "\t{min_ff_event_warning} . "]]>\n"; + } + if (! (empty ($data->{min_ff_event_critical}))) { + $xml_module .= "\t{min_ff_event_critical} . "]]>\n"; + } + if (! (empty ($data->{ff_timeout}))) { + $xml_module .= "\t{ff_timeout} . "]]>\n"; + } + if (! (empty ($data->{each_ff}))) { + $xml_module .= "\t{each_ff} . "]]>\n"; + } + if (! (empty ($data->{parent_unlink}))) { + $xml_module .= "\t{parent_unlink} . "]]>\n"; + } + if (! (empty ($data->{alerts}))) { + foreach my $alert (@{$data->{alerts}}){ + $xml_module .= "\t\n"; + } + } + if (defined ($conf->{global_alerts})){ + foreach my $alert (@{$conf->{global_alerts}}){ + $xml_module .= "\t\n"; + } + } + + $xml_module .= "\n"; + + if (empty ($not_print_flag)) { + print $xml_module; + } + + return $xml_module; +} + +################################################################################ +# transfer_xml +################################################################################ +sub transfer_xml { + my ($conf, $xml, $name) = @_; + my $file_name; + my $file_path; + + if (! (empty ($name))) { + $file_name = $name . "_" . time() . ".data"; + } + else { + # Inherit file name + ($file_name) = $xml =~ /\s+agent_name='(.*?)'\s+.*$/m; + if (empty($file_name)){ + ($file_name) = $xml =~ /\s+agent_name="(.*?)"\s+.*$/m; + } + if (empty($file_name)){ + $file_name = trim(`hostname`); + } + + $file_name .= "_" . time() . ".data"; + } + + $file_path = $conf->{temp} . "/" . $file_name; + + #Creating XML file in temp directory + + if ( -e $file_path ) { + sleep (1); + $file_name = $name . "_" . time() . ".data"; + $file_path = $conf->{temp} . "/" . $file_name; + } + + open (FD, ">>", $file_path) or print_stderror($conf, "Cannot write to [" . $file_path . "]"); + + my $bin_opts = ':raw:encoding(UTF8)'; + + if ($^O eq "Windows") { + $bin_opts .= ':crlf'; + } + + binmode(FD, $bin_opts); + + print FD $xml; + + close (FD); + + $conf->{mode} = $conf->{transfer_mode} if empty($conf->{mode}); + if (empty ($conf->{mode}) ) { + print_stderror($conf, "[ERROR] Nor \"mode\" nor \"transfer_mode\" defined in configuration."); + return undef; + } + + #Transfering XML file + if ($conf->{mode} eq "tentacle") { + + #Send using tentacle + if ($^O =~ /win/i) { + `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path"`; + } + else { + `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path" 2>&1 > /dev/null`; + } + + + #If no errors were detected delete file + + if (! $?) { + unlink ($file_path); + } else { + print_stderror($conf, "[ERROR] There was a problem sending file [$file_path] using tentacle"); + return undef; + } + } + else { + #Copy file to local folder + my $dest_dir = $conf->{local_folder}; + + my $rc = copy($file_path, $dest_dir); + + #If there was no error, delete file + if ($rc == 0) { + print_stderror($conf, "[ERROR] There was a problem copying local file to $dest_dir: $!"); + return undef; + } + else { + unlink ($file_path); + } + } + return 1; +} + +################################################################################ +# Plugin mesage as module +################################################################################ +sub print_message { + my ($conf, $data) = @_; + + if (is_enabled($conf->{'as_server_plugin'})) { + print $data->{value}; + } + else { # as agent plugin + print_module($conf, $data); + } +} + +################################################################################ +# Module warning +# - tag: name +# - value: severity (default 0) +# - msg: description of the message +################################################################################ +sub print_warning { + my ($conf, $tag, $msg, $value) = @_; + + if (!(is_enabled($conf->{informational_modules}))) { + return 0; + } + + print_module($conf, { + name => "Plugin message" . ( $tag?" " . $tag:""), + type => "generic_data", + value => (defined($value)?$value:0), + desc => $msg, + wmin => 1, + cmin => 3, + }); +} + +################################################################################ +# Plugin mesage as module +################################################################################ +sub print_execution_result { + my ($conf, $msg, $value) = @_; + + if (!(is_enabled($conf->{informational_modules}))) { + return 0; + } + + print_module($conf, { + name => "Plugin execution result", + type => "generic_proc", + value => (defined($value)?$value:0), + desc => $msg, + }); +} + +################################################################################ +## Plugin devolution in case of error +################################################################################ +sub print_error { + my ($conf, $msg) = @_; + + if (!(is_enabled($conf->{informational_modules}))) { + return 0; + } + + print_module($conf, { + name => "Plugin execution result", + type => "generic_proc", + value => 0, + desc => $msg, + }); + exit 1; +} + +################################################################################ +## Plugin message to SDTDOUT +################################################################################ +sub print_stderror { + my ($conf, $msg, $always_show) = @_; + + if(is_enabled($conf->{debug}) || (is_enabled($always_show))) { + print STDERR strftime ("%Y-%m-%d %H:%M:%S", localtime()) . ": " . $msg . "\n"; + } +} + + +################################################################################ +# Log data +################################################################################ +my $log_aux_flag = 0; +sub logger { + my ($conf, $tag, $message) = @_; + my $file = $conf->{log}; + print_error($conf, "Log file undefined\n") unless defined $file; + + # Log rotation + if (-e $file && (stat($file))[7] > 32000000) { + rename ($file, $file.'.old'); + } + my $LOGFILE; + if ($log_aux_flag == 0) { + # Log starts + if (! open ($LOGFILE, "> $file")) { + print_error ($conf, "[ERROR] Could not open logfile '$file'"); + } + $log_aux_flag = 1; + } + else { + if (! open ($LOGFILE, ">> $file")) { + print_error ($conf, "[ERROR] Could not open logfile '$file'"); + } + } + + $message = "[" . $tag . "] " . $message if ((defined $tag) && ($tag ne "")); + + if (!(empty($conf->{agent_name}))){ + $message = "[" . $conf->{agent_xml_name} . "] " . $message; + } + + print $LOGFILE strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " - " . $message . "\n"; + close ($LOGFILE); +} + +################################################################################ +# is Enabled +################################################################################ +sub is_enabled { + my $value = shift; + + if ((defined ($value)) && ($value > 0)){ + # return true + return 1; + } + #return false + return 0; + +} + +################################################################################ +# Launch URL call +################################################################################ +sub call_url { + my $conf = shift; + my $call = shift; + my @options = @_; + my $_PluginTools_system = get_sys_environment($conf); + + if (empty($_PluginTools_system->{ua})) { + return { + error => "Uninitialized, please initialize UserAgent first" + }; + } + my $response = $_PluginTools_system->{ua}->get($call, @options); + + if ($response->is_success){ + return $response->decoded_content; + } + return undef; +} + +################################################################################ +# Launch URL call (POST) +################################################################################ +sub post_url { + my $conf = shift; + my $url = shift; + my @options = @_; + my $_PluginTools_system = $conf->{'__system'}; + + if (empty($_PluginTools_system->{ua})) { + return { + error => "Uninitialized, please initialize UserAgent first" + }; + } + my $response = $_PluginTools_system->{ua}->request(POST "$url", @options); + + if ($response->is_success){ + return $response->decoded_content; + } + return undef; +} + +################################################################################ +# initialize plugin (advanced - hashed configuration) +################################################################################ +sub init { + my $options = shift; + my $conf; + + eval { + $conf = init_system($options); + + if (defined($options->{lwp_enable})) { + if (empty($options->{lwp_timeout})) { + $options->{lwp_timeout} = 3; + } + + $conf->{'__system'}->{ua} = LWP::UserAgent->new((keep_alive => "10")); + $conf->{'__system'}->{ua}->timeout($options->{lwp_timeout}); + # Enable environmental proxy settings + $conf->{'__system'}->{ua}->env_proxy; + # Enable in-memory cookie management + $conf->{'__system'}->{ua}->cookie_jar( {} ); + if ( defined($options->{ssl_verify}) && ( ($options->{ssl_verify} eq "no") || (!is_enabled($options->{ssl_verify})) ) ) { + # Disable verify host certificate (only needed for self-signed cert) + $conf->{'__system'}->{ua}->ssl_opts( 'verify_hostname' => 0 ); + $conf->{'__system'}->{ua}->ssl_opts( 'SSL_verify_mode' => 0x00 ); + } + } + }; + if($@) { + # Failed + return { + error => $@ + }; + } + + return $conf; +} + +################################################################################ +# initialize plugin (basic) +################################################################################ +sub init_system { + my ($conf) = @_; + + my %system; + + if ($^O =~ /win/i ){ + $system{devnull} = "NUL"; + $system{cat} = "type"; + $system{os} = "Windows"; + $system{ps} = "tasklist"; + $system{grep} = "findstr"; + $system{echo} = "echo"; + $system{wcl} = "wc -l"; + } + else { + $system{devnull} = "/dev/null"; + $system{cat} = "cat"; + $system{os} = "Linux"; + $system{ps} = "ps -eo pmem,pcpu,comm"; + $system{grep} = "grep"; + $system{echo} = "echo"; + $system{wcl} = "wc -l"; + + if ($^O =~ /hpux/i) { + $system{os} = "HPUX"; + $system{ps} = "ps -eo pmem,pcpu,comm"; + } + + if ($^O =~ /solaris/i ) { + $system{os} = "solaris"; + $system{ps} = "ps -eo pmem,pcpu,comm"; + } + } + + $conf->{'__system'} = \%system; + return $conf; +} + +################################################################################ +# Return system environment +################################################################################ +sub get_sys_environment { + my $conf = shift; + + if (ref ($conf) eq "HASH") { + return $conf->{'__system'}; + } + return undef; +} + +################################################################################ +# Parses any configuration, from file (1st arg to program) or direct arguments +################################################################################ +sub read_configuration { + my ($config, $separator, $custom_eval) = @_; + + if ((!empty(@ARGV)) && (-f $ARGV[0])) { + $config = merge_hashes($config, parse_configuration(shift @ARGV, $separator, $custom_eval)); + } + $config = merge_hashes($config, parse_arguments(\@ARGV)); + + return $config; +} + +################################################################################ +# General arguments parser +################################################################################ +sub parse_arguments { + my $raw = shift; + my @args; + if (defined($raw)){ + @args = @{$raw}; + } + else { + return {}; + } + + my %data; + for (my $i = 0; $i < $#args; $i+=2) { + my $key = trim($args[$i]); + + $key =~ s/^-//; + $data{$key} = trim($args[$i+1]); + } + + return \%data; + +} + +################################################################################ +# General configuration file parser +# +# log=/PATH/TO/LOG/FILE +# +################################################################################ +sub parse_configuration { + my $conf_file = shift; + my $separator; + $separator = shift or $separator = "="; + my $custom_eval = shift; + my $_CFILE; + + my $_config; + + if (empty($conf_file)) { + return { + error => "Configuration file not specified" + }; + } + + if( !open ($_CFILE,"<", "$conf_file")) { + return { + error => "Cannot open configuration file" + }; + } + + while (my $line = <$_CFILE>){ + if (($line =~ /^ *\r*\n*$/) + || ($line =~ /^#/ )){ + # skip blank lines and comments + next; + } + my @parsed = split /$separator/, $line, 2; + if ($line =~ /^\s*global_alerts/){ + push (@{$_config->{global_alerts}}, trim($parsed[1])); + next; + } + if (ref ($custom_eval) eq "ARRAY") { + my $f = 0; + foreach my $item (@{$custom_eval}) { + if ($line =~ /$item->{exp}/) { + $f = 1; + my $aux; + eval { + $aux = $item->{target}->($_config, $item->{exp}, $line); + }; + + if (empty($_config)) { + $_config = $aux; + } + elsif (!empty($aux) && (ref ($aux) eq "HASH")) { + $_config = merge_hashes($_config, $aux); + } + } + } + + if (is_enabled($f)){ + next; + } + } + $_config->{trim($parsed[0])} = trim($parsed[1]); + } + close ($_CFILE); + + return $_config; +} + +################################################################################ +# PHP file parser +# +# log=/PATH/TO/LOG/FILE +# +################################################################################ +sub parse_php_configuration { + my $conf_file = shift; + my $separator = shift; + + if (!defined($separator)){ + $separator = "="; + } + my %_config; + + open (my $_CFILE,"<", "$conf_file") or return undef; + + my $comment_block = 0; + my $in_php = 0; + while (my $line = <$_CFILE>){ + if ($line =~ /.*\<\?php/ ){ + $in_php = 1; + $line =~ s/<\?php//g; + } + if($line =~ /.*\<\?/ ) { + $in_php = 1; + $line =~ s/<\?//g; + } + if ($in_php == 1){ + if ( ( $comment_block == 1) + && ( $line =~ /\*\// )) { # search multiline comment end + + # remove commented content: + $line =~ s/.*?(\*\/)//g; + + $comment_block = 0; + } + if ($comment_block == 1){ # ignore lines in commented block + next; + } + $line =~ /\/\*[^(?\*\/)]*/; # remove block comment + if ($line =~ /\/\*/ ) { + # multiline block comment detected! + $comment_block = 1; + next; + } + + if ($line =~ /.*\?\>/ ){ + $in_php = 0; + $line =~ s/\?\>.*//g; + } + $line =~ s/\/\*.*\*\///g; # Erase inline comments + $line =~ s/\/\/.*//g; # Erase inline comments + + chomp($line); + if ($line =~ /^\s*$/){ + # skip blank and empty lines + next; + } + + my @parsed = split /$separator/, $line, 2; + $_config{trim($parsed[0])} = trim($parsed[1]); + $_config{trim($parsed[0])} =~ s/[";]//g; + } + } + close ($_CFILE); + + return %_config; +} + +################################################################################ +# Process performance +################################################################################ +sub process_performance { + my ($conf, $process, $mod_name, $only_text_flag) = @_; + my $_PluginTools_system = $conf->{'__system'}; + + my $cpu; + my $mem; + my $instances; + my $runit = "%"; + my $cunit = "%"; + + $mod_name = $process if empty($mod_name); + + if (empty($process)) { + $process = "" if empty($process); + $mod_name = "" if empty($mod_name); + $cpu = 0; + $mem = 0; + $instances = 0; + } + elsif ($^O =~ /win/i) { + my $out = trim(`(FOR /F \"skip=2 tokens=2 delims=,\" %P IN ('typeperf \"\\Proceso($process)\\% de tiempo de procesador\" -sc 1') DO \@echo %P) | find /V /I \"...\" 2> $_PluginTools_system->{devnull}`); + + if ( ($out =~ /member/i) + || ($out =~ /error/i) + || (! $out =~ /satisfact/i )) { + $out = trim(`(FOR /F \"skip=2 tokens=2 delims=,\" %P IN ('typeperf \"\\Process($process)\\% Processor Time\" -sc 1') DO \@echo %P) | find /V /I \"...\" 2> $_PluginTools_system->{devnull}`); + } + if ( ($out =~ /member/i) + || ($out =~ /error/i) + || (! $out =~ /successfully/i )) { + $cpu = 0; + } + $out =~ s/\"//g; + + if (! looks_like_number($out)){ + print STDERR "CPU usage [$out] is not numeric\n"; + $out = 0; + } + + $cpu = sprintf '%.2f', $out; + + $mem = (split /\s+/, trim(`$_PluginTools_system->{ps} | $_PluginTools_system->{grep} \"$process\"`))[-2]; + if (! empty($mem)) { + $mem =~ s/,/./; + } + else { + $mem = 0; + } + $runit = "K"; + + $instances = trim (head(`$_PluginTools_system->{ps} | $_PluginTools_system->{grep} "$process"| $_PluginTools_system->{wcl}`, 1)); + + } + elsif ($^O =~ /linux/i ){ + $cpu = trim(`$_PluginTools_system->{ps} | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | awk 'BEGIN {sum=0} {sum+=\$2} END{print sum}'`); + $mem = trim(`$_PluginTools_system->{ps} | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | awk 'BEGIN {sum=0} {sum+=\$1} END{print sum}'`); + $instances = trim(`$_PluginTools_system->{ps} | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | $_PluginTools_system->{wcl}`); + } + elsif ($^O =~ /hpux/ ) { + $cpu = trim(`UNIX95= ps -eo pcpu,comm | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | awk 'BEGIN {sum=0} {sum+=\$1} END{printf("\%.2f",sum)}'`); + $mem = trim(`UNIX95= ps -eo vsz,comm | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | awk 'BEGIN {sum=0} {sum+=(\$1*4096/1048576)} END{printf("\%.2f",sum)}'`); + $instances = trim(`$_PluginTools_system->{ps} | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | $_PluginTools_system->{wcl}`); + $runit = "MB"; + } + elsif ($^O =~ /solaris/i) { + $cpu = trim(`UNIX95= ps -eo pcpu,comm | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | awk 'BEGIN {sum=0} {sum+=\$1} END{printf("\%.2f",sum)}'`); + $mem = trim(`UNIX95= ps -eo pmem,comm | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | awk 'BEGIN {sum=0} {sum+=\$1} END{printf("\%.2f",sum)}'`); + $instances = trim(`$_PluginTools_system->{ps} | $_PluginTools_system->{grep} -w "$process" | $_PluginTools_system->{grep} -v grep | $_PluginTools_system->{wcl}`); + $runit = "%"; + } + elsif ($^O =~ /aix/i ) { + $cpu = trim(`ps -Ao comm,pcpu |grep $process | grep -v grep | awk 'BEGIN {sum=0} {sum+=\$2} END {print sum}'`); + $mem = trim(`ps au -A | grep $process | grep -v grep | awk 'BEGIN {sum=0} {sum+=\$4} END {print sum}'`); + $instances = trim(`ps -ef | grep "$process"|grep -v grep| wc -l`); + $runit = "MB"; + } + + # print + if (!looks_like_number($instances)){ + $instances = 0; + } + + print_module ($conf, { + name => "$mod_name", + type => "generic_proc", + desc => "Presence of $process ($instances instances)", + value => (($instances>0)?1:0), + }, $only_text_flag); + + if ($instances > 0) { + + print_module ($conf, { + name => "$mod_name CPU usage", + type => "generic_data", + desc => "CPU usage of $process ($instances instances)", + value => $cpu, + unit => $cunit + }, $only_text_flag); + + print_module ($conf, { + name => "$mod_name RAM usage", + type => "generic_data", + desc => "RAM usage of $process ($instances instances)", + value => $mem, + unit => $runit + }, $only_text_flag); + } + + return { + cpu => $cpu, + mem => $mem, + instances => $instances + }; +} + +######################################################################################### +# Check api availability +######################################################################################### +sub api_available { + my ($conf, $apidata) = @_; + my ($api_url, $api_pass, $api_user, $api_user_pass) = ('','','','',''); + if (ref $apidata eq "ARRAY") { + ($api_url, $api_pass, $api_user, $api_user_pass) = @{$apidata}; + } + + $api_url = $conf->{'api_url'} unless empty($api_url); + $api_pass = $conf->{'api_pass'} unless empty($api_pass); + $api_user = $conf->{'api_user'} unless empty($api_user); + $api_user_pass = $conf->{'api_user_pass'} unless empty($api_user_pass); + + my $op = "get"; + my $op2 = "test"; + + my $call = $api_url . "?"; + $call .= "op=" . $op . "&op2=" . $op2; + $call .= "&apipass=" . $api_pass . "&user=" . $api_user . "&pass=" . $api_user_pass; + + my $rs = call_url($conf, $call); + + if (ref $rs eq "HASH") { + return { + rs => 1, + error => $rs->{error} + }; + } + else { + return { + rs => (empty($rs)?1:0), + error => (empty($rs)?"Empty response.":undef), + id => (empty($rs)?undef:trim($rs)) + } + } + +} + +######################################################################################### +# Pandora API create custom field +######################################################################################### +sub api_create_custom_field { + my ($conf, $apidata, $name, $display, $password) = @_; + my ($api_url, $api_pass, $api_user, $api_user_pass) = ('','','','',''); + if (ref $apidata eq "ARRAY") { + ($api_url, $api_pass, $api_user, $api_user_pass) = @{$apidata}; + } + + $api_url = $conf->{'api_url'} unless empty($api_url); + $api_pass = $conf->{'api_pass'} unless empty($api_pass); + $api_user = $conf->{'api_user'} unless empty($api_user); + $api_user_pass = $conf->{'api_user_pass'} unless empty($api_user_pass); + + + + $display = 0 unless defined ($display); + $password = 0 unless defined ($password); + + my $call; + + # 1st try to get previous custom field id + my $op = "get"; + my $op2 = "custom_field"; + + $call = $api_url . "?"; + $call .= "op=" . $op . "&op2=" . $op2; + + # Extra arguments + if (!empty($name)) { + $call .= "&other=" . $name; + } + if (!empty($display)) { + $call .= "%7C" . $display; + } + if (!empty($password)) { + $call .= "%7C" . $password; + } + + $call .= "&other_mode=url_encode_separator=%7C&"; + $call .= "apipass=" . $api_pass . "&user=" . $api_user . "&pass=" . $api_user_pass; + + my $rs = call_url($conf, "$call"); + + if (ref($rs) ne "HASH") { + $rs = trim($rs); + } + else { + # Failed to reach API, return with error + return { + rs => 1, + error => 'Failed to reach API' + }; + } + + if (empty($rs) || ($rs !~ /^\d+$/ || $rs eq "0")) { + # Custom field is not defined + + # 2nd create only if the custom field does not exist + $op = "set"; + $op2 = "create_custom_field"; + + + + $call = $api_url . "?"; + $call .= "op=" . $op . "&op2=" . $op2; + $call .= "&other=" . $name . "%7C" . $display . "%7C" . $password; + $call .= "&other_mode=url_encode_separator=%7C&"; + $call .= "apipass=" . $api_pass . "&user=" . $api_user . "&pass=" . $api_user_pass; + + $rs = call_url($conf, "$call"); + } + + if (ref($rs) ne "HASH") { + $rs = trim($rs); + } + else { + # Failed to reach API, return with error + return { + rs => 1, + error => 'Failed to reach API while creating custom field [' . $name . ']' + }; + } + + if (empty($rs) || ($rs !~ /^\d+$/ || $rs eq "0")) { + return { + rs => 1, + error => 'Failed while creating custom field [' . $name . '] => [' . $rs . ']' + }; + } + + # Return the valid id + return { + rs => 0, + id => $rs + }; +} + +######################################################################################### +# Pandora API create tag +######################################################################################### +sub api_create_tag { + my ($conf, $apidata, $tag, $desc, $url, $email) = @_; + my ($api_url, $api_pass, $api_user, $api_user_pass) = ('','','','',''); + if (ref $apidata eq "ARRAY") { + ($api_url, $api_pass, $api_user, $api_user_pass) = @{$apidata}; + } + + $api_url = $conf->{'api_url'} unless empty($api_url); + $api_pass = $conf->{'api_pass'} unless empty($api_pass); + $api_user = $conf->{'api_user'} unless empty($api_user); + $api_user_pass = $conf->{'api_user_pass'} unless empty($api_user_pass); + + my $op = "set"; + my $op2 = "create_tag"; + $desc = 'Created by PluginTools' unless defined $desc; + + my $call = $api_url . "?"; + $call .= "op=" . $op . "&op2=" . $op2; + $call .= "&other="; + if (!empty($tag)) { + $call .= $tag . "%7C"; + } + if (!empty($desc)) { + $call .= $desc . "%7C"; + } + if (!empty($url)) { + $call .= $url . "%7C"; + } + if (!empty($email)) { + $call .= $email; + } + + $call .= "&other_mode=url_encode_separator=%7C&"; + $call .= "apipass=" . $api_pass . "&user=" . $api_user . "&pass=" . $api_user_pass; + + my $rs = call_url($conf, $call); + + if (ref $rs eq "HASH") { + return { + rs => 1, + error => $rs->{error} + }; + } + else { + return { + rs => (empty($rs)?1:0), + error => (empty($rs)?"Empty response.":undef), + id => (empty($rs)?undef:trim($rs)) + } + } +} + +######################################################################################### +# Pandora API create group +######################################################################################### +sub api_create_group { + my ($conf, $apidata, $group_name, $group_config, $email) = @_; + my ($api_url, $api_pass, $api_user, $api_user_pass); + if (ref $apidata eq "ARRAY") { + ($api_url, $api_pass, $api_user, $api_user_pass) = @{$apidata}; + } + + + if(empty ($group_config->{icon})) { + return { + rs => 1, + error => "No icon set" + }; + } + # Group config: + + my $other = ''; + $other .= $group_config->{icon} . '%7C&'; + $other .= (empty($group_config->{parent})?'':$group_config->{parent}.'%7C&'); + $other .= (empty($group_config->{desc})?'':$group_config->{desc}.'%7C&'); + $other .= (empty($group_config->{propagate})?'':$group_config->{propagate}.'%7C&'); + $other .= (empty($group_config->{disabled})?'':$group_config->{disabled}.'%7C&'); + $other .= (empty($group_config->{custom_id})?'':$group_config->{custom_id}.'%7C&'); + $other .= (empty($group_config->{contact})?'':$group_config->{contact}.'%7C&'); + $other .= (empty($group_config->{other})?'':$group_config->{other}.'%7C&'); + + $api_url = $conf->{'api_url'} unless defined $api_url; + $api_pass = $conf->{'api_pass'} unless defined $api_pass; + $api_user = $conf->{'api_user'} unless defined $api_user; + $api_user_pass = $conf->{'api_user_pass'} unless defined $api_user_pass; + + my $op = "set"; + my $op2 = "create_group"; + + my $call = $api_url . "?"; + $call .= "op=" . $op . "&op2=" . $op2; + $call .= "&id=" . $group_name; + $call .= "&other=" . $other . "&other_mode=url_encode_separator=%7C&"; + $call .= "apipass=" . $api_pass . "&user=" . $api_user . "&pass=" . $api_user_pass; + + my $rs = call_url($conf, $call); + + if (ref $rs eq "HASH") { + return { + rs => 1, + error => $rs->{error} + }; + } + else { + return { + rs => (empty($rs)?1:0), + error => (empty($rs)?"Empty response.":undef), + id => (empty($rs)?undef:trim($rs)) + } + } +} + +################################################################################ +# SNMP walk value +# will return the snmpwalk output +# +# $community (v1,2,2c) +# -> means $context (v3) +# +# Configuration hash +# +# $snmp{version} +# $snmp{community} +# $snmp{host} +# $snmp{oid} +# $snmp{port} +# $snmp{securityName} +# $snmp{context +# $snmp{securityLevel} +# $snmp{authProtocol} +# $snmp{authKey} +# $snmp{privProtocol} +# $snmp{privKey} +################################################################################ +sub snmp_walk { + my $snmp = shift; + my $cmd; + my $timeout = 2; + + if (!empty($snmp->{timeout})) { + $timeout = $snmp->{timeout}; + } + + if ( defined ($snmp->{version} ) + && (($snmp->{version} eq "1") + || ($snmp->{version} eq "2") + || ($snmp->{version} eq "2c"))) { + + if (defined $snmp->{port}){ + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -c $snmp->{community} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -c $snmp->{community} $snmp->{host} $snmp->{oid}"; + } + + } + elsif ( defined ($snmp->{version} ) + && ($snmp->{version} eq "3") ) { # SNMP v3 + # Authentication required + + # $securityLevel = (noAuthNoPriv|authNoPriv|authPriv); + + # unauthenticated request + # Ex. snmpwalk -t $timeout -On -v 3 -n "" -u noAuthUser -l noAuthNoPriv test.net-snmp.org sysUpTime + + # authenticated request + # Ex. snmpwalk -t $timeout -On -v 3 -n "" -u MD5User -a MD5 -A "The Net-SNMP Demo Password" -l authNoPriv test.net-snmp.org sysUpTime + + # authenticated and encrypted request + # Ex. snmpwalk -t $timeout -On -v 3 -n "" -u MD5DESUser -a MD5 -A "The Net-SNMP Demo Password" -x DES -X "The Net-SNMP Demo Password" -l authPriv test.net-snmp.org system + + if ($snmp->{securityLevel} =~ /^noAuthNoPriv$/i){ + # Unauthenticated request + + if (defined $snmp->{port}){ + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -l $snmp->{securityLevel} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -l $snmp->{securityLevel} $snmp->{host} $snmp->{oid}"; + } + } + elsif ($snmp->{securityLevel} =~ /^authNoPriv$/i){ + # Authenticated request + + if (defined $snmp->{port}){ + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -a $snmp->{authProtocol} -A $snmp->{authKey} -l $snmp->{securityLevel} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -a $snmp->{authProtocol} -A $snmp->{authKey} -l $snmp->{securityLevel} $snmp->{host} $snmp->{oid}"; + } + } + elsif ($snmp->{securityLevel} =~ /^authPriv$/i){ + # Authenticated and encrypted request + + if (defined $snmp->{port}){ + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -l $snmp->{securityLevel} -a $snmp->{authProtocol} -A $snmp->{authKey} -x $snmp->{privProtocol} -X $snmp->{privKey} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpwalk -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -l $snmp->{securityLevel} -a $snmp->{authProtocol} -A $snmp->{authKey} -x $snmp->{privProtocol} -X $snmp->{privKey} $snmp->{host} $snmp->{oid}"; + } + } + } + else { + return { + error => "Only SNMP 1 2 2c and 3 are supported." + } + } + #print STDERR "Launching $cmd\n"; + my $result = `$cmd 2>/dev/null`; + if ($? != 0){ + return { + error => "No response from " . trim($snmp->{host}) + }; + } + return $result; + +} + +################################################################################ +# SNMP get value +# will return a hash with the data and datatype +# +# $community (v1,2,2c) +# -> means $context (v3) +# +# Configuration hash +# +# $snmp{version} +# $snmp{community} +# $snmp{host} +# $snmp{oid} +# $snmp{port} +# $snmp{securityName} +# $snmp{context +# $snmp{securityLevel} +# $snmp{authProtocol} +# $snmp{authKey} +# $snmp{privProtocol} +# $snmp{privKey} +################################################################################ +sub snmp_get { + my $snmp = shift; + my $cmd; + my $timeout = 2; + my $retries = 1; + + if (!empty($snmp->{retries})) { + $retries = $snmp->{retries}; + } + + if (!empty($snmp->{timeout})) { + $timeout = $snmp->{timeout}; + } + + if ( defined ($snmp->{version} ) + && (($snmp->{version} eq "1") + || ($snmp->{version} eq "2") + || ($snmp->{version} eq "2c"))) { + + if (defined $snmp->{port}){ + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -c $snmp->{community} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -c $snmp->{community} $snmp->{host} $snmp->{oid}"; + } + + } + elsif ( defined ($snmp->{version} ) + && ($snmp->{version} eq "3") ) { # SNMP v3 + # Authentication required + + # $securityLevel = (noAuthNoPriv|authNoPriv|authPriv); + + # unauthenticated request + # Ex. snmpget -r $retries -t $timeout -On -v 3 -n "" -u noAuthUser -l noAuthNoPriv test.net-snmp.org sysUpTime + + # authenticated request + # Ex. snmpget -r $retries -t $timeout -On -v 3 -n "" -u MD5User -a MD5 -A "The Net-SNMP Demo Password" -l authNoPriv test.net-snmp.org sysUpTime + + # authenticated and encrypted request + # Ex. snmpget -r $retries -t $timeout -On -v 3 -n "" -u MD5DESUser -a MD5 -A "The Net-SNMP Demo Password" -x DES -X "The Net-SNMP Demo Password" -l authPriv test.net-snmp.org system + + if ($snmp->{securityLevel} =~ /^noAuthNoPriv$/i){ + # Unauthenticated request + + if (defined $snmp->{port}){ + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -l $snmp->{securityLevel} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -l $snmp->{securityLevel} $snmp->{host} $snmp->{oid}"; + } + } + elsif ($snmp->{securityLevel} =~ /^authNoPriv$/i){ + # Authenticated request + + if (defined $snmp->{port}){ + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -a $snmp->{authProtocol} -A $snmp->{authKey} -l $snmp->{securityLevel} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -a $snmp->{authProtocol} -A $snmp->{authKey} -l $snmp->{securityLevel} $snmp->{host} $snmp->{oid}"; + } + } + elsif ($snmp->{securityLevel} =~ /^authPriv$/i){ + # Authenticated and encrypted request + + if (defined $snmp->{port}){ + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -l $snmp->{securityLevel} -a $snmp->{authProtocol} -A $snmp->{authKey} -x $snmp->{privProtocol} -X $snmp->{privKey} $snmp->{host}:$snmp->{port} $snmp->{oid}"; + } + else { + $cmd = "snmpget -r $retries -t $timeout -On -v $snmp->{version} -n \"$snmp->{context}\" -u $snmp->{securityName} -l $snmp->{securityLevel} -a $snmp->{authProtocol} -A $snmp->{authKey} -x $snmp->{privProtocol} -X $snmp->{privKey} $snmp->{host} $snmp->{oid}"; + } + } + } + else { + return { + error => "Only SNMP 1 2 2c and 3 are supported." + } + } + #print STDERR "Launched: $cmd\n"; + my $result = `$cmd`; + if ($? != 0) { + return { + error => "No response from " . trim($snmp->{host}) + }; + } + return snmp_data_switcher((split /=\ /, $result)[1]); + +} + +################################################################################ +# returns a hash with [type->datatype][data->value] +################################################################################ +sub snmp_data_switcher { + my @st_data = split /\: /, $_[0]; + my %data; + + my $pure_data = trim($st_data[1]) or undef; + $data{data} = $pure_data; + + if ( uc($st_data[0]) eq uc("INTEGER")) { + $data{type} = "generic_data"; + } + elsif (uc($st_data[0]) eq uc("Integer32")) { + $data{type} = "generic_data"; + } + elsif (uc($st_data[0]) eq uc("octect string")) { + $data{type} = "generic_data"; + } + elsif (uc($st_data[0]) eq uc("bits")) { + $data{type} = "generic_data"; + } + elsif (uc($st_data[0]) eq uc("object identifier")) { + $data{type} = "generic_data_string"; + } + elsif (uc($st_data[0]) eq uc("IpAddress")) { + $data{type} = "generic_data_string"; + } + elsif (uc($st_data[0]) eq uc("Counter")) { + $data{type} = "generic_data_inc"; + } + elsif (uc($st_data[0]) eq uc("Counter32")) { + $data{type} = "generic_data_inc"; + } + elsif (uc($st_data[0]) eq uc("Gauge")) { + $data{type} = "generic_data"; + } + elsif (uc($st_data[0]) eq uc("Unsigned32")) { + $data{type} = "generic_data_inc"; + } + elsif (uc($st_data[0]) eq uc("TimeTicks")) { + $data{type} = "generic_data_string"; + } + elsif (uc($st_data[0]) eq uc("Opaque")) { + $data{type} = "generic_data_string"; + } + elsif (uc($st_data[0]) eq uc("Counter64")) { + $data{type} = "generic_data_inc"; + } + elsif (uc($st_data[0]) eq uc("UInteger32")) { + $data{type} = "generic_data"; + } + elsif (uc($st_data[0]) eq uc("BIT STRING")) { + $data{type} = "generic_data_string"; + } + elsif (uc($st_data[0]) eq uc("STRING")) { + $data{type} = "generic_data_string"; + } + else { + $data{type} = "generic_data_string"; + } + + if ($data{type} eq "generic_data"){ + ($data{data} = $pure_data) =~ s/\D*//g; + } + + return \%data; +} + +################################################################################ +# returns a encrypted string +# $1 => string to be encrypted +# $2 => salt to use (default default_salt) +################################################################################ +sub encrypt { + my ($str,$salt,$iv) = @_; + + return undef unless (load_perl_modules('Crypt::CBC', 'Crypt::OpenSSL::AES','Digest::SHA') == 1); + + if (empty($salt)) { + $salt = "default_salt"; + } + + my $processed_salt = substr(Digest::SHA::hmac_sha256_base64($salt,''), 0, 16); + + if (empty($iv)) { + $iv = "0000000000000000"; + } + + my $cipher = Crypt::CBC->new({ + 'key' => $processed_salt, + 'cipher' => 'Crypt::OpenSSL::AES', + 'iv' => $iv, + 'literal_key' => 1, + 'header' => 'none', + 'keysize' => 128 / 8 + }); + + my $encrypted = encode_base64($cipher->encrypt($str)); + + return $encrypted; + +} + +################################################################################ +# returns a decrypted string from an encrypted one +# $1 => string to be decrypted +# $2 => salt to use (default default_salt) +################################################################################ +sub decrypt { + my ($encrypted_str,$salt,$iv) = @_; + + return undef unless (load_perl_modules('Crypt::CBC', 'Crypt::OpenSSL::AES','Digest::SHA') == 1); + + if (empty($salt)) { + $salt = "default_salt"; + } + + my $processed_salt = substr(Digest::SHA::hmac_sha256_base64($salt,''), 0, 16); + + if (empty($iv)) { + $iv = "0000000000000000"; + } + + my $cipher = Crypt::CBC->new({ + 'key' => $processed_salt, + 'cipher' => 'Crypt::OpenSSL::AES', + 'iv' => $iv, + 'literal_key' => 1, + 'header' => 'none', + 'keysize' => 128 / 8 + }); + + my $decrypted = $cipher->decrypt(decode_base64($encrypted_str)); + + return $decrypted; + +} + +################################################################################ +# Return unix timestamp from a given string +################################################################################ +sub get_unix_time { + my ($str_time,$separator_dates,$separator_hours) = @_; + + if (empty($separator_dates)) { + $separator_dates = "\/"; + } + + if (empty($separator_hours)) { + $separator_hours = ":"; + } + + + use Time::Local; + my ($mday,$mon,$year,$hour,$min,$sec) = split(/[\s$separator_dates$separator_hours]+/, $str_time); + my $time = timelocal($sec,$min,$hour,$mday,$mon-1,$year); + return $time; +} + +################################################################################ +# Load required modules. +################################################################################ +sub load_perl_modules { + my @missing_modules = (); + foreach( @_ ) { + eval "require $_"; + push @missing_modules, $_ if $@; + } + if( @missing_modules ) { + print "Missing perl modules: @missing_modules\n"; + return 0; + } + return 1; +} + + + +1;