]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
fix some pylint issues
authorYing Liu <yinliu2@cisco.com>
Thu, 18 Aug 2011 00:15:21 +0000 (17:15 -0700)
committerYing Liu <yinliu2@cisco.com>
Thu, 18 Aug 2011 00:15:21 +0000 (17:15 -0700)
extensions/_credential_view.py
extensions/_exceptions.py
extensions/_faults.py
extensions/_novatenant_view.py
extensions/_pprofiles.py
extensions/_qos_view.py
extensions/credential.py
extensions/novatenant.py
extensions/portprofile.py
extensions/qos.py
quantum/plugins.ini

index e324d3fc3215ca6bc6bb60a07598acb7e5478f36..062e8fa934d911425d0651c5a9dfc323f052428b 100644 (file)
@@ -1,3 +1,23 @@
+"""
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+#
+# Copyright 2011 Cisco Systems, Inc.  All rights reserved.
+#
+#    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.
+#
+# @author: Ying Liu, Cisco Systems, Inc.
+#
+"""
 def get_view_builder(req):
     base_url = req.application_url
     return ViewBuilder(base_url)
index 5ae8850f542ed12a7a0161be7de5525966019125..99bc55da11bae35ecde5300ecd11049cdfab1994 100644 (file)
@@ -1,3 +1,4 @@
+"""
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 #
 # Copyright 2011 Cisco Systems, Inc.  All rights reserved.
@@ -16,6 +17,7 @@
 #
 # @author: Ying Liu, Cisco Systems, Inc.
 #
+"""
 import logging
 
 
index 95ee9aed65c5c9ce17773a6c1b35a70380d06fb1..51866d5bc9fa66f579aacc49feaebf179e546332 100644 (file)
@@ -1,3 +1,4 @@
+"""
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 #
 # Copyright 2011 Cisco Systems, Inc.  All rights reserved.
@@ -16,6 +17,7 @@
 #
 # @author: Ying Liu, Cisco Systems, Inc.
 #
+"""
 import webob.dec
 import webob.exc
 
index 3a1b3f8ca98f67b11b84909cf014352de2baa0ed..bcfe1f476b7ac77c54edc5c5f5eb4f6831c98ece 100644 (file)
@@ -1,8 +1,23 @@
-
-
-import os
-
-
+"""
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+#
+# Copyright 2011 Cisco Systems, Inc.  All rights reserved.
+#
+#    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.
+#
+# @author: Ying Liu, Cisco Systems, Inc.
+#
+"""
 def get_view_builder(req):
     base_url = req.application_url
     return ViewBuilder(base_url)
index 997cb26e2a10f5500dab27a7029fa93e6dcd7198..da541274f9fe7dfa14305474c8f72004e2376dde 100644 (file)
@@ -1,3 +1,23 @@
+"""
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+#
+# Copyright 2011 Cisco Systems, Inc.  All rights reserved.
+#
+#    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.
+#
+# @author: Ying Liu, Cisco Systems, Inc.
+#
+"""
 def get_view_builder(req):
     base_url = req.application_url
     return ViewBuilder(base_url)
index 877d82d0f44585c6d98bf64f6081273fa3aaf581..63fc9f3a07904a5d554b96319ba5b0a730ef6177 100644 (file)
@@ -1,3 +1,23 @@
+"""
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+#
+# Copyright 2011 Cisco Systems, Inc.  All rights reserved.
+#
+#    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.
+#
+# @author: Ying Liu, Cisco Systems, Inc.
+#
+"""
 def get_view_builder(req):
     base_url = req.application_url
     return ViewBuilder(base_url)
index 46f25b6f153f68d8cf3e6dbb05433160c9f03ca4..782fddaaddc019a8ead1bbebd6284657caf0fda3 100644 (file)
@@ -1,3 +1,4 @@
+"""
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 #
 # Copyright 2011 Cisco Systems, Inc.  All rights reserved.
@@ -16,7 +17,7 @@
 #
 # @author: Ying Liu, Cisco Systems, Inc.
 #
-
+"""
 import logging
 
 from webob import exc
index 91a48e8fd742ab1a06ed1267bf9eabc925e42898..9d37fe2ca459738997cea0f97d76820d1368d3ea 100644 (file)
@@ -1,7 +1,7 @@
+"""
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2011 OpenStack LLC.
-# All Rights Reserved.
+#
+# Copyright 2011 Cisco Systems, Inc.  All rights reserved.
 #
 #    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
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
-
+#
+# @author: Ying Liu, Cisco Systems, Inc.
+#
+"""
 from webob import exc
 
 from extensions import _novatenant_view as novatenant_view
index 7cd2b3633d7e7716cc0e1893e0379972b22b27cc..fce20facd0d75d2767c8ca7e7f9f2157b6973c21 100644 (file)
@@ -1,7 +1,7 @@
+"""
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2011 OpenStack LLC.
-# All Rights Reserved.
+#
+# Copyright 2011 Cisco Systems, Inc.  All rights reserved.
 #
 #    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
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
+#
+# @author: Ying Liu, Cisco Systems, Inc.
+#
+"""
 
 from webob import exc
 
@@ -33,21 +37,27 @@ class Portprofile(object):
         pass
 
     def get_name(self):
+        """ Returns Ext Resource Name """
         return "Cisco Port Profile"
 
     def get_alias(self):
+        """ Returns Ext Resource alias """
         return "Cisco Port Profile"
 
     def get_description(self):
+        """ Returns Ext Resource Description """
         return "Portprofile include QoS information"
 
     def get_namespace(self):
+        """ Returns Ext Resource Namespace """
         return ""
 
     def get_updated(self):
+        """ Returns Ext Resource Updateed time """
         return "2011-07-23T13:25:27-06:00"
 
     def get_resources(self):
+        """ Returns all defined resources """
         parent_resource = dict(member_name="tenant", 
                                collection_name="extensions/csco/tenants")
         member_actions = {'associate_portprofile': "PUT",
@@ -61,7 +71,7 @@ class Portprofile(object):
 class PortprofilesController(common.QuantumController):
     """ portprofile API controller
         based on QuantumController """
-
+        
     _portprofile_ops_param_list = [{
         'param-name': 'portprofile_name',
         'required': True}, {
@@ -83,9 +93,10 @@ class PortprofilesController(common.QuantumController):
             },
         },
     }
-
+    
     def __init__(self, plugin):
         self._resource_name = 'portprofile'
+        self._plugin = plugin
         super(PortprofilesController, self).__init__(plugin)
              
     def index(self, request, tenant_id):
@@ -160,6 +171,7 @@ class PortprofilesController(common.QuantumController):
          
     #added for cisco's extension
     def associate_portprofile(self, request, tenant_id, id):
+        """ associate a portprofile to the port """
         content_type = request.best_match_content_type()
         print "Content type:%s" % content_type
         
@@ -184,6 +196,7 @@ class PortprofilesController(common.QuantumController):
         
      #added for Cisco extension
     def disassociate_portprofile(self, request, tenant_id, id):
+        """ Disassociate a portprofile from a port """
         content_type = request.best_match_content_type()
         print "Content type:%s" % content_type
         
index 5351cc00b1562128ff449b8ccc1ea13054a534aa..777883d8cf1002d8df3ace5b66c69ed5df3a76ed 100644 (file)
@@ -1,3 +1,4 @@
+"""
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
 #
 # Copyright 2011 Cisco Systems, Inc.  All rights reserved.
@@ -16,7 +17,7 @@
 #
 # @author: Ying Liu, Cisco Systems, Inc.
 #
-
+"""
 import logging
 
 from webob import exc
index 58db5dbc14fca1d2c80793ddb1272a9aa933d203..27c13c73f3ee853bdb65a0e52407557389007e44 100644 (file)
@@ -1,4 +1,4 @@
 [PLUGIN]
-provider = quantum.plugins.cisco.l2network_plugin.L2Network
-#provider = quantum.plugins.cisco.CiscoPlugin.CiscoPaloPlugin2
+#provider = quantum.plugins.cisco.l2network_plugin.L2Network
+provider = quantum.plugins.cisco.CiscoPlugin.CiscoPaloPlugin2
 #provider = quantum.plugins.SamplePlugin.FakePlugin