示例#1
0
文件: port.py 项目: xe1gyq/metal
 def convert_with_links(cls, rpc_ports, limit, url=None,
                        expand=False, **kwargs):
     collection = PortCollection()
     collection.ports = [Port.convert_with_links(p, expand)
                         for p in rpc_ports]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection
示例#2
0
文件: node.py 项目: xe1gyq/metal
 def convert_with_links(cls,
                        rpc_nodes,
                        limit,
                        url=None,
                        expand=False,
                        **kwargs):
     collection = NodeCollection()
     collection.nodes = [
         Node.convert_with_links(p, expand) for p in rpc_nodes
     ]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection
示例#3
0
 def convert_with_links(cls,
                        rpc_lldp_agents,
                        limit,
                        url=None,
                        expand=False,
                        **kwargs):
     collection = LLDPAgentCollection()
     collection.lldp_agents = [
         LLDPAgent.convert_with_links(a, expand) for a in rpc_lldp_agents
     ]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection
示例#4
0
 def convert_with_links(cls,
                        rpc_devices,
                        limit,
                        url=None,
                        expand=False,
                        **kwargs):
     collection = PCIDeviceCollection()
     collection.pci_devices = [
         PCIDevice.convert_with_links(d, expand) for d in rpc_devices
     ]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection
示例#5
0
 def convert_with_links(cls,
                        rsensorgroups,
                        limit,
                        url=None,
                        expand=False,
                        **kwargs):
     collection = SensorGroupCollection()
     collection.sensorgroups = [
         SensorGroup.convert_with_links(p, expand) for p in rsensorgroups
     ]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection
示例#6
0
 def convert_with_links(cls,
                        memorys,
                        limit,
                        url=None,
                        expand=False,
                        **kwargs):
     collection = MemoryCollection()
     collection.memorys = [
         Memory.convert_with_links(n, expand) for n in memorys
     ]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection
示例#7
0
文件: system.py 项目: xe1gyq/metal
    def convert_with_links(cls,
                           systems,
                           limit,
                           url=None,
                           expand=False,
                           **kwargs):
        collection = SystemCollection()
        collection.systems = [
            System.convert_with_links(ch, expand) for ch in systems
        ]

        collection.next = collection.get_next(limit, url=url, **kwargs)
        return collection