Skip to content

Instantly share code, notes, and snippets.

View moolitayer's full-sized avatar

Mooli Tayer moolitayer

View GitHub Profile
***********
* content *
***********
1.) data parsed by refresh_parser
2.) kubernetes pods
**************************************
* 1.) data parsed by refresh_parser: *
**************************************
---
- MiqPolicySet:
name: 0bf2e43a-1211-11e6-aa9c-02424d459b45
description: OpenSCAP profile
set_type: MiqPolicySet
guid: 0bf2e43a-1211-11e6-aa9c-02424d459b45
read_only:
set_data:
mode: control
owner_type:
require 'kubeclient'
def toggle_pod(client)
hash = {
:kind => "Pod",
:metadata => {
:name => "nginx",
:namespace => "default",
:labels => "nginx",
:app => "nginx"
#########################################
/api/v1/
#########################################
{
"kind": "APIResourceList",
"groupVersion": "v1",
"resources": [
{
"name": "bindings",
"namespaced": true,
Adding a datawarehouse manager:
prov = ManageIQ::Providers::Hawkular::DatawarehouseManager.new(
:name => 'centos7-6',
:zone => Zone.first,
:connection_configurations => [{:endpoint => {:role => :default,
:hostname => 'mtayer-centos7-6.eng.lab.tlv.redhat.com',
:port => "8080"},
:authentication => {:authtype => :default,
:password => "password",
:userid => "jdoe"}}])
[
{
"eventType": "ALERT",
"tenantId": "_system",
"id": "auto-resolving-trigger-1482169701624-7fafcc1e-c7e6-4b2c-ba98-8fe43829833b",
"ctime": 1482169701624,
"dataSource": "_none_",
"dataId": "auto-resolving-trigger",
"category": "ALERT",
"text": "Auto resolving trigger example",
# TODO: This test can be used after https://github.com/ManageIQ/manageiq/pull/13233 merges
context "alerts subcollection" do
let(:infra_provider) { FactoryGirl.create(:ems_infra) }
let(:vm) { FactoryGirl.create(:vm) }
before(:each) {
api_basic_authorize collection_action_identifier(:providers, :read, :get)
}
it "get all alertss for a provider" do
alert_status2
# From ManageIQ root:
printf ":workers:\n :worker_base:\n :event_catcher:\n :event_catcher_hawkular_datawarehouse:\n :poll: 10.seconds\n">> config/settings.local.yml
[----] I, [2017-03-14T08:10:36.359525 #773:2115e84] INFO -- : Started GET "/api/alerts?expand=resources" for 127.0.0.1 at 2017-03-14 08:10:36 +0200
[----] I, [2017-03-14T08:10:36.388548 #773:2115e84] INFO -- : Processing by Api::AlertsController#index as JSON
[----] I, [2017-03-14T08:10:36.388645 #773:2115e84] INFO -- : Parameters: {"expand"=>"resources"}
[----] D, [2017-03-14T08:10:36.390332 #773:2115e84] DEBUG -- : PostgreSQLAdapter#log_after_checkout, connection_pool: size: 8, connections: 3, in use: 3, waiting_in_queue: 0
[----] D, [2017-03-14T08:10:36.391437 #773:2115e84] DEBUG -- : User Load (0.7ms) SELECT "users".* FROM "users" WHERE ("users"."id" BETWEEN $1 AND $2) AND "users"."userid" = $3 LIMIT $4 [["id", 1000000000000], ["id", 1999999999999], ["userid", "admin"], ["LIMIT", 1]]
[----] D, [2017-03-14T08:10:36.391800 #773:2115e84] DEBUG -- : User Inst Including Associations (0.1ms - 1rows)
[----] D, [2017-03-14T08:10:36.416046 #722:d27120] DEBUG -- :  (
$ cat /tmp/container-status.json
{
"name": "registry",
"state": {},
"lastState": {
"terminated": {
"exitCode": 137,
"reason": "Error",
"startedAt": "2017-02-08T11:31:45Z",