示例#1
0
    def setUpClass(cls):

        service = ServiceProxy('http://localhost:9999/op')

        items = [dict(path='net.dot1q.dev10',
                      model='asset.netable',
                      value=dict(fqdn='dev10.dot1q.net',
                                 ip4='192.168.123.10',
                                 serialno='DRS010'))]
        cls.items = items
        service.upsert(items)
示例#2
0
    def setUp(self):

        service = ServiceProxy('http://localhost:9999/op')

        items = [dict(path='net.dot1q.dev21',
                      model='asset.netable',
                      value=dict(fqdn='dev21.dot1q.net',
                                 ip4='192.168.123.21',
                                 serialno='DRS021')),
                 dict(path='net.dot1q.dev22',
                      model='asset.netable',
                      value=dict(fqdn='dev22.dot1q.net',
                                 ip4='192.168.123.22',
                                 serialno='DRS022')),
                 dict(path='net.dot1q.dev23',
                      model='asset.netable',
                      value=dict(fqdn='dev23.dot1q.net',
                                 ip4='192.168.123.23',
                                 serialno='DRS023'))]

        service.upsert(items)