<commit_before># Copyright 2012 Midokura Japan KK

from resource_base import ResourceBase
import port_type
import vendor_media_type


class BridgePort(ResourceBase):

    media_type = vendor_media_type.APPLICATION_PORT_JSON

    def __init__(self, http, uri, dto):
        super(BridgePort, self).__init__(http, uri, dto)

    def get_id(self):
        return self.dto['id']

    def get_type(self):
        return self.dto['type']

    def get_device_id(self):
        return self.dto['deviceId']

    def get_inbound_filter_id(self):
        return self.dto['inboundFilterId']

    def get_outbound_filter_id(self):
        return self.dto['outboundFilterId']

    def get_vif_id(self):
        return self.dto['vifId']

    def get_port_group_ids(self):
        return self.dto['portGroupIDs']

    def inbound_filter_id(self, id_) :
        self.dto['inboundFilterId'] = id_
        return self

    def outbound_filter_id(self, id_) :
        self.dto['outboundFilterId'] = id_
        return self

    def vif_id(self, id_) :
        self.dto['vifId'] = id_
        return self

    def port_group_ids(self, ids):
        self.dto['portGroupIDs'] = ids
        return self<commit_msg>Add get_peer_id() in the bridge resource.<commit_after># Copyright 2012 Midokura Japan KK

from resource_base import ResourceBase
import port_type
import vendor_media_type


class BridgePort(ResourceBase):

    media_type = vendor_media_type.APPLICATION_PORT_JSON

    def __init__(self, http, uri, dto):
        super(BridgePort, self).__init__(http, uri, dto)

    def get_id(self):
        return self.dto['id']

    def get_type(self):
        return self.dto['type']

    def get_device_id(self):
        return self.dto['deviceId']

    def get_inbound_filter_id(self):
        return self.dto['inboundFilterId']

    def get_outbound_filter_id(self):
        return self.dto['outboundFilterId']

    def get_vif_id(self):
        return self.dto['vifId']

    def get_peer_id(self):
        return self.dto['peerId']

    def get_port_group_ids(self):
        return self.dto['portGroupIDs']

    def inbound_filter_id(self, id_) :
        self.dto['inboundFilterId'] = id_
        return self

    def outbound_filter_id(self, id_) :
        self.dto['outboundFilterId'] = id_
        return self

    def vif_id(self, id_) :
        self.dto['vifId'] = id_
        return self

    def port_group_ids(self, ids):
        self.dto['portGroupIDs'] = ids
        return self
{'fraction_non_alphanumeric': 0.10080971659919029, 'fraction_numerical': 0.0032388663967611335, 'mean_word_length': 2.966292134831461, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6119687', 'n_tokens_mistral': 856, 'n_tokens_neox': 812, 'n_words': 174}