コード例 #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
ファイル: lldp_agent.py プロジェクト: xe1gyq/metal
 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
ファイル: sensorgroup.py プロジェクト: xe1gyq/metal
 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