예제 #1
0
def raw(args):
    text = sys.stdin.read()
    cmpush.execute(args.ip, text, 'user', 'password')
예제 #2
0
def url(args):
    push_xml = cmxml.create_execute_url(args.url)
    cmpush.execute(args.ip, push_xml, 'user', 'password')
예제 #3
0
파일: webfe.py 프로젝트: 8carroll/cisco_rc
def click(ip, button):
    cmpush.execute(ip, cmxml.create_execute_url(button), 'user', 'password')
    return 'clicking'
예제 #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')
예제 #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)