<commit_before>#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# TR-069 has mandatory attribute names that don't comply with policy
#pylint: disable-msg=C6409

"""tr-181 Device implementations for supported platforms.
"""

__author__ = '<EMAIL> (<NAME>)'

import device_info
import ethernet
import tr.core
import tr.tr181_v2_2 as tr181


class DeviceIdBruno(object):
  def __init__(self):
    self.Manufacturer = 'Google'
    self.ManufacturerOUI = '00:1a:11:00:00:00'
    self.ModelName = 'Bruno'
    self.Description = 'Set top box for Google Fiber network'
    self.SerialNumber = '00000000'
    self.HardwareVersion = '0'
    self.AdditionalHardwareVersion = '0'
    self.SoftwareVersion = '0'
    self.AdditionalSoftwareVersion = '0'
    self.ProductClass = 'STB'


class DeviceInfoBruno(device_info.DeviceInfoLinux26):
  def __init__(self):
    device_info.DeviceInfoLinux26.__init__(self, DeviceIdBruno())


class DeviceBruno(tr181.Device_v2_2.Device):
  """Device implementation for Bruno, Google's set top box platform.
  """

  def __init__(self):
    tr181.Device_v2_2.Device.__init__(self)
    self.ATM = tr.core.TODO()
    self.Bridging = tr.core.TODO()
    self.CaptivePortal = tr.core.TODO()
    self.DHCPv4 = tr.core.TODO()
    self.DNS = tr.core.TODO()
    self.DSL = tr.core.TODO()
    self.GatewayInfo = tr.core.TODO()
    self.HPNA = tr.core.TODO()
    self.HomePlug = tr.core.TODO()
    self.Hosts = tr.core.TODO()
    self.IEEE8021x = tr.core.TODO()
    self.IP = tr.core.TODO()
    self.LANConfigSecurity = tr.core.TODO()
    self.ManagementServer = tr.core.TODO()
    self.MoCA = tr.core.TODO()
    self.NAT = tr.core.TODO()
    self.PPP = tr.core.TODO()
    self.PTM = tr.core.TODO()
    self.QoS = tr.core.TODO()
    self.Routing = tr.core.TODO()
    self.Services = tr.core.TODO()
    self.SmartCardReaders = tr.core.TODO()
    self.UPA = tr.core.TODO()
    self.USB = tr.core.TODO()
    self.Users = tr.core.TODO()
    self.WiFi = tr.core.TODO()
    self.InterfaceStackNumberOfEntries = 0

    # Bruno has one Ethernet port, Wifi, and MoCA
    self.Ethernet = ethernet.Ethernet()
    self.Ethernet.add_interface("eth0", False, EthernetInterfaceBrunoEth0)


class EthernetInterfaceBrunoEth0(ethernet.EthernetInterfaceLinux26):
  def __init__(self):
    return EthernetInterfaceLinux26.__init__(self, "eth0")


def main():
  root = DeviceBruno()

if __name__ == '__main__':
  main()<commit_msg>Run as a test, dump the DeviceBruno object.<commit_after>#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# TR-069 has mandatory attribute names that don't comply with policy
#pylint: disable-msg=C6409

"""tr-181 Device implementations for supported platforms.
"""

__author__ = '<EMAIL> (<NAME>)'

import device_info
import ethernet
import tr.core
import tr.tr181_v2_2 as tr181


class DeviceIdBruno(object):
  def __init__(self):
    self.Manufacturer = 'Google'
    self.ManufacturerOUI = '00:1a:11:00:00:00'
    self.ModelName = 'Bruno'
    self.Description = 'Set top box for Google Fiber network'
    self.SerialNumber = '00000000'
    self.HardwareVersion = '0'
    self.AdditionalHardwareVersion = '0'
    self.SoftwareVersion = '0'
    self.AdditionalSoftwareVersion = '0'
    self.ProductClass = 'STB'


class DeviceInfoBruno(device_info.DeviceInfoLinux26):
  def __init__(self):
    device_info.DeviceInfoLinux26.__init__(self, DeviceIdBruno())


class DeviceBruno(tr181.Device_v2_2.Device):
  """Device implementation for Bruno, Google's set top box platform.
  """

  def __init__(self):
    tr181.Device_v2_2.Device.__init__(self)
    self.ATM = tr.core.TODO()
    self.Bridging = tr.core.TODO()
    self.CaptivePortal = tr.core.TODO()
    self.DHCPv4 = tr.core.TODO()
    self.DNS = tr.core.TODO()
    self.DSL = tr.core.TODO()
    self.GatewayInfo = tr.core.TODO()
    self.HPNA = tr.core.TODO()
    self.HomePlug = tr.core.TODO()
    self.Hosts = tr.core.TODO()
    self.IEEE8021x = tr.core.TODO()
    self.IP = tr.core.TODO()
    self.LANConfigSecurity = tr.core.TODO()
    self.ManagementServer = tr.core.TODO()
    self.MoCA = tr.core.TODO()
    self.NAT = tr.core.TODO()
    self.PPP = tr.core.TODO()
    self.PTM = tr.core.TODO()
    self.QoS = tr.core.TODO()
    self.Routing = tr.core.TODO()
    self.Services = tr.core.TODO()
    self.SmartCardReaders = tr.core.TODO()
    self.UPA = tr.core.TODO()
    self.USB = tr.core.TODO()
    self.Users = tr.core.TODO()
    self.WiFi = tr.core.TODO()
    self.InterfaceStackNumberOfEntries = 0

    # Bruno has one Ethernet port, Wifi, and MoCA
    self.Ethernet = ethernet.Ethernet()
    self.Ethernet.add_interface("eth0", False, EthernetInterfaceBrunoEth0)


class EthernetInterfaceBrunoEth0(ethernet.EthernetInterfaceLinux26):
  def __init__(self):
    return EthernetInterfaceLinux26.__init__(self, "eth0")


def main():
  root = DeviceBruno()
  tr.core.Dump(root)

if __name__ == '__main__':
  main()
{'fraction_non_alphanumeric': 0.133225349260984, 'fraction_numerical': 0.02956063980562867, 'mean_word_length': 3.5404411764705883, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '6837439', 'n_tokens_mistral': 1937, 'n_tokens_neox': 1792, 'n_words': 349}