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/python | |
| #from boto.ec2.connection import EC2Connection | |
| import boto.ec2 | |
| import sys | |
| import pdb | |
| from time import * | |
| from pprint import pprint | |
| from string import split, rsplit | |
| from xml.etree import ElementTree |
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
| # Copyright (C) 2010,2011 Chris Lalancette <clalance@redhat.com> | |
| # This library is free software; you can redistribute it and/or | |
| # modify it under the terms of the GNU Lesser General Public | |
| # License as published by the Free Software Foundation; | |
| # version 2.1 of the License. | |
| # This library is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
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/python | |
| # walk_vsphere_objects.py | |
| # Attempt to walk the vSphere object heirarchy starting at the root folder | |
| import sys | |
| from psphere.client import Client | |
| # This is python afterall | |
| TABWIDTH = 4 |
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
| # Callable class that is used to launch a thread | |
| import httplib | |
| import threading | |
| import time | |
| class CallbackWorker(): | |
| def __init__(self, callback_url, send_all_updates = False): | |
| # callback_url - the URL to which we will send the full object JSON for each STATUS update | |
| # send_all_updates - if true, if more than one update has accumulated, send them all |
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/python | |
| from EC2Cloud import EC2Cloud | |
| import sys | |
| sys.argv[0]="/usr/bin/imagefactoryd" | |
| co = EC2Cloud() |
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
| # This allows us to use "setup.py install" in our SPEC file without getting auto deps | |
| import sys | |
| if "--rpm-build-install" in sys.argv: | |
| print "Monkey Patch" | |
| sys.argv.pop(sys.argv.index("--rpm-build-install")) | |
| from setuptools.command.easy_install import easy_install as _easy_install | |
| class easy_install(_easy_install): | |
| def easy_install(self, spec, deps=False): | |
| _easy_install.easy_install(self, spec, False) | |
| import setuptools.command.easy_install |
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/python | |
| import guestfs | |
| import sys | |
| def inspect_and_mount(diskfile): | |
| g = guestfs.GuestFS () | |
| g.add_drive (diskfile) | |
| g.launch() |
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/python | |
| import guestfs | |
| import sys | |
| import os | |
| from subprocess import check_output | |
| from subprocess import STDOUT as sp_STDOUT | |
| from time import sleep | |
| from tempfile import mkdtemp, NamedTemporaryFile |
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/python | |
| import guestfs | |
| import sys | |
| import os | |
| from subprocess import check_output | |
| from subprocess import STDOUT as sp_STDOUT | |
| from time import sleep | |
| from tempfile import mkdtemp, NamedTemporaryFile |
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
| --- fedoracore-1-jeos.ks 2013-03-08 13:00:15.418666202 -0600 | |
| +++ fedora-18-jeos.ks 2013-03-08 13:00:15.418666202 -0600 | |
| @@ -2,26 +2,28 @@ | |
| text | |
| keyboard us | |
| lang en_US.UTF-8 | |
| -langsupport --default en_US.UTF-8 en_US.UTF-8 | |
| -mouse generic3ps/2 --device psaux | |
| skipx | |
| network --device eth0 --bootproto dhcp |
OlderNewer