def apply_operation_on_service(self, operation):
        service = self.params.get("service")
        if service == "firewall":
            service = FirewallService(self.get_gateway())

        if service == "nat_rule":
            service = NatRuleService(self.get_gateway())

        return service.manage_operations(operation=operation)
    def update_service(self):
        service = self.params.get("service")
        service_params = self.params.get("service_params")
        if service == "firewall":
            service = FirewallService(self.get_gateway(), service_params)

        if service == "nat_rule":
            service = NatRuleService(self.get_gateway(), service_params)

        return service.manage_states(state="update")
Exemplo n.º 3
0
    def apply_operation_on_service(self, operation):
        service = self.params.get("service")
        if service == "firewall":
            service = FirewallService(self.get_gateway())

        if service == "nat_rule":
            service = NatRuleService(self.get_gateway())

        if service == "static_route":
            service = StaticRoutes(self.get_gateway())

        if service == "ssl_certificates":
            service = SSLCertificates(self.get_gateway())

        return service.manage_operations(operation=operation)
Exemplo n.º 4
0
    def delete_service(self):
        service = self.params.get("service")
        service_params = self.params.get("service_params")
        if service == "firewall":
            service = FirewallService(self.get_gateway(), service_params)

        if service == "nat_rule":
            service = NatRuleService(self.get_gateway(), service_params)

        if service == "static_route":
            service = StaticRoutes(self.get_gateway(), service_params)

        if service == "ssl_certificates":
            service = SSLCertificates(self.get_gateway(), service_params)

        return service.manage_states(state="absent")