blob: 47c04f7b6eb729dc678cde02ed42fe6d1573288e [file] [log] [blame]
matthew.hart@linaro.org5e4fce92013-08-22 11:29:21 +01001#! /usr/bin/python
2
3# Copyright 2013 Linaro Limited
4# Author Matt Hart <matthew.hart@linaro.org>
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19# MA 02110-1301, USA.
20
Matt Hart1306d822013-08-09 12:08:22 +010021import pexpect
Matt Hart1306d822013-08-09 12:08:22 +010022import os
Matt Hart63ed9112013-08-20 13:31:50 +010023import logging
Matt Hart76fb2542014-06-01 14:24:56 +010024import pkgutil
matthew.hart@linaro.org753a90c2014-01-20 09:45:25 +000025import sys
Matt Hart96ca8662013-08-21 13:37:35 +010026
Matt Hart1306d822013-08-09 12:08:22 +010027
28class PDUEngine():
29 connection = None
Matt Hart1306d822013-08-09 12:08:22 +010030 prompt = 0
31 driver = None
Matt Hart76fb2542014-06-01 14:24:56 +010032 firmware_dict = {}
Matt Hart1306d822013-08-09 12:08:22 +010033
Matt Hart2af71142014-07-22 10:40:41 +010034 def __init__(self, pdu_hostname):
35 pass
Matt Hart1306d822013-08-09 12:08:22 +010036
37if __name__ == "__main__":
matthew.hart@linaro.org753a90c2014-01-20 09:45:25 +000038 logging.basicConfig(level=logging.DEBUG)
39 logging.getLogger().setLevel(logging.DEBUG)
Matt Hart76fb2542014-06-01 14:24:56 +010040 pe = PDUEngine("pdu01")
41 pe.driver.port_off(1)
42 pe.driver.port_on(1)
43 pe.close()
44 pe = PDUEngine("pdu03")
45 pe.driver.port_off(3)
46 pe.driver.port_on(3)
47 pe.close()
48
49 #pe = PDUEngine("pdu16")
50 #pe.close()