Page History
...
Mike Browne implemented the following rename/delete functionality. Murali is implementing a web interface on top of this:
Code Block | ||
---|---|---|
| ||
c2 = cdb.configdb(mdb.server, "SXR", create=True, root=dbname) c2.add_alias("FOO") # 0 c2.transfer_config("AMO", "BEAM", "evr0", "FOO", "evr3") # 1 with pytest.raises(Exception): c2.transfer_config("AMO", "BEAM", "evr0", "FOO", "evr3") print("Configs:") c2.print_configs() cfg1 = c.get_configuration("BEAM", "evr0") cfg2 = c2.get_configuration("FOO", "evr3") # These should be the same except for the detector names! del cfg1['detName:RO'] del cfg2['detName:RO'] assert cfg1 == cfg2 c2.rename_device("evr3", "evr7", "FOO") cfg3 = c2.get_configuration("FOO", "evr7") # These should be the same except for the detector names! del cfg3['detName:RO'] assert cfg2 == cfg3 with pytest.raises(ValueError): c2.remove_device("evr6", "FOO") c2.remove_device("evr7", "FOO") with pytest.raises(ValueError): cfg4 = c2.get_configuration("FOO", "evr7") |
Overview
Content Tools