/* -------------------------------------------------------------------------- */ /* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* not use this file except in compliance with the License. You may obtain */ /* a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ /* See the License for the specific language governing permissions and */ /* limitations under the License. */ /* -------------------------------------------------------------------------- */ #ifndef REQUEST_MANAGER_CLONE_H #define REQUEST_MANAGER_CLONE_H #include "Request.h" #include "RequestManagerVMTemplate.h" #include "Nebula.h" #include "DocumentPool.h" #include "SecurityGroupPool.h" #include "VNTemplatePool.h" /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ class RequestManagerClone: public Request { protected: RequestManagerClone(const std::string& method_name, const std::string& help, const std::string& params = "A:sis"): Request(method_name,params,help){}; ~RequestManagerClone(){}; /* -------------------------------------------------------------------- */ void request_execute(xmlrpc_c::paramList const& _paramList, RequestAttributes& att) override; /* -------------------------------------------------------------------- */ /* Especialization Functions for specific Clone actions */ /* -------------------------------------------------------------------- */ /** * Function to clone the object */ virtual ErrorCode clone(int source_id, const std::string &name, int &new_id, bool recursive, const std::string& s_uattr, RequestAttributes& att); /** * Function to clone the base template */ virtual std::unique_ptr