def IxVmRemoveAllCardsPy(ixNet): # This API will remove all vm cards. # ixNet = object # Example: ixNet = IxNetwork.IxNet() & ixNet.connect(apiServer) availableHardware = ixNet.getList(ixNet.getRoot(), 'availableHardware')[0] vChassisObj = ixNet.getList(availableHardware, 'virtualChassis')[0] vmCardList = ixNet.getList(vChassisObj, 'ixVmCard') releaseAllPortsPy(ixNet) for eachVmCardId in vmCardList: # '::ixNet::OBJ-/availableHardware/virtualChassis/ixVmCard:"Card1"' print '\nremoveCardId:', eachVmCardId ixNet.remove(eachVmCardId) ixNet.commit()