This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ManageIQ::Providers::Azure::Inventory::Parser::NetworkManager < ManageIQ::Providers::Azure::Inventory::Parser | |
def parse | |
log_header = "Collecting data for EMS : [#{collector.manager.name}] id: [#{collector.manager.id}]" | |
@data_index = {} | |
_log.info("#{log_header}...") | |
security_groups | |
cloud_networks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <openssl/evp.h> | |
#include <openssl/err.h> | |
void print_ssl_error_stack(void) | |
{ | |
int err; | |
while ((err = ERR_get_error()) != 0) { | |
fprintf(stderr, "ERR lib=%d reason=%d err=%s\n", ERR_GET_LIB(err), ERR_GET_REASON(err), ERR_reason_error_string(err)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
liburl "net/url" | |
"github.com/vmware/govmomi" | |
"github.com/vmware/govmomi/property" | |
"github.com/vmware/govmomi/session" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __process__ = process | |
var printFinal = function(string) { | |
process.stdout.write('' + string, function() { | |
__process__.exit(0) | |
}); | |
} | |
printFinal("ok") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(program, execJS) { execJS(program) })(function(global, process, module, exports, require, console, setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, clearImmediate) { // https://developer.mozilla.org/en/JavaScript/Reference/global_objects/array/foreach | |
if (!Array.prototype.forEach) | |
{ | |
Array.prototype.forEach = function(fun /*, thisp */) | |
{ | |
"use strict"; | |
if (this === void 0 || this === null) | |
throw new TypeError(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "execjs" | |
class ExecJS::ExternalRuntime | |
def exec_runtime(filename) | |
r, w = IO.pipe | |
pid = Kernel.spawn("#{binary} #{filename}", :out => w, :err=>[:child, :out]) | |
puts "#{binary} PID: #{pid}" | |
w.close | |
Process.wait(pid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.mozilla.org/en/JavaScript/Reference/global_objects/array/foreach | |
if (!Array.prototype.forEach) | |
{ | |
Array.prototype.forEach = function(fun /*, thisp */) | |
{ | |
"use strict"; | |
if (this === void 0 || this === null) | |
throw new TypeError(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rbvmomi" | |
vim = RbVmomi::VIM.connect( | |
host: "127.0.0.1", | |
port: "8989", | |
insecure: true, | |
username: "root", | |
password: "vmware" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def load_system_schedules | |
+ _log.info("Loading system scheduled...") | |
schedules_for_all_roles | |
schedules_for_scheduler_role | |
schedules_for_database_operations_role | |
@@ -214,7 +215,9 @@ class MiqScheduleWorker::Runner < MiqWorker::Runner | |
:first_at => time_at | |
) { enqueue(:storage_scan_timer) } | |
+ _log.info("scheduling ems_refresh...") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schedule_settings_for_ems_refresh = ExtManagementSystem.supported_subclasses.each.with_object({}) do |klass, hash| | |
next unless klass.ems_type | |
every = ::Settings.ems_refresh[klass.ems_type].try(:refresh_interval) || ::Settings.ems_refresh.refresh_interval | |
every = every.respond_to?(:to_i_with_method) ? every.to_i_with_method : every.to_i | |
hash[klass] = every unless every == 0 | |
end |
NewerOlder