import templates.build_debianfiles as build_debfiles
# Common paths used in this script
-# This file is assumed to be in the root of the .deb build logic's dir structure
+# This file is assumed to be in the root of the .deb build logic's dir
+# structure
project_root = os.path.dirname(os.path.abspath(__file__))
# Cache directory for OpenDaylight's release tarball
# Build debian package
os.chdir(odl_dir_path)
- subprocess.call(["dpkg-buildpackage", "-us -uc -b", odl_dir_path], shell=True)
+ subprocess.call(["dpkg-buildpackage", "-us -uc -b",
+ odl_dir_path], shell=True)
# Install opendaylight's dependencies
control_file_path = os.path.join(odl_dir_path, "debian/control")
nargs="*", help="Deb version(s) to build"
)
new_build_group = parser.add_argument_group("New build")
- new_build_group.add_argument("--major", help="Major (element) version to build")
+ new_build_group.add_argument(
+ "--major", help="Major (element) version to build")
new_build_group.add_argument("--minor", help="Minor (SR) version to build")
new_build_group.add_argument("--patch", help="Patch version to build")
new_build_group.add_argument("--deb", help="Deb version to build")
- new_build_group.add_argument("--sysd_commit", help="Version of ODL unitfile to package")
+ new_build_group.add_argument(
+ "--sysd_commit", help="Version of ODL unitfile to package")
new_build_group.add_argument("--codename", help="Codename for ODL version")
- new_build_group.add_argument("--download_url", help="Tarball to repackage into .deb")
- new_build_group.add_argument("--java_version", help="Java dependency for the ODL release")
- new_build_group.add_argument("--changelog_date", help="Date this .deb was defined")
- new_build_group.add_argument("--changelog_time", help="Time this .deb was defined")
- new_build_group.add_argument("--changelog_name", help="Name of person who defined .deb")
- new_build_group.add_argument("--changelog_email", help="Email of person who defined .deb")
+ new_build_group.add_argument(
+ "--download_url", help="Tarball to repackage into .deb")
+ new_build_group.add_argument(
+ "--java_version", help="Java dependency for the ODL release")
+ new_build_group.add_argument(
+ "--changelog_date", help="Date this .deb was defined")
+ new_build_group.add_argument(
+ "--changelog_time", help="Time this .deb was defined")
+ new_build_group.add_argument(
+ "--changelog_name", help="Name of person who defined .deb")
+ new_build_group.add_argument(
+ "--changelog_email", help="Email of person who defined .deb")
# Print help if no arguments are given
if len(sys.argv) == 1:
"opendaylight.postrm", "opendaylight.postinst",
"opendaylight.upstart"]
-# Path to the directory that contains this file is assumed to be the debian templates dir
+# Path to the directory that contains this file is assumed to be the
+# debian templates dir
templates_dir = os.path.dirname(os.path.abspath(__file__))
# Create the Jinja2 Environment
env = Environment(loader=FileSystemLoader(templates_dir))
-# Python string Template, specialized into an Opendaylight directory name per-build
+# Python string Template, specialized into an Opendaylight directory name
+# per-build
odl_dir_template = Template("opendaylight/opendaylight-$version_major.$version_minor."
"$version_patch-$pkg_version/")
odl_deb_template = Template("opendaylight/opendaylight_$version_major.$version_minor."
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
+ # The paper size ('letterpaper' or 'a4paper').
+ #'papersize': 'letterpaper',
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
+ # The font size ('10pt', '11pt' or '12pt').
+ #'pointsize': '10pt',
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+ # Additional stuff for the LaTeX preamble.
+ #'preamble': '',
-# Latex figure (float) alignment
-#'figure_align': 'htbp',
+ # Latex figure (float) alignment
+ #'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
nargs="*", help="RPM version(s) to build"
)
new_build_group = parser.add_argument_group("New build")
- new_build_group.add_argument("--major", help="Major (element) version to build")
+ new_build_group.add_argument(
+ "--major", help="Major (element) version to build")
new_build_group.add_argument("--minor", help="Minor (SR) version to build")
new_build_group.add_argument("--patch", help="Patch version to build")
new_build_group.add_argument("--rpm", help="RPM version to build")
- new_build_group.add_argument("--sysd_commit", help="Version of ODL unitfile to package")
+ new_build_group.add_argument(
+ "--sysd_commit", help="Version of ODL unitfile to package")
new_build_group.add_argument("--codename", help="Codename for ODL version")
- new_build_group.add_argument("--download_url", help="Tarball to repackage into RPM")
- new_build_group.add_argument("--changelog_date", help="Date this RPM was defined")
- new_build_group.add_argument("--changelog_name", help="Name of person who defined RPM")
- new_build_group.add_argument("--changelog_email", help="Email of person who defined RPM")
+ new_build_group.add_argument(
+ "--download_url", help="Tarball to repackage into RPM")
+ new_build_group.add_argument(
+ "--changelog_date", help="Date this RPM was defined")
+ new_build_group.add_argument(
+ "--changelog_name", help="Name of person who defined RPM")
+ new_build_group.add_argument(
+ "--changelog_email", help="Email of person who defined RPM")
# Print help if no arguments are given
if len(sys.argv) == 1:
class SingleSwitchTopo(Topo):
"""Single switch connected to n hosts."""
+
def build(self, n=2):
switch = self.addSwitch("s1")
# Python's range(N) generates 0..N-1
"""Create and test a simple network."""
topo = SingleSwitchTopo(n=4)
net = Mininet(topo=topo, controller=None)
- net.addController("c0", controller=RemoteController, ip="127.0.0.1", port=6633)
+ net.addController("c0", controller=RemoteController,
+ ip="127.0.0.1", port=6633)
net.start()
time.sleep(10)
print "Testing network connectivity"