-
-
Save mwasilew/f6a7936e938fea198797dfce6b85f21e to your computer and use it in GitHub Desktop.
This file contains 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
job_name: panda bbb multinode | |
visibility: public | |
priority: medium | |
timeouts: | |
job: | |
minutes: 15 | |
action: | |
minutes: 5 | |
connection: | |
minutes: 3 | |
protocols: | |
lava-multinode: | |
roles: | |
server: | |
device_type: beaglebone-black | |
count: 2 | |
client: | |
context: | |
arch: amd64 | |
device_type: qemu | |
count: 2 | |
actions: | |
- deploy: | |
role: | |
- client | |
to: tmpfs | |
images: | |
rootfs: | |
image_arg: -drive format=raw,file={rootfs} | |
url: http://images.validation.linaro.org/kvm-debian-wheezy.img.gz | |
compression: gz | |
os: debian | |
- deploy: | |
role: | |
- server | |
timeout: | |
minutes: 4 | |
to: tftp | |
kernel: | |
url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/vmlinuz | |
type: zimage | |
ramdisk: | |
url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/initramfs.cpio.gz | |
compression: gz | |
modules: | |
url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/modules.tar.gz | |
compression: gz | |
nfsrootfs: | |
url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/jessie-armhf-nfs.tar.gz | |
compression: gz | |
os: debian | |
dtb: | |
url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/jessie/armhf/4/dtbs/am335x-boneblack.dtb | |
- boot: | |
role: | |
- client | |
method: qemu | |
media: tmpfs | |
prompts: | |
- "root@debian:" | |
- boot: | |
role: | |
- server | |
method: u-boot | |
commands: nfs | |
auto_login: | |
login_prompt: 'login:' | |
username: root | |
prompts: | |
- 'root@jessie:' | |
timeout: | |
minutes: 2 | |
- test: | |
role: | |
- client | |
- server | |
timeout: | |
minutes: 5 | |
definitions: | |
- repository: git://git.linaro.org/lava-team/lava-functional-tests.git | |
from: git | |
path: lava-test-shell/smoke-tests-basic.yaml | |
name: smoke-tests |
This file contains 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 netrc | |
from urllib.parse import urlsplit | |
class Auth(object): | |
def __init__(self, url): | |
self.url = urlsplit(url).netloc | |
netrcauth = netrc.netrc() | |
self.username, _, self.token = netrcauth.authenticators(self.url) |
This file contains 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 xmlrpc import client as xmlrpclib | |
from urllib.parse import urlsplit | |
class LAVA(object): | |
def __init__(self, url, username, token): | |
self.url = url | |
self.username = username | |
self.token = token | |
self.__proxy__ = None | |
@property | |
def proxy(self): | |
if self.__proxy__ is None: | |
url = urlsplit(self.url) | |
endpoint = '%s://%s:%s@%s%s' % ( | |
url.scheme, | |
self.username, | |
self.token, | |
url.netloc, | |
url.path | |
) | |
self.__proxy__ = xmlrpclib.ServerProxy(endpoint) | |
return self.__proxy__ |
This file contains 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/env python3 | |
import yaml | |
import sys | |
from netrcauth import Auth | |
from proxy import LAVA | |
from pprint import pprint | |
host = "https://staging.validation.linaro.org/RPC2/" | |
a = Auth(host) | |
l = LAVA(host, a.username, a.token) | |
print (sys.argv[1]) | |
with open(sys.argv[1], "r") as yaml_file: | |
oe_job = yaml_file.read() | |
y = yaml.load(oe_job) | |
results = l.proxy.scheduler.submit_job(oe_job) | |
pprint (results) | |
if not isinstance(results, list): | |
results = [results] | |
for job_id in results: | |
pprint(l.proxy.scheduler.job_details(job_id)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment