Working with Libvirt using Python

Today I decide to toy around with a KVM server we have running in house for testing. I started by using the libvirt Documentation, but it was very limited and I had to do some trial and error. I will go over a few basic things I learned using the libvirt Python module: Normally we us virt-manager to connect to our KVM instances, and the authentication is tunnled over SSH (using SSH Keys) and QEMU .

Line Equations in Python

The other day I was playing with some Python challenges found on a popular sites, this challenge worked with xy coordinates on a 2D plane. I wanted to show some of the code I wrote and how they work. The Plane Being the data is a tuple of x, y coordinates we will use the Cartesian Coordinate System . I started my code off as a simple Python class: class Line(object): def __init__(self, data): self.