Date: Sun, 11 Dec 2016 06:27:53 +0000 (UTC) From: Roman Bogorodskiy <novel@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r428334 - in head/devel/py-os-brick: . files Message-ID: <201612110627.uBB6RraO077735@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: novel Date: Sun Dec 11 06:27:52 2016 New Revision: 428334 URL: https://svnweb.freebsd.org/changeset/ports/428334 Log: devel/py-os-brick: add NFS support - Add initial NFS support through third party patches - Bump PORTREVISION PR: 215156 Submitted by: maintainer Added: head/devel/py-os-brick/files/ head/devel/py-os-brick/files/01-os-type.patch (contents, props changed) head/devel/py-os-brick/files/02-nfs.patch (contents, props changed) Modified: head/devel/py-os-brick/Makefile head/devel/py-os-brick/pkg-message Modified: head/devel/py-os-brick/Makefile ============================================================================== --- head/devel/py-os-brick/Makefile Sun Dec 11 06:18:27 2016 (r428333) +++ head/devel/py-os-brick/Makefile Sun Dec 11 06:27:52 2016 (r428334) @@ -3,6 +3,7 @@ PORTNAME= os-brick PORTVERSION= 1.8.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -30,6 +31,9 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}os-w NO_ARCH= yes +EXTRA_PATCHES= ${FILESDIR}/01-os-type.patch:-p1 \ + ${FILESDIR}/02-nfs.patch:-p1 + USES= python USE_PYTHON= autoplist distutils Added: head/devel/py-os-brick/files/01-os-type.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-os-brick/files/01-os-type.patch Sun Dec 11 06:27:52 2016 (r428334) @@ -0,0 +1,47 @@ +From b2edffa81edb25202ec6ed08d131b8fa4153a1d5 Mon Sep 17 00:00:00 2001 +From: Alexander Nusov <alexander.nusov@nfvexpress.com> +Date: Thu, 8 Dec 2016 16:26:21 +0300 +Subject: [PATCH] add support for freebsd os + +--- + os_brick/initiator/__init__.py | 1 + + os_brick/initiator/connector.py | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/os_brick/initiator/__init__.py b/os_brick/initiator/__init__.py +index 95e0b10..aa91615 100644 +--- a/os_brick/initiator/__init__.py ++++ b/os_brick/initiator/__init__.py +@@ -34,6 +34,7 @@ PLATFORM_S390 = 'S390' + OS_TYPE_ALL = 'ALL' + OS_TYPE_LINUX = 'LINUX' + OS_TYPE_WINDOWS = 'WIN' ++OS_TYPE_FREEBSD = 'FREEBSD' + + S390X = "s390x" + S390 = "s390" +diff --git a/os_brick/initiator/connector.py b/os_brick/initiator/connector.py +index 86adfa8..989b8d6 100644 +--- a/os_brick/initiator/connector.py ++++ b/os_brick/initiator/connector.py +@@ -51,6 +51,7 @@ PLATFORM_S390 = 'S390' + OS_TYPE_ALL = 'ALL' + OS_TYPE_LINUX = 'LINUX' + OS_TYPE_WINDOWS = 'WIN' ++OS_TYPE_FREEBSD = 'FREEBSD' + + S390X = "s390x" + S390 = "s390" +@@ -204,6 +205,9 @@ def get_connector_properties(root_helper, my_ip, multipath, enforce_multipath, + props['ip'] = my_ip + props['host'] = host if host else socket.gethostname() + ++ if sys.platform.startswith('freebsd'): ++ props['os_type'] = OS_TYPE_FREEBSD ++ + for item in connector_list: + connector = importutils.import_class(item) + +-- +2.8.1 + Added: head/devel/py-os-brick/files/02-nfs.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-os-brick/files/02-nfs.patch Sun Dec 11 06:27:52 2016 (r428334) @@ -0,0 +1,35 @@ +From fe3bf36779f577ef737108eb1d30b46a75fa4748 Mon Sep 17 00:00:00 2001 +From: Alexander Nusov <alexander.nusov@nfvexpress.com> +Date: Thu, 8 Dec 2016 16:27:57 +0300 +Subject: [PATCH] initial NFS support + +--- + os_brick/initiator/connectors/remotefs.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/os_brick/initiator/connectors/remotefs.py b/os_brick/initiator/connectors/remotefs.py +index 50f11c1..f22b652 100644 +--- a/os_brick/initiator/connectors/remotefs.py ++++ b/os_brick/initiator/connectors/remotefs.py +@@ -26,6 +26,8 @@ LOG = logging.getLogger(__name__) + class RemoteFsConnector(base.BaseLinuxConnector): + """Connector class to attach/detach NFS and GlusterFS volumes.""" + ++ os_type = initiator.OS_TYPE_FREEBSD ++ + def __init__(self, mount_type, root_helper, driver=None, + execute=None, + device_scan_attempts=initiator.DEVICE_SCAN_ATTEMPTS_DEFAULT, +@@ -35,8 +37,7 @@ class RemoteFsConnector(base.BaseLinuxConnector): + mount_type_lower = mount_type.lower() + if conn: + mount_point_base = conn.get('mount_point_base') +- if mount_type_lower in ('nfs', 'glusterfs', 'scality', +- 'quobyte', 'vzstorage'): ++ if mount_type_lower in ('nfs',): + kwargs[mount_type_lower + '_mount_point_base'] = ( + kwargs.get(mount_type_lower + '_mount_point_base') or + mount_point_base) +-- +2.8.1 + Modified: head/devel/py-os-brick/pkg-message ============================================================================== --- head/devel/py-os-brick/pkg-message Sun Dec 11 06:18:27 2016 (r428333) +++ head/devel/py-os-brick/pkg-message Sun Dec 11 06:27:52 2016 (r428334) @@ -1,2 +1,5 @@ Please note that this is a development version. -Mounting cinder volumes doesn't work. +Only initial NFS support was added. + +Enable NFS client in rc.conf +# sysrc nfs_client_enable="YES"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612110627.uBB6RraO077735>