def list_qos(self): qos_entities = [] for qos in self._service.qoss_service().list(): qos_entity = netlib.QoS(self) qos_entity.import_by_name(name=qos.name) qos_entities.append(qos_entity) return qos_entities
def host_qos(default_data_center): _host_qos = netlib.QoS(default_data_center) # values are in Mbit/sec _host_qos.create(name=HOST_QOS, qos_type=types.QosType.HOSTNETWORK, outbound_average_upperlimit=MAX_AVG_RATE, outbound_average_realtime=MAX_AVG_RATE, outbound_average_linkshare=MAX_LINKSHARE) yield _host_qos default_data_center.remove_qos((HOST_QOS,))
def vm_qos(default_data_center): _vm_qos = netlib.QoS(default_data_center) # values are in Mbit/sec _vm_qos.create(name=VM_QOS, qos_type=types.QosType.NETWORK, inbound_average=MAX_AVG_RATE, inbound_peak=MAX_PEAK_RATE, inbound_burst=MAX_BURST, outbound_average=MAX_AVG_RATE, outbound_peak=MAX_PEAK_RATE, outbound_burst=MAX_BURST) yield _vm_qos default_data_center.remove_qos((VM_QOS,))