Skip to content

Instantly share code, notes, and snippets.

View weissjeffm's full-sized avatar

Jeff Weiss weissjeffm

View GitHub Profile
(cfme)[jweiss@localhost cfme_tests]$ py.test -s -v cfme/tests/cloud/test_cloud_timelines.py
Traceback (most recent call last):
File "/home/jweiss/workspace/cfme_tests/utils/artifactor_start.py", line 3, in <module>
from artifactor import Artifactor, initialize
ImportError: No module named artifactor
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/home/jweiss/.virtualenvs/cfme/lib/python2.7/site-packages/_pytest/main.py", line 80, in wrap_session
INTERNALERROR> config.do_configure()
INTERNALERROR> File "/home/jweiss/.virtualenvs/cfme/lib/python2.7/site-packages/_pytest/config.py", line 618, in do_configure
INTERNALERROR> self.hook.pytest_configure(config=self)
import pytest
from utils import db
from utils import providers
from utils import testgen
from utils import conf
import time
from cfme.configure.configuration import candu
pytestmark = [
pytest.mark.fixtureconf(server_roles="+ems_metrics_coordinator +ems_metrics_collector"
import pytest
from utils import db
from utils import providers
from utils import testgen
from utils import conf
import time
from cfme.configure.configuration import candu
pytestmark = [
pytest.mark.fixtureconf(server_roles="+ems_metrics_coordinator +ems_metrics_collector"
In [7]:
def mytest():
print "running test"
def cleanup():
print "cleaning up test"
raise Exception({'msg': 'oh noes', 'cleanup': cleanup})
def pytest_exception_interact(e):
print "handling error"
e.message['cleanup']()
public class Foo {
public static void test(){
try {
System.out.println("running test");
}
finally {
System.out.println("Cleaning up test");
}
}
In [2]:
def mytest():
try:
print "running test"
raise Exception("oh noes")
finally:
print "cleaning up test"
def pytest_exception_interact():
print "handling error"
- cfme.cloud.provider.discover(cancel=True, credential=None)
| - cfme.fixtures.pytest_selenium.force_navigate(page_name='clouds_provider_discover', args=(), _tries=0, kwargs={})
| | - cfme.fixtures.pytest_selenium.execute_script(script='miqSparkleOff();', args=(), kwargs={})
| | -> None
| | - cfme.login.current_user()
| | -> <cfme.login.User username='admin', full_name=u'Administrator', password='*******'>
| | - cfme.fixtures.pytest_selenium.is_displayed(_deep=0, loc="//div[@id='blocker_div']")
| | -> False
| | - cfme.login.login(username='admin', password='*******', submit_method=<function _click_on_login at 0x6768050>)
| | | - cfme.login.logged_in()
@weissjeffm
weissjeffm / bitcoin.adoc
Last active August 29, 2015 14:05
Bitcoin in Five Minutes

What is Bitcoin?

No technical background needed

To understand what bitcoin is, you don’t need to know anything about math or computers. You only need to be familiar with money.

The essence of money

Money is a form of communication. When you are compensated for your

(cfme)[jweiss@localhost cfme_tests]$ scripts/dockerbot/dockerbot.py --appliance-name Upstream --pytest 'py.test cfme/tests/infrastructure/test_retirement.py'
==================================================================
____ __ ____ __
: / __ \____ _____/ /_____ _____/ __ )____ / /_
[* *] / / / / __ \/ ___/ //_/ _ \/ ___/ __ / __ \/ __/
-[___]- / /_/ / /_/ / /__/ ,< / __/ / / /_/ / /_/ / /_
/_____/\____/\___/_/|_|\___/_/ /_____/\____/\__/
==================================================================
In [27]:
import cfme.infrastructure.virtual_machines as vm
import cfme.infrastructure.provider as p
reload(vm)
import cfme.fixtures.pytest_selenium as sel
# sel.force_navigate("infra_vm_retire", context={"vm": })
myvm = vm.Vm(name="jweiss-test1", provider_crud=p.get_from_config("vsphere55"), template_name='damnSmallLinux')
myvm.create_on_provider()
INFO:cfme:Getting ready to deploy VM/instance jweiss-test1 from template damnSmallLinux on provider vSphere 5.5