'Returns True if network is in VPC.'

def is_vpc_network(self, network_id):

    if (self._vpc_networks_ids is None):
        args = {'account': self.get_account(key='name'), 'domainid': self.get_domain(key='id'), 'projectid': self.get_project(key='id'), 'zoneid': self.get_zone(key='id')}
        vpcs = self.query_api('listVPCs', **args)
        self._vpc_networks_ids = []
        if vpcs:
            for vpc in vpcs['vpc']:
                for n in vpc.get('network', []):
                    self._vpc_networks_ids.append(n['id'])
    return (network_id in self._vpc_networks_ids)
