Exemplo n.º 1
0
def raw(args):
    text = sys.stdin.read()
    cmpush.execute(args.ip, text, 'user', 'password')
Exemplo n.º 2
0
def url(args):
    push_xml = cmxml.create_execute_url(args.url)
    cmpush.execute(args.ip, push_xml, 'user', 'password')
Exemplo n.º 3
0
def click(ip, button):
    cmpush.execute(ip, cmxml.create_execute_url(button), 'user', 'password')
    return 'clicking'
Exemplo n.º 4
0
def status(args):
    data = ''
    text = sys.stdin.read()
    push_xml = cmxml.PHONE_STATUS % {'text': text, 'width': 100, 'height': 20, 'data': data}
    cmpush.execute(args.ip, push_xml, 'user', 'password')
Exemplo n.º 5
0
import sys

import plac
import time

import pycisco.cmpush as cmpush
import pycisco.cmxml as cmxml

def create_set_ringer(num):
    ringer_key = 'Key:KeyPad%d' % num
    return 'Key:Settings', 'Key:KeyPad2', ringer_key, 'Key:Soft1', 'Key:Soft3', 'Key:Settings'

if __name__ == '__main__':
    ip = sys.argv[1]
    ringer = int(sys.argv[2])
    for url in create_set_ringer(ringer):
        cmpush.execute(ip, cmxml.create_execute_url(url), 'user', 'password')
        time.sleep(0.5)