This commit consists of:
1) Ability for the netconf client to retrieve schemas metadata from
   the netconf server
2) Ability for the netconf server to retrieve specific yang schema from
   the netconf server
3) Netconf says Happy New Year 2017

Change-Id: I6552224707607ca6cc1397f2fbf193503bb116a3
diff --git a/netconf/nc_rpc/base/close_session.py b/netconf/nc_rpc/base/close_session.py
index 7e76b45..45a6cc2 100644
--- a/netconf/nc_rpc/base/close_session.py
+++ b/netconf/nc_rpc/base/close_session.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -24,8 +24,10 @@
 
 class CloseSession(Rpc):
 
-    def __init__(self, request, grpc_client, session):
-        super(CloseSession, self).__init__(request, grpc_client, session)
+    def __init__(self, request, request_xml, grpc_client, session,
+                 capabilities):
+        super(CloseSession, self).__init__(request, request_xml, grpc_client,
+                                           session)
         self._validate_parameters()
 
     def execute(self):
diff --git a/netconf/nc_rpc/base/commit.py b/netconf/nc_rpc/base/commit.py
index 06c1746..22a0e6a 100644
--- a/netconf/nc_rpc/base/commit.py
+++ b/netconf/nc_rpc/base/commit.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -24,8 +24,8 @@
 
 class Commit(Rpc):
 
-	def __init__(self, request, grpc_client, session):
-		super(Commit, self).__init__(request, grpc_client, session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(Commit, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
diff --git a/netconf/nc_rpc/base/copy_config.py b/netconf/nc_rpc/base/copy_config.py
index a59081d..1d96b76 100644
--- a/netconf/nc_rpc/base/copy_config.py
+++ b/netconf/nc_rpc/base/copy_config.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
 
 class CopyConfig(Rpc):
 
-	def __init__(self, request, grpc_client, session):
-		super(CopyConfig, self).__init__(request, grpc_client, session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(CopyConfig, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
diff --git a/netconf/nc_rpc/base/delete_config.py b/netconf/nc_rpc/base/delete_config.py
index 8ad5ea4..e21d2d4 100644
--- a/netconf/nc_rpc/base/delete_config.py
+++ b/netconf/nc_rpc/base/delete_config.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
 
 class DeleteConfig(Rpc):
 
-	def __init__(self, request, grpc_client, session):
-		super(DeleteConfig, self).__init__(request, grpc_client, session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(DeleteConfig, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
diff --git a/netconf/nc_rpc/base/discard_changes.py b/netconf/nc_rpc/base/discard_changes.py
index 961eea0..4b4b219 100644
--- a/netconf/nc_rpc/base/discard_changes.py
+++ b/netconf/nc_rpc/base/discard_changes.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
 
 class DiscardChanges(Rpc):
 
-	def __init__(self, request, grpc_client, session):
-		super(DiscardChanges, self).__init__(request, grpc_client, session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(DiscardChanges, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
diff --git a/netconf/nc_rpc/base/edit_config.py b/netconf/nc_rpc/base/edit_config.py
index 92fa085..0991c67 100644
--- a/netconf/nc_rpc/base/edit_config.py
+++ b/netconf/nc_rpc/base/edit_config.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
 
 class EditConfig(Rpc):
 
-	def __init__(self, request, grpc_client, session):
-		super(EditConfig, self).__init__(request, grpc_client, session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(EditConfig, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
diff --git a/netconf/nc_rpc/base/get.py b/netconf/nc_rpc/base/get.py
index 71449ad..d953b17 100644
--- a/netconf/nc_rpc/base/get.py
+++ b/netconf/nc_rpc/base/get.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,22 +14,18 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-from lxml import etree
 import structlog
 from netconf.nc_rpc.rpc import Rpc
 import netconf.nc_common.error as ncerror
-from netconf.constants import Constants as C
-from netconf.utils import filter_tag_match
 from twisted.internet.defer import inlineCallbacks, returnValue
 import dicttoxml
-from simplejson import dumps, load
 
 log = structlog.get_logger()
 
 
 class Get(Rpc):
-    def __init__(self, request, grpc_client, session):
-        super(Get, self).__init__(request, grpc_client, session)
+    def __init__(self, request, request_xml, grpc_client, session, capabilities):
+        super(Get, self).__init__(request, request_xml, grpc_client, session)
         self._validate_parameters()
 
     @inlineCallbacks
diff --git a/netconf/nc_rpc/base/get_config.py b/netconf/nc_rpc/base/get_config.py
index 2fb8ad0..e7ade72 100644
--- a/netconf/nc_rpc/base/get_config.py
+++ b/netconf/nc_rpc/base/get_config.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,20 +14,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-from lxml import etree
 import structlog
 from netconf.nc_rpc.rpc import Rpc
 import netconf.nc_common.error as ncerror
 from netconf.constants import Constants as C
-from netconf.utils import elm
-from netconf import NSMAP
 
 log = structlog.get_logger()
 
 class GetConfig(Rpc):
 
-	def __init__(self, request, grpc_client, session):
-		super(GetConfig, self).__init__(request, grpc_client, session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(GetConfig, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
@@ -47,17 +44,17 @@
 			self.rpc_response.node = ncerror.BadMsg(self.rpc_request)
 			return
 
-		self.source_param = self.rpc_method.find(C.NC_SOURCE, namespaces=NSMAP)
-		if self.source_param is None:
-			self.rpc_response.is_error = True
-			self.rpc_response.node = ncerror.MissingElement(
-				self.rpc_request, elm(C.NC_SOURCE))
-			return
+		self.source_param = self.rpc_method.find(C.NC_SOURCE, namespaces=C.NS_MAP)
+		# if self.source_param is None:
+		# 	self.rpc_response.is_error = True
+		# 	self.rpc_response.node = ncerror.MissingElement(
+		# 		self.rpc_request, elm(C.NC_SOURCE))
+		# 	return
 
 		self.filter_param = None
 		if paramslen == 2:
 			self.filter_param = self.rpc_method.find(C.NC_FILTER,
-												  namespaces=NSMAP)
+												  namespaces=C.NS_MAP)
 			if self.filter_param is None:
 				unknown_elm = self.params[0] if self.params[0] != \
 												self.source_param else \
diff --git a/netconf/nc_rpc/base/kill_session.py b/netconf/nc_rpc/base/kill_session.py
index 16461cd..e10f3a5 100644
--- a/netconf/nc_rpc/base/kill_session.py
+++ b/netconf/nc_rpc/base/kill_session.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -25,8 +25,8 @@
 
 class KillSession(Rpc):
 
-    def __init__(self, request, grpc_client, session):
-        super(KillSession, self).__init__(request, grpc_client, session)
+    def __init__(self, request, request_xml, grpc_client, session, capabilities):
+        super(KillSession, self).__init__(request, request_xml, grpc_client, session)
         self._validate_parameters()
 
     def execute(self):
diff --git a/netconf/nc_rpc/base/lock.py b/netconf/nc_rpc/base/lock.py
index 2f41e24..5a59376 100644
--- a/netconf/nc_rpc/base/lock.py
+++ b/netconf/nc_rpc/base/lock.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
 
 class Lock(Rpc):
 
-	def __init__(self, request, grpc_client, session):
-		super(Lock, self).__init__(request, grpc_client, session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(Lock, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
diff --git a/netconf/nc_rpc/base/unlock.py b/netconf/nc_rpc/base/unlock.py
index f9ef062..b5db7c1 100644
--- a/netconf/nc_rpc/base/unlock.py
+++ b/netconf/nc_rpc/base/unlock.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,9 +23,8 @@
 
 class UnLock(Rpc):
 
-	def __init__(self, rpc_request, rpc_method, grpc_client, session):
-		super(UnLock, self).__init__(rpc_request, rpc_method, grpc_client,
-									 session)
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
+		super(UnLock, self).__init__(request, request_xml, grpc_client, session)
 		self._validate_parameters()
 
 	def execute(self):
diff --git a/netconf/nc_rpc/base/validate.py b/netconf/nc_rpc/base/validate.py
index 8671b12..61e2f80 100644
--- a/netconf/nc_rpc/base/validate.py
+++ b/netconf/nc_rpc/base/validate.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2016 the original author or authors.
+# Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
 
 class Validate(Rpc):
 
-	def __init__(self, request, grpc_client, session):
+	def __init__(self, request, request_xml, grpc_client, session, capabilities):
 		super(Validate, self).__init__(request, grpc_client, session)
 		self._validate_parameters()