class AAIUpdateTasks {

    protected void updateNetworkAAI(L3Network l3Network, OrchestrationStatus status) {
        L3Network copiedl3Network = l3Network.shallowCopyId();

        copiedl3Network.setOrchestrationStatus(status);
        l3Network.setOrchestrationStatus(status);
        aaiNetworkResources.updateNetwork(copiedl3Network);

        List<Subnet> subnets = l3Network.getSubnets();
        if (subnets != null) {
            for (Subnet subnet : subnets) {
                Subnet copiedSubnet = subnet.shallowCopyId();
                copiedSubnet.setOrchestrationStatus(status);
                aaiNetworkResources.updateSubnet(copiedl3Network, copiedSubnet);
            }
        }
    }

}