This file contains hidden or 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
FROM centos:7 | |
COPY memconsumer /bin/memconsumer | |
ENTRYPOINT memconsumer |
This file contains hidden or 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
diff --git a/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb b/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb | |
index 0d98e25a..a63299fb 100644 | |
--- a/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb | |
+++ b/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb | |
@@ -124,7 +124,7 @@ class ManageIQ::Providers::Openstack::Inventory::Collector::TargetCollection < M | |
def memoized_get_tenant(tenant_id) | |
return nil if tenant_id.blank? | |
@tenant_memo ||= Hash.new do |h, key| | |
- h[key] = safe_get { identity_service.tenants.find_by_id(key) } | |
+ h[key] = safe_get { identity_service.respond_to?(:projects) ? identity_service.projects_get_by_id(key) : identity_service.tenants.find_by_id(key) } |
This file contains hidden or 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
diff --git a/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb b/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb | |
index d7123942..61274aad 100644 | |
--- a/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb | |
+++ b/app/models/manageiq/providers/openstack/inventory/collector/target_collection.rb | |
@@ -124,7 +124,7 @@ class ManageIQ::Providers::Openstack::Inventory::Collector::TargetCollection < M | |
def memoized_get_tenant(tenant_id) | |
return nil if tenant_id.blank? | |
@tenant_memo ||= Hash.new do |h, key| | |
- h[key] = safe_get { identity_service.tenants.find_by_id(key) } | |
+ h[key] = safe_get { identity_service.respond_to?(:tenants) ? identity_service.tenants.find_by_id(key) : identity_service.projects.find_by_id(key) } |
This file contains hidden or 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
I, [2017-12-04T11:01:31.508201 #8333] INFO -- : Started POST "/vm_cloud/x_button?pressed=instance_miq_request_new" for 127.0.0.1 at 2017-12-04 11:01:31 +0100 | |
I, [2017-12-04T11:01:31.530356 #8333] INFO -- : Processing by VmCloudController#x_button as JS | |
I, [2017-12-04T11:01:31.530488 #8333] INFO -- : Parameters: {"pressed"=>"instance_miq_request_new"} | |
D, [2017-12-04T11:01:31.532535 #8333] DEBUG -- : PostgreSQLAdapter#log_after_checkout, connection_pool: size: 10, connections: 6, in use: 2, waiting_in_queue: 0 | |
D, [2017-12-04T11:01:31.533334 #8333] DEBUG -- : User Load (0.3ms) SELECT "users".* FROM "users" WHERE ("users"."id" BETWEEN $1 AND $2) AND "users"."userid" = $3 LIMIT $4 [["id", 0], ["id", 999999999999], ["userid", "admin"], ["LIMIT", 1]] | |
D, [2017-12-04T11:01:31.533706 #8333] DEBUG -- : User Inst Including Associations (0.1ms - 1rows) | |
D, [2017-12-04T11:01:31.535303 #8333] DEBUG -- : MiqGroup Load (0.3ms) SELECT "miq_groups".* FROM "miq_groups" WHERE "miq_groups"."id" = $1 LIMIT $2 [["id" |
This file contains hidden or 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
<?php | |
$db_host='localhost'; | |
$db_database=''; | |
$db_username=''; | |
$db_password=''; | |
//casova zona | |
date_default_timezone_set('Europe/Prague'); |
This file contains hidden or 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
diff --git a/app/models/manageiq/providers/openstack/cloud_manager/template.rb b/app/models/manageiq/providers/openstack/cloud_manager/template.rb | |
index 0a73a8f..f203c50 100644 | |
--- a/app/models/manageiq/providers/openstack/cloud_manager/template.rb | |
+++ b/app/models/manageiq/providers/openstack/cloud_manager/template.rb | |
@@ -75,7 +75,7 @@ class ManageIQ::Providers::Openstack::CloudManager::Template < ManageIQ::Provide | |
def self.raw_create_image(ext_management_system, create_options) | |
ext_management_system.with_provider_connection(:service => 'Compute') do |service| | |
- service.images.create(create_options) | |
+ service.create_image(create_options) |
This file contains hidden or 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 refresh_openstack_services(ssu) | |
services = ssu.shell_exec("systemctl -la --plain | awk '/openstack/ {gsub(/ +/, \" \"); gsub(\".service\", \":\"); gsub(\"not-found\",\"(disabled)\"); split($0,s,\" \"); print s[1],s[3],s[2]}'") | |
categories = ssu.shell_exec("systemctl -la --plain | awk '/openstack/ {gsub(/\\./, \"-\"); split($0,s,\"-\"); print \"==\", s[2], \"service ==\"}' | uniq") | |
openstack_status = (services.split("\n") | categories.split("\n")).sort{|a,b| b.gsub(/([^a-z]|openstack\-|service)/, '') <=> a.gsub(/([^a-z]|openstack\-|service)/, '')}.join("\n") | |
services = MiqLinux::Utils.parse_openstack_status(openstack_status) | |
binding.pry | |
self.host_service_group_openstacks = services.map do |service| | |
# find OpenstackHostServiceGroup records by host and name and initialize if not found | |
host_service_group_openstacks.where(:name => service['name']) | |
.first_or_initialize.tap do |host_service_group_openstack| |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -e | |
echo "Getting Dehydrated letsencrypt tool..." | |
echo "[1] getting dehydrated" | |
curl -o /usr/local/bin/dehydrated https://raw.githubusercontent.com/lukas2511/dehydrated/master/dehydrated | |
chmod +x /usr/local/bin/dehydrated |
This file contains hidden or 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
add_flash(_("%{model} \"%{name}\" created") % { | |
:model => ui_lookup(:table => 'host_aggregate'), | |
:name => host_aggregate_name | |
}) |
This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# Modified from https://gist.github.com/mcornea/68fa6b75dfc6c7f870c8a2d936752f9a | |
# | |
# Description: create two domains with admin and non-admin users for keystone v3 OSP setup | |
# | |
# Requirements: deployed OSP with 1 controller, existing keystone v3 endpoint | |
# https://bugzilla.redhat.com/show_bug.cgi?id=1228542#c13 | |
# |