yamaoka-kitaguchi-lab / tn4-edges-deploy-old

The Unlicense
0 stars 0 forks source link

Support VC #11

Closed mi2428 closed 2 years ago

mi2428 commented 2 years ago
{'asset_tag': None,
 'cluster': None,
 'comments': '',
 'config_context': {},
 'created': '2021-09-16',
 'custom_fields': {},
 'device_role': {'display': 'Edge Switch',
                 'id': 1,
                 'name': 'Edge Switch',
                 'slug': 'edge-sw',
                 'url': 'http://127.0.0.1:28000/api/dcim/device-roles/1/'},
 'device_type': {'display': 'EX4300-48MP 2-stacked',
                 'id': 5,
                 'manufacturer': {'display': 'Juniper Networks',
                                  'id': 1,
                                  'name': 'Juniper Networks',
                                  'slug': 'juniper',
                                  'url': 'http://127.0.0.1:28000/api/dcim/manufacturers/1/'},
                 'model': 'EX4300-48MP 2-stacked',
                 'slug': 'ex4300-48mp-st2',
                 'url': 'http://127.0.0.1:28000/api/dcim/device-types/5/'},
 'display': 'minami3',
 'face': None,
 'id': 228,
 'last_updated': '2021-09-16T13:20:41.367501Z',
 'local_context_data': None,
 'location': None,
 'name': 'minami3',
 'parent_device': None,
 'platform': None,
 'position': None,
 'primary_ip': {'address': '172.30.2.68/23',
                'display': '172.30.2.68/23',
                'family': 4,
                'id': 227,
                'url': 'http://127.0.0.1:28000/api/ipam/ip-addresses/227/'},
 'primary_ip4': {'address': '172.30.2.68/23',
                 'display': '172.30.2.68/23',
                 'family': 4,
                 'id': 227,
                 'url': 'http://127.0.0.1:28000/api/ipam/ip-addresses/227/'},
 'primary_ip6': None,
 'rack': None,
 'serial': '',
 'site': {'display': 'South Building 3',
          'id': 2,
          'name': 'South Building 3',
          'slug': 'minami3',
          'url': 'http://127.0.0.1:28000/api/dcim/sites/2/'},
 'status': {'label': 'Planned', 'value': 'planned'},
 'tags': [],
 'tenant': None,
 'url': 'http://127.0.0.1:28000/api/dcim/devices/228/',
 'vc_position': None,
 'vc_priority': None,
 'virtual_chassis': None}
{'asset_tag': None,
 'cluster': None,
 'comments': '',
 'config_context': {},
 'created': '2021-09-23',
 'custom_fields': {},
 'device_role': {'display': 'Edge Switch',
                 'id': 1,
                 'name': 'Edge Switch',
                 'slug': 'edge-sw',
                 'url': 'http://127.0.0.1:28000/api/dcim/device-roles/1/'},
 'device_type': {'display': 'EX4300-48MP',
                 'id': 10,
                 'manufacturer': {'display': 'Juniper Networks',
                                  'id': 1,
                                  'name': 'Juniper Networks',
                                  'slug': 'juniper',
                                  'url': 'http://127.0.0.1:28000/api/dcim/manufacturers/1/'},
                 'model': 'EX4300-48MP',
                 'slug': 'ex4300-48mp',
                 'url': 'http://127.0.0.1:28000/api/dcim/device-types/10/'},
 'display': 'minami3 (1)',
 'face': None,
 'id': 277,
 'last_updated': '2021-09-23T12:09:27.016232Z',
 'local_context_data': None,
 'location': None,
 'name': 'minami3 (1)',
 'parent_device': None,
 'platform': None,
 'position': None,
 'primary_ip': None,
 'primary_ip4': None,
 'primary_ip6': None,
 'rack': None,
 'serial': '',
 'site': {'display': 'South Building 3',
          'id': 2,
          'name': 'South Building 3',
          'slug': 'minami3',
          'url': 'http://127.0.0.1:28000/api/dcim/sites/2/'},
 'status': {'label': 'Active', 'value': 'active'},
 'tags': [],
 'tenant': None,
 'url': 'http://127.0.0.1:28000/api/dcim/devices/277/',
 'vc_position': 1,
 'vc_priority': 0,
 'virtual_chassis': {'id': 4,
                     'master': {'display': 'minami3 (1)',
                                'id': 277,
                                'name': 'minami3 (1)',
                                'url': 'http://127.0.0.1:28000/api/dcim/devices/277/'},
                     'name': 'minami3',
                     'url': 'http://127.0.0.1:28000/api/dcim/virtual-chassis/4/'}}
{'asset_tag': None,
 'cluster': None,
 'comments': '',
 'config_context': {},
 'created': '2021-09-23',
 'custom_fields': {},
 'device_role': {'display': 'Edge Switch',
                 'id': 1,
                 'name': 'Edge Switch',
                 'slug': 'edge-sw',
                 'url': 'http://127.0.0.1:28000/api/dcim/device-roles/1/'},
 'device_type': {'display': 'EX4300-48MP',
                 'id': 10,
                 'manufacturer': {'display': 'Juniper Networks',
                                  'id': 1,
                                  'name': 'Juniper Networks',
                                  'slug': 'juniper',
                                  'url': 'http://127.0.0.1:28000/api/dcim/manufacturers/1/'},
                 'model': 'EX4300-48MP',
                 'slug': 'ex4300-48mp',
                 'url': 'http://127.0.0.1:28000/api/dcim/device-types/10/'},
 'display': 'minami3 (2)',
 'face': None,
 'id': 278,
 'last_updated': '2021-09-23T12:09:27.037106Z',
 'local_context_data': None,
 'location': None,
 'name': 'minami3 (2)',
 'parent_device': None,
 'platform': None,
 'position': None,
 'primary_ip': None,
 'primary_ip4': None,
 'primary_ip6': None,
 'rack': None,
 'serial': '',
 'site': {'display': 'South Building 3',
          'id': 2,
          'name': 'South Building 3',
          'slug': 'minami3',
          'url': 'http://127.0.0.1:28000/api/dcim/sites/2/'},
 'status': {'label': 'Active', 'value': 'active'},
 'tags': [],
 'tenant': None,
 'url': 'http://127.0.0.1:28000/api/dcim/devices/278/',
 'vc_position': 2,
 'vc_priority': 0,
 'virtual_chassis': {'id': 4,
                     'master': {'display': 'minami3 (1)',
                                'id': 277,
                                'name': 'minami3 (1)',
                                'url': 'http://127.0.0.1:28000/api/dcim/devices/277/'},
                     'name': 'minami3',
                     'url': 'http://127.0.0.1:28000/api/dcim/virtual-chassis/4/'}}
mi2428 commented 2 years ago
[{'custom_fields': {},
  'display': 'minami3',
  'domain': '',
  'id': 4,
  'master': {'display': 'minami3 (1)',
             'id': 277,
             'name': 'minami3 (1)',
             'url': 'http://127.0.0.1:28000/api/dcim/devices/277/'},
  'member_count': 2,
  'name': 'minami3',
  'tags': [],
  'url': 'http://127.0.0.1:28000/api/dcim/virtual-chassis/4/'}]
mi2428 commented 2 years ago
 {'_occupied': False,
  'cable': None,
  'cable_peer': None,
  'cable_peer_type': None,
  'connected_endpoint': None,
  'connected_endpoint_reachable': None,
  'connected_endpoint_type': None,
  'count_ipaddresses': 0,
  'created': '2021-09-16',
  'custom_fields': {},
  'description': 'core',
  'device': {'display': '80nen',
             'id': 201,
             'name': '80nen',
             'url': 'http://127.0.0.1:28000/api/dcim/devices/201/'},
  'display': 'ae0',
  'enabled': True,
  'id': 18579,
  'label': '',
  'lag': None,
  'last_updated': '2021-09-16T09:53:07.872456Z',
  'mac_address': None,
  'mark_connected': False,
  'mgmt_only': False,
  'mode': {'label': 'Tagged (All)', 'value': 'tagged-all'},
  'mtu': None,
  'name': 'ae0',
  'parent': None,
  'tagged_vlans': [],
  'tags': [{'color': '3f51b5',
            'display': 'Uplink',
            'id': 6,
            'name': 'Uplink',
            'slug': 'uplink',
            'url': 'http://127.0.0.1:28000/api/extras/tags/6/'}],
  'type': {'label': 'Link Aggregation Group (LAG)', 'value': 'lag'},
  'untagged_vlan': None,
  'url': 'http://127.0.0.1:28000/api/dcim/interfaces/18579/'},
mi2428 commented 2 years ago

https://github.com/netbox-community/netbox/blob/cf5c24ee2dbc5929b48b3ef2dcfd77fe01bcd12a/netbox/dcim/choices.py#L69