Skip to content

Instantly share code, notes, and snippets.

#!/bin/env python
import json
import requests
import sys
from requests.auth import HTTPBasicAuth
from pprint import pprint
def fetch_metadata(fl):
with open(fl, "r") as content:
data = json.load(content)
#!/bin/env python
import json
import requests
import sys
from requests.auth import HTTPBasicAuth
from pprint import pprint
def fetch_metadata(fl):
with open(fl, "r") as content:
data = json.load(content)
@parthaa
parthaa / export.sh
Created October 19, 2020 19:54
export script
#!/bin/bash
shopt -s expand_aliases
set -e
set -x
EXPORT_ORG="export-$RANDOM"
PRODUCT="prod"
REPO1="katello"
REPO1_URL="https://fedorapeople.org/groups/katello/releases/yum/3.8/katello/el7/x86_64/"
REPO2="misc"
REPO2_URL="https://partha.fedorapeople.org/test-repos/pteradactly-with-dino-errata/"
@parthaa
parthaa / import.sh
Created October 19, 2020 19:53
import script
#!/bin/bash
shopt -s expand_aliases
set -e
set -x
IMPORT_ORG="import-$RANDOM"
PRODUCT="prod"
REPO1="katello"
REPO2="misc"
CONTENT_VIEW="view"

What does a publish do

  1. Creates a cvv

  2. Creates a cv history

  3. Fetches the source repositories belonging to the content view

  4. Actions::Katello::ContentView::AddToEnvironment

    1. Adds cvv to the library environment

  5. Actions::Katello::ContentViewVersion::CreateRepos

    1. Creates the repositories in the cvv

    2. Provides a repository mapping

SELECT
HOSTS.ID AS T0_R0
, HOSTS.NAME AS T0_R1
, HOSTS.LAST_COMPILE AS T0_R2
, HOSTS.LAST_REPORT AS T0_R3
, HOSTS.UPDATED_AT AS T0_R4
, HOSTS.CREATED_AT AS T0_R5
, HOSTS.ROOT_PASS AS T0_R6
, HOSTS.ARCHITECTURE_ID AS T0_R7
, HOSTS.OPERATINGSYSTEM_ID AS T0_R8
# vagrant ssh into the dev station
$ vagrant ssh <machine>
#get the ip addr
$ ip addr
#get the host name
$ hostname
# Definition for singly-linked list.
class ListNode
attr_accessor :val, :next
def initialize(val = 0, _next = nil)
@val = val
@next = _next
end
end
# @param {ListNode} l1
# @param {ListNode} l2
def possible_tour_point(gas_stations):
for i in range(len(gas_stations)):
if check_tour(gas_stations, i):
return i
return -1
def check_tour(gas_stations, start_index):
liters_in_tank = 0
visited = []
index = start_index
diff --git a/ansible/configs/satellite-vm/pre_software.yml b/ansible/configs/satellite-vm/pre_software.yml
index f32b9ba9..7447fd05 100644
--- a/ansible/configs/satellite-vm/pre_software.yml
+++ b/ansible/configs/satellite-vm/pre_software.yml
@@ -50,9 +50,9 @@
vars:
rhel_repos: "{{ rhel7_repos + satellite_repos }}"
repo_method: "{{ satellite_host_repo_method }}"
- satellite_org: "{{ satellite_host_repo_registration.org }}"
- satellite_activationkey: "{{ satellite_host_repo_registration.activationkey }}"