Exemplo n.º 1
0
    def test_update(self):
        parser = get_vnx_parser('VNXConsistencyGroup')
        data = {
            parser.NAME.key: 'test cg name',
            parser.LUN_LIST.key: [1, 5, 7],
            parser.STATE.key: 'Offline'
        }

        cg = VNXConsistencyGroup()
        cg.update(data)

        assert_that(cg.name, equal_to('test cg name'))
        assert_that(cg.lun_list, only_contains(1, 5, 7))
        assert_that(cg.state, equal_to('Offline'))
Exemplo n.º 2
0
    def test_update(self):
        parser = get_parser_config('VNXConsistencyGroup')
        data = {
            parser.NAME.key: 'test cg name',
            parser.LUN_LIST.key: [1, 5, 7],
            parser.STATE.key: 'Offline'
        }

        cg = VNXConsistencyGroup()
        cg.update(data)

        self.assertEqual('test cg name', cg.name)
        self.assertEqual([1, 5, 7], cg.lun_list)
        self.assertEqual('Offline', cg.state)