blob: 3dd2f17ec608356b36b65a8116b83173c138c127 [file] [log] [blame]
Khen Nursimulua7b842a2016-12-03 23:28:42 -05001#!/usr/bin/env python
2#
3# Copyright 2016 the original author or authors.
4#
5# Code adapted from https://github.com/choppsv1/netconf
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19
20from rpc_response import RpcResponse
21
22class Rpc(object):
23 def __init__(self,rpc_request, rpc_method, session):
24 self.rpc_request = rpc_request
25 self.rpc_method = rpc_method
26 self.rpc_response = RpcResponse()
27 self.session = session
28
29 def execute(self):
30 """ run the command - returns a OperationResponse """
31 pass
32
33 def set_rpc_response(self):
34 self.rpc_response = RpcResponse()
35
36 def _validate_parameters(self, rpc_request):
37 """Sets and validates the node as well"""
38 pass