Skip to content

Instantly share code, notes, and snippets.

@primalmotion
primalmotion / gist:1185744
Created September 1, 2011 08:55
Sample script to communicate with hypervisor and ask for its VMs
# -*- coding: utf-8 -*-
#
# archipel-samplecommunication.py
#
# Copyright (C) 2010 Antoine Mercadal <[email protected]>
# This file is part of ArchipelProject
# http://archipelproject.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
*Build*
*Libraries/Cappuccino*
*Libraries/StropheCappuccino*
*Libraries/*/Build/*
*Categories*
*.xCodeSupport*
*Modules/*
@primalmotion
primalmotion / gist:1168223
Created August 24, 2011 14:43
Archipel Libvirt Storage API
# POOLS
## pool define
<iq type='get' to='hypervisor@ramucho/ramucho'>
<query xmlns='archipel:storage:pool'>
<archipel action='pooldefine' build="true">
<pool type="dir" >
<name>totoman</name>
<capacity>47394578432</capacity>
1: 127.0.0.1:5900: Target closed
1: handler exception: buffer is smaller than requested size
1: Traceback (most recent call last):
File "/tmp/work/archipel-agent-virtualmachine-vnc/archipelagentvirtualmachinevnc/websocket.py", line 692, in top_new_client
self.new_client()
File "/tmp/work/archipel-agent-virtualmachine-vnc/archipelagentvirtualmachinevnc/websockify.py", line 150, in new_client
self.do_proxy(tsock)
File "/tmp/work/archipel-agent-virtualmachine-vnc/archipelagentvirtualmachinevnc/websockify.py", line 206, in do_proxy
bufs, closed = self.recv_frames()
File "/tmp/work/archipel-agent-virtualmachine-vnc/archipelagentvirtualmachinevnc/websocket.py", line 419, in recv_frames
@primalmotion
primalmotion / gist:1106841
Created July 26, 2011 14:04
Archipel Beta 3.2 Changelog
def iq_users_list(self, iq):
"""
List all registered users.
@type iq: xmpp.Protocol.Iq
@param iq: the received IQ
@rtype: xmpp.Protocol.Iq
@return: a ready to send IQ containing the result of the action
"""
try:
reply = iq.buildReply("result")
@primalmotion
primalmotion / gist:1099528
Created July 22, 2011 14:18
Archipel Beta 3.1 Changelog

Changelog - Archipel Beta 3.1

Beta 3 changelog available here https://gist.github.com/1075765

XMPP Bus (StropheCappuccino)

FIX: Bug preventing to properly decode archived objects from XMPP Storage.

GUI Core

NEW: Some new handy developer methods in TNModule.
quasar:~ Tonio$ sudo tcpdump -vv -i en0 src 46.4.248.206
tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes
19:23:33.747188 IP (tos 0x0, ttl 48, id 64659, offset 0, flags [DF], proto TCP (6), length 52)
vm0015.xi.srv.conemu.de.ssh > quasar.corp.capgemini.com.58309: Flags [.], cksum 0x8816 (correct), seq 130170953, ack 4087942838, win 91, options [nop,nop,TS val 1049764325 ecr 414859391], length 0
19:23:34.689902 IP (tos 0x0, ttl 48, id 0, offset 0, flags [DF], proto TCP (6), length 60)
vm0015.xi.srv.conemu.de.ssh > quasar.corp.capgemini.com.58373: Flags [S.], cksum 0xe3d1 (correct), seq 4114812515, ack 3657090227, win 5792, options [mss 1380,sackOK,TS val 1049765268 ecr 414860329,nop,wscale 6], length 0
19:24:10.360330 IP (tos 0x0, ttl 48, id 62204, offset 0, flags [DF], proto TCP (6), length 52)
vm0015.xi.srv.conemu.de.ssh > quasar.corp.capgemini.com.58373: Flags [F.], cksum 0x9d26 (correct), seq 1, ack 1, win 91, options [nop,nop,TS val 1049800937 ecr 414860350], le
@primalmotion
primalmotion / changelog.md
Created July 11, 2011 12:46
Archipel Beta 3 Changelog

Changelog - Archipel Beta 3

Beta 3.1 change log here https://gist.github.com/1099528

XMPP Bus (StropheCappuccino)

FIX: Bug preventing to properly disconnect
FIX: Memory leak with handler registrar
FIX: Timer in Strophe.js never stopped even when disconnected
NEW: New API to allow to change current user password
<html>
<head>
<style>
.scrollable {
overflow: auto;
width: 200px;
height: 200px;
}
.inner {