Changeset 16 for isp module/isp.py
- Timestamp:
- Jul 15, 2011, 10:15:05 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
isp module/isp.py
r14 r16 23 23 from osv import fields, osv 24 24 25 class network_address(osv.osv): 26 _name = "network.address" 27 _columns = { 28 'name': fields.char('IPv4', size=15, required=True, help='IPv4 address in form nnn.nnn.nnn.nnn'), 29 'ipv6': fields.char('IPv6', size=39, help='IPv6 address in form hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh'), 30 } 31 network_address() 32 25 33 class network_device_type(osv.osv): 26 34 _name = "network.device.type" … … 37 45 'name': fields.char('Name', size=32, required=True), 38 46 'partner_id': fields.many2one('res.partner', 'Partner', required=True), 47 'interface_ids': fields.one2many('network.interface', 'device_id', 'Interfaces'), 39 48 'location_partner_id': fields.many2one('res.partner', 'Location', required=True), 49 'type_id': fields.many2one('network.device.type', 'Type', required=True), 40 50 'pos_latitude': fields.float('Position latitude'), 41 'pos_lo gitude': fields.float('Position longitude'),51 'pos_longitude': fields.float('Position longitude'), 42 52 'used': fields.boolean('Used'), 43 53 'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'), 44 54 'last_online': fields.datetime('Last online', readonly=True), 45 ' InboundNATPriority': fields.integer('Inbound NAT priority', help="If multiple device is hidden by same NATed public ip, this gives their priority and thus which device will be used for ingoing traffic"),55 'inbound_nat_priority': fields.integer('Inbound NAT priority', help="If multiple device is hidden by same NATed public ip, this gives their priority and thus which device will be used for ingoing traffic"), 46 56 } 47 57 network_device() … … 61 71 _columns = { 62 72 'name': fields.char('Name', size=32), 63 'type ': fields.many2one('network.device.type', 'Type', required=True),73 'type_id': fields.many2one('network.interface.type', 'Type', required=True), 64 74 'mac': fields.char('MAC', size=17, help='Physical address in form XX:XX:XX:XX:XX:XX'), 65 'local_ipv4': fields.char('Local IPv4', size=15, help='Local IPv4 address in form nnn.nnn.nnn.nnn'), 66 'external_ipv4': fields.char('External IPv4', size=15, help='External IPv4 address in form nnn.nnn.nnn.nnn'), 67 'local_ipv6': fields.char('Local IPv6', size=39, help='Local IPv6 address in form hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh'), 68 'device': fields.many2one('network.device', 'Device', required=True), 75 'local_address_id': fields.many2one('network.address', 'Local address', help='Local IPv4 address in form nnn.nnn.nnn.nnn'), 76 'external_address_id': fields.many2one('network.address', 'External address'), 77 'device_id': fields.many2one('network.device', 'Device', required=True), 69 78 'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'), 70 79 'last_online': fields.datetime('Last online', readonly=True), 71 80 } 72 81 network_interface() 82 83 class network_domain(osv.osv): 84 _name = "network.domain" 85 _columns = { 86 'name': fields.char('Name', size=32, required=True), 87 'parent': fields.many2one('network.domain', 'Parent'), 88 'alias': fields.char('Alias', size=32), 89 } 90 network_domain() 91 92 class network_subnet(osv.osv): 93 _name = "network.subnet" 94 _columns = { 95 'name': fields.char('Name', size=32, required=True), 96 'address': fields.char('Address', size=15, required=True), 97 'prefix': fields.integer('Prefix', required=True), 98 'dhcp_id': fields.many2one('network.address', 'DHCP'), 99 'gateway_id': fields.many2one('network.address', 'Default gateway'), 100 'dns_ids': fields.many2many('network.address', 'network_subnet_dns_rel', 'subnet_id', 'address_id', 'DNS servers'), 101 'ntp_ids': fields.many2many('network.address', 'network_subnet_ntp_rel', 'subnet_id', 'address_id', 'NTP servers'), 102 'domain_id': fields.many2one('network.domain', 'Domain'), 103 'wins_id': fields.many2one('network.address', 'WINS server'), 104 'partner_id': fields.many2one('res.partner', 'Partner'), 105 } 106 network_subnet() 107 108 class network_billing_period(osv.osv): 109 _name = "network.billing.period" 110 _columns = { 111 'name': fields.char('Name', size=32, required=True), 112 } 113 network_billing_period() 114 115 class network_service_type(osv.osv): 116 _name = "network.service.type" 117 _columns = { 118 'name': fields.char('Name', size=32, required=True), 119 } 120 network_service_type() 121 122 class network_service(osv.osv): 123 _name = "network.service" 124 _columns = { 125 'name': fields.char('Name', size=32, required=True), 126 'type_id': fields.many2one('network.service.type', 'Type'), 127 'price': fields.integer('Price', help='Price per period'), 128 'price_period_id': fields.many2one('network.billing.period', 'Price period'), 129 'available': fields.boolean('Available', help='Define if service is available for customers'), 130 } 131 network_service()
Note:
See TracChangeset
for help on using the changeset viewer.