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 --platform=linux/amd64 alpine:latest | |
RUN apk add --no-cache tinyproxy | |
# add config (we'll copy local tinyproxy.conf) | |
COPY tinyproxy.conf /etc/tinyproxy/tinyproxy.conf | |
EXPOSE 8888 | |
CMD ["tinyproxy", "-d", "-c", "/etc/tinyproxy/tinyproxy.conf"] |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |
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
# Attach disk | |
$ virsh attach-disk test-infra-cluster-b8af966c-worker-1 /mnt/data/disk1.img vdb --config | |
# Increase cpu | |
$ virsh setvcpus test-infra-cluster-b8af966c-worker-1 6 --config --maximum | |
# Hotplug cpu | |
$ virsh setvcpus test-infra-clu^Cer-b8af966c-worker-0 6 --live | |
# Hotplug memory |
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
class SAPAuth(AuthBase): | |
""" | |
SAPAuth is class which implements the SAP launchpad authentication. | |
""" | |
sso_url = 'https://accounts.sap.com/saml2/idp/sso' | |
def get_next_url(self, text): | |
return ET.fromstring(text, parser=etree.HTMLParser()).find(".//body//form[@method='post']").attrib['action'] |
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
import json | |
import os | |
import requests | |
from requests_sap import SAPAuth | |
r = requests.get( | |
"https://launchpad.support.sap.com/services/odata/svt/swdcuisrv/ObjectSet('0030000000103162022')", | |
auth=SAPAuth(username=os.environ['LP_USERNAME'], password=os.environ['LP_PASSWORD']), | |
headers={'Accept': 'application/json'} |
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 suds.client import Client | |
from suds.transport.http import HttpAuthenticated, HttpTransport | |
import http.client | |
import socket | |
import urllib.request | |
class LocalSocketHttpConnection(http.client.HTTPConnection): | |
def __init__(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, |
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
apiVersion: management.k4e.io/v1alpha1 | |
kind: EdgeDeployment | |
metadata: | |
name: nginx | |
spec: | |
deviceSelector: | |
matchLabels: | |
device: local | |
type: pod | |
pod: |
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
class FilterModule(object): | |
def filters(self): | |
return { | |
'get_first_equalto': self.get_first_equalto, | |
} | |
def get_first_equalto(self, var, attr, val): | |
for x in var: | |
if x[attr] == val: | |
return x |
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
$ omachace ~/workspace $ ansible-playbook -v manageiq.yml | |
Using /home/omachace/.ansible.cfg as config file | |
PLAY [Deploy ManageIQ to oVirt engine] ***************************************** | |
TASK [ovirt-manageiq : Download the OVA image of ManageIQ] ********************* | |
changed: [example.com] => {"changed": true, "checksum_dest": null, "checksum_src": "7641fb36babcb85db8348a020bac384d34d99ff2", "dest": "/tmp/manageiq.ova", "gid": 0, "group": "root", "md5sum": "f5bd3388b0fcd0e6b563ee26f2c193fa", "mode": "0644", "msg": "OK (1108479736 bytes)", "owner": "root", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size": 1108479736, "src": "/tmp/tmpfyCvx5", "state": "file", "uid": 0, "url": "http://releases.manageiq.org/manageiq-ovirt-euwe-1.ova"} | |
TASK [ovirt-manageiq : Create a directory for extract the OVA image] *********** | |
changed: [example.com] => {"changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/tmp/manageiq/", "secontext": "unconfined_u:object_r:user_tmp_t:s0", "size |
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
$ ansible-galaxy install machacekondra.ovirt-manageiq |
NewerOlder