Commit 140c73ed authored by Pablo Armingol's avatar Pablo Armingol
Browse files

code cleanup

parent 77b20dc7
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -68,12 +68,6 @@ class YangHandler:
        # compose device iterating through the components
 
        hardware = self._yang_context.create_data_path('/ietf-hardware:hardware')
        network_elements = hardware.create_path('network-elements')
            
        network_element = network_elements.create_path('network-element[uuid="{:s}"]'.format(device.device_id.device_uuid.uuid))
        network_element.create_path('uuid', device.device_id.device_uuid.uuid)
        network_element.create_path('name', device.name)
        components = network_element.create_path('components')
        physical_index = 1
        
        for component in device.components:
+1 −2
Original line number Diff line number Diff line
@@ -19,4 +19,3 @@ URL_PREFIX = "/restconf/data/device=<path:device_uuid>/ietf-hardware:hardware"

def register_ietf_hardware(rest_server: RestServer):
    rest_server.add_resource(Hardware, URL_PREFIX)
 No newline at end of file
    
 No newline at end of file