Network device support in inventory model

Registered by Jason Mitschke

As per the discussion in the community meeting, we would like to have better inventory models to accommodate driving/deploying Openstack service like Ceph, Swift, Cinder etc. The current modeling might not be suitable to do this. The key point is to support network devices, we currently dont have explicit support to do network device modeling.

Craton currently support the following resources:
Region
Cell
Devices (types: servers / vm / containers)

We need to include "network devices" to the devices list such that we can represent things like switches, routers, hubs etc.
This allows operators to represent a ToR switch which would allow for servers to have the ToR switch as its parent device. This actually represents a "cab". This represent then allows to to have representation of a DC in the following way:

Region -> Cell -> Cab -> Servers / VM/ Containers

Blueprint information

Status:
Not started
Approver:
Sulochan Acharya
Priority:
Undefined
Drafter:
Jason Mitschke
Direction:
Needs approval
Assignee:
Sulochan Acharya
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

A network device is represented by the following model:
==========================================
NewtorkDevice :
- Name
- DeviceType
- ModelName
- PrimaryIP
- OSVersion
- Neighbors
- Vlans
- VlanInterfaces
- Interfaces
- Newtorks

Schema for the network device types:
--------------------------------------------------
name - {"type" : "string"}
device_type - {"type": "string"}
modelName - {"type": "string"}
primary_IP - {"type": "string"}
os_version - {"type": "string"}
neighbours - [{"interface_id": {"type": "integer"}, {"name": "string"}, {"remote_int": {"type": "lldp"}}}]

vlans - [{"id": {"interer"}}]

vlan_interfaces - {"id": {"type": "integer"},
                   "port": {"type": "string"},
                   "vlan_id": {"type": "string"},
                   "vlan": {"type": "string"},
                  }

interfaces - {"id": {"type": "integer"},
              "name": {"type": "string"},
              "vlan_id": {"type": "integer"},
              "port": {"type": "string"},
              "type": {"type": "string"},
              "duplex": {"type": "string"},
              "speed": {"type": "string"},
              "link": {"type": "string"},
              "cdp": {"type": "string"},
              "security": {"type": "string"},
             }

networks
- [{"name": {"type": "string"}},
   {"vlan": {"type": "integer"}},
   {"CIDR": {"type": "string"}},
   {"gateway": {"type": "string"}},
   {"netmask": {"type": "string"}},
   {"ip_block_type": {"type": "string"}},
   {"nss": {"type": "string"}}
}]

Gerrit topic: https://review.openstack.org/#q,topic:bug/1606872,n,z

Addressed by: https://review.openstack.org/361175
    Adds model for network devices

(?)

Work Items

Work items:
Model network device for inventory: DONE
Model network device into inventory hierarchy such that it can be tracked as a par of a Cab: TODO
Add api endpoints for network device: DONE

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.