예제 #1
0
    def test_create_valid_org(self):
        """
        Test basic Org creation
        """
        org = Org(name='testorg')
        data = '{"organizationName": "testorg"}'

        self.assertIsInstance(org, Org)
        self.assertEqual(org.get_json(), data)
예제 #2
0
    def test_create_valid_org(self):
        """
        Test basic Org creation
        """
        org = Org(name='testorg')
        data = '{"organizationName": "testorg"}'

        self.assertIsInstance(org, Org)
        self.assertEqual(org.get_json(), data)
예제 #3
0
def main():
    session = Session(URL, LOGIN, PASSWORD)
    session.login()

    test = Org('sample-org')
    session.post(test.get_url(), test.get_json())

    p1 = Partition('sample', test)
    session.post(p1.get_url(), p1.get_json())
    n1 = Network('net1', p1)
    n1.segmentId = 333
    n1.vlanId = n1.segmentId
    session.post(n1.get_url(), n1.get_json())
예제 #4
0
def main():
    session = Session(URL, LOGIN, PASSWORD)
    session.login()

    test = Org('sample-org')
    session.push_to_dcnm(test.get_url(), test.get_json())

    p1 = Partition('sample', test)
    session.push_to_dcnm(p1.get_url(), p1.get_json())
    n1 = Network('net1', p1)
    n1.segmentId = 333
    n1.vlanId = n1.segmentId
    session.push_to_dcnm(n1.get_url(), n1.get_json())