Пример #1
0
        def _external_gateway_info(conn, egni):
            if egni is None:
                return None

            egi = {}
            egi['network_id'] = reference.network_id(conn, egni['network_ref'])
            return egi
Пример #2
0
    def _refs_from_ser(self, conn, filters=None):
        refs = {}
        params = self.params()

        refs['fixed_ips_names'] = params['fixed_ips_names']
        refs['fixed_ips'] = []
        for fixed_ip in params['fixed_ips_names']:
            refs['fixed_ips'].append({
                'ip_address':
                fixed_ip['ip_address'],
                'subnet_id':
                reference.subnet_id(conn,
                                    fixed_ip['subnet_name'],
                                    filters=filters),
            })
        refs['device_name'] = params['device_name']
        refs['device_id'] = reference.router_id(conn,
                                                params['device_name'],
                                                filters=filters)
        refs['network_name'] = params['network_name']
        refs['network_id'] = reference.network_id(conn,
                                                  params['network_name'],
                                                  filters=filters)

        return refs
Пример #3
0
 def _refs_from_ser(self, conn, filters=None):
     refs = {}
     refs['floating_network_ref'] = self.params()['floating_network_ref']
     refs['floating_network_id'] = reference.network_id(
         conn, self.params()['floating_network_ref'])
     refs['qos_policy_ref'] = self.params()['qos_policy_ref']
     refs['qos_policy_id'] = reference.qos_policy_id(
         conn, self.params()['qos_policy_ref'])
     return refs
Пример #4
0
 def _refs_from_ser(self, conn, filters=None):
     refs = {}
     refs['network_name'] = self.params()['network_name']
     refs['network_id'] = reference.network_id(
         conn, self.params()['network_name'], filters=filters)
     refs['segment_name'] = self.params()['segment_name']
     refs['segment_id'] = reference.segment_id(
         conn, self.params()['segment_name'], filters=filters)
     refs['subnet_pool_name'] = self.params()['subnet_pool_name']
     refs['subnet_pool_id'] = reference.subnet_pool_id(
         conn, self.params()['subnet_pool_name'], filters=filters)
     return refs