-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit to show the usage of neutronclient extension mechanism.
- Loading branch information
sayajirp
authored and
sayajirp
committed
Apr 13, 2015
0 parents
commit 5c06535
Showing
5 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# 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. | ||
|
||
import pbr.version | ||
|
||
|
||
__version__ = pbr.version.VersionInfo( | ||
'nuage_neutron').version_string() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright 2014 Alcatel-Lucent USA Inc. | ||
# | ||
# 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. | ||
# | ||
|
||
from neutronclient.common import extension | ||
|
||
class NetPartition(extension.NeutronClientExtension): | ||
resource = 'net_partition' | ||
resource_plural = '%ss' % resource | ||
object_path = '/%s' % 'net-partitions' | ||
resource_path = '/%s/%%s' % 'net-partitions' | ||
versions = ['2.0'] | ||
|
||
class NetPartitionList(extension.ClientExtensionList, NetPartition): | ||
shell_command = 'nuage-netpartition-list' | ||
list_columns = ['id', 'name'] | ||
pagination_support = True | ||
sorting_support = True | ||
|
||
class NetPartitionCreate(extension.ClientExtensionCreate, NetPartition): | ||
shell_command = 'nuage-netpartition-create' | ||
|
||
def add_known_arguments(self, parser): | ||
parser.add_argument( | ||
'name', metavar='name', | ||
help='Name of netpartition to create.') | ||
|
||
def args2body(self, parsed_args): | ||
body = {'net_partition': {'name': parsed_args.name}, } | ||
return body | ||
|
||
class NetPartitionDelete(extension.ClientExtensionDelete, NetPartition): | ||
shell_command = 'nuage-netpartition-delete' | ||
|
||
|
||
class NetPartitionShow(extension.ClientExtensionShow, NetPartition): | ||
shell_command = 'nuage-netpartition-show' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# The order of packages is significant, because pip processes them in the order | ||
# of appearance. Changing the order has an impact on the overall integration | ||
# process, which may cause wedges in the gate later. | ||
|
||
pbr>=0.6,!=0.7,<1.0 | ||
Babel>=1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[metadata] | ||
name = nuage-openstack-neutronclient | ||
summary = "Openstack Neutron Client for Nuage Networks" | ||
description-file = | ||
README.rst | ||
author = Alcatel-Lucent USA Inc | ||
author-email = [email protected] | ||
home-page = http://www.nuagenetworks.net | ||
classifier = | ||
Environment :: OpenStack | ||
Intended Audience :: Information Technology | ||
Intended Audience :: System Administrators | ||
License :: OSI Approved :: Apache Software License | ||
Operating System :: POSIX :: Linux | ||
Programming Language :: Python | ||
Programming Language :: Python :: 2 | ||
Programming Language :: Python :: 2.7 | ||
Programming Language :: Python :: 2.6 | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.3 | ||
Programming Language :: Python :: 3.4 | ||
|
||
[files] | ||
packages = | ||
nuage_openstack_neutronclient | ||
|
||
[build_sphinx] | ||
source-dir = doc/source | ||
build-dir = doc/build | ||
all_files = 1 | ||
|
||
[upload_sphinx] | ||
upload-dir = doc/build/html | ||
|
||
[compile_catalog] | ||
directory = nuage_openstack_neutronclient/locale | ||
domain = nuage-openstack-neutronclient | ||
|
||
[update_catalog] | ||
domain = nuage-openstack-neutronclient | ||
output_dir = nuage_openstack_neutronclient/locale | ||
input_file = nuage_openstack_neutronclient/locale/nuage-openstack-neutronclient.pot | ||
|
||
[extract_messages] | ||
keywords = _ gettext ngettext l_ lazy_gettext | ||
mapping_file = babel.cfg | ||
output_file = nuage_openstack_neutronclient/locale/nuage-openstack-neutronclient.pot | ||
|
||
[entry_points] | ||
neutronclient.extension = | ||
netpartition = nuage.netpartition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python | ||
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. | ||
# | ||
# 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. | ||
|
||
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT | ||
import setuptools | ||
|
||
# In python < 2.7.4, a lazy loading of package `pbr` will break | ||
# setuptools if some other modules registered functions in `atexit`. | ||
# solution from: http://bugs.python.org/issue15881#msg170215 | ||
try: | ||
import multiprocessing # noqa | ||
except ImportError: | ||
pass | ||
|
||
setuptools.setup( | ||
setup_requires=['pbr'], | ||
pbr=True) |