Skip to content

Commit

Permalink
more use full path in initial import conversions rockstor#2564
Browse files Browse the repository at this point in the history
Python 3 has more stringent import path requirements.
  • Loading branch information
phillxnet committed Jun 2, 2023
1 parent 7f69ef2 commit 6ab781d
Show file tree
Hide file tree
Showing 57 changed files with 153 additions and 146 deletions.
2 changes: 1 addition & 1 deletion src/rockstor/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from api_wrapper import APIWrapper # noqa F401
from cli.api_wrapper import APIWrapper # noqa F401
2 changes: 1 addition & 1 deletion src/rockstor/cli/rest_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import base64
from storageadmin.exceptions import RockStorAPIException
from functools import wraps
from base_console import BaseConsole
from cli.base_console import BaseConsole
from storageadmin.models import OauthApp
from django.conf import settings

Expand Down
4 changes: 2 additions & 2 deletions src/rockstor/rest_framework_custom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from generic_view import GenericView # noqa F401
from renderers import IgnoreClient # noqa F401
from rest_framework_custom.generic_view import GenericView # noqa F401
from rest_framework_custom.renderers import IgnoreClient # noqa F401
2 changes: 1 addition & 1 deletion src/rockstor/rest_framework_custom/generic_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SessionAuthentication,)
from storageadmin.auth import DigestAuthentication
from rest_framework.permissions import IsAuthenticated
from oauth_wrapper import RockstorOAuth2Authentication
from rest_framework_custom.oauth_wrapper import RockstorOAuth2Authentication
from contextlib import contextmanager
from storageadmin.util import handle_exception
from storageadmin.exceptions import RockStorAPIException
Expand Down
80 changes: 40 additions & 40 deletions src/rockstor/smart_manager/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,43 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from sprobes import SProbeView # noqa E501
from mem_info import MemInfoView # noqa E501
from net_stat import NetStatView # noqa E501
from disk_stat import DiskStatView # noqa E501
from nfs_distrib import NFSDistribView # noqa E501
from nfs_client_distrib import NFSDClientDistribView # noqa E501
from nfs_share_distrib import NFSDShareDistribView # noqa E501
from nfs_share_client_distrib import NFSDShareClientDistribView # noqa E501
from cpu_util import CPUMetricView # noqa E501
from nfs_uid_gid import NFSDUidGidDistributionView # noqa E501
from load_avg import LoadAvgView # noqa E501
from sprobe_metadata import SProbeMetadataView, SProbeMetadataDetailView # noqa E501
from base_service import BaseServiceView, BaseServiceDetailView # noqa E501
from nis_service import NISServiceView # noqa E501
from samba_service import SambaServiceView # noqa E501
from nfs_service import NFSServiceView # noqa E501
from replication import ReplicaListView, ReplicaDetailView # noqa E501
from replica_trail import ReplicaTrailListView, ReplicaTrailDetailView # noqa E501
from replication_service import ReplicationServiceView # noqa E501
from ntp_service import NTPServiceView # noqa E501
from ldap_service import LdapServiceView # noqa E501
from sftp_service import SFTPServiceView # noqa E501
from tasktypes import TaskTypeView # noqa E501
from task_scheduler import TaskSchedulerListView, TaskSchedulerDetailView # noqa E501
from task_log import TaskLogView # noqa E501
from replica_share import ReplicaShareListView, ReplicaShareDetailView # noqa E501
from receive_trail import ReceiveTrailListView, ReceiveTrailDetailView # noqa E501
from ts_service import TaskSchedulerServiceView # noqa E501
from dc_service import DataCollectorServiceView # noqa E501
from sm_service import ServiceMonitorView # noqa E501
from snmp_service import SNMPServiceView # noqa E501
from docker_service import DockerServiceView # noqa E501
from smartd_service import SMARTDServiceView # noqa E501
from nut_service import NUTServiceView # noqa E501
from active_directory import ActiveDirectoryServiceView # noqa E501
from receiver_pools import ReceiverPoolListView # noqa E501
from ztaskd_service import ZTaskdServiceView # noqa E501
from bootstrap_service import BootstrapServiceView # noqa E501
from shellinaboxd_service import ShellInABoxServiceView # noqa E501
from rockstor_service import RockstorServiceView # noqa E501
from smart_manager.views.sprobes import SProbeView # noqa E501
from smart_manager.views.mem_info import MemInfoView # noqa E501
from smart_manager.views.net_stat import NetStatView # noqa E501
from smart_manager.views.disk_stat import DiskStatView # noqa E501
from smart_manager.views.nfs_distrib import NFSDistribView # noqa E501
from smart_manager.views.nfs_client_distrib import NFSDClientDistribView # noqa E501
from smart_manager.views.nfs_share_distrib import NFSDShareDistribView # noqa E501
from smart_manager.views.nfs_share_client_distrib import NFSDShareClientDistribView # noqa E501
from smart_manager.views.cpu_util import CPUMetricView # noqa E501
from smart_manager.views.nfs_uid_gid import NFSDUidGidDistributionView # noqa E501
from smart_manager.views.load_avg import LoadAvgView # noqa E501
from smart_manager.views.sprobe_metadata import SProbeMetadataView, SProbeMetadataDetailView # noqa E501
from smart_manager.views.base_service import BaseServiceView, BaseServiceDetailView # noqa E501
from smart_manager.views.nis_service import NISServiceView # noqa E501
from smart_manager.views.samba_service import SambaServiceView # noqa E501
from smart_manager.views.nfs_service import NFSServiceView # noqa E501
from smart_manager.views.replication import ReplicaListView, ReplicaDetailView # noqa E501
from smart_manager.views.replica_trail import ReplicaTrailListView, ReplicaTrailDetailView # noqa E501
from smart_manager.views.replication_service import ReplicationServiceView # noqa E501
from smart_manager.views.ntp_service import NTPServiceView # noqa E501
from smart_manager.views.ldap_service import LdapServiceView # noqa E501
from smart_manager.views.sftp_service import SFTPServiceView # noqa E501
from smart_manager.views.tasktypes import TaskTypeView # noqa E501
from smart_manager.views.task_scheduler import TaskSchedulerListView, TaskSchedulerDetailView # noqa E501
from smart_manager.views.task_log import TaskLogView # noqa E501
from smart_manager.views.replica_share import ReplicaShareListView, ReplicaShareDetailView # noqa E501
from smart_manager.views.receive_trail import ReceiveTrailListView, ReceiveTrailDetailView # noqa E501
from smart_manager.views.ts_service import TaskSchedulerServiceView # noqa E501
from smart_manager.views.dc_service import DataCollectorServiceView # noqa E501
from smart_manager.views.sm_service import ServiceMonitorView # noqa E501
from smart_manager.views.snmp_service import SNMPServiceView # noqa E501
from smart_manager.views.docker_service import DockerServiceView # noqa E501
from smart_manager.views.smartd_service import SMARTDServiceView # noqa E501
from smart_manager.views.nut_service import NUTServiceView # noqa E501
from smart_manager.views.active_directory import ActiveDirectoryServiceView # noqa E501
from smart_manager.views.receiver_pools import ReceiverPoolListView # noqa E501
from smart_manager.views.ztaskd_service import ZTaskdServiceView # noqa E501
from smart_manager.views.bootstrap_service import BootstrapServiceView # noqa E501
from smart_manager.views.shellinaboxd_service import ShellInABoxServiceView # noqa E501
from smart_manager.views.rockstor_service import RockstorServiceView # noqa E501
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/active_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from django.db import transaction
from rest_framework.response import Response

from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from storageadmin.util import handle_exception
from system.directory_services import (
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/bootstrap_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from rest_framework.response import Response
from system.services import systemctl
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
import logging

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/cpu_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from smart_manager.models import CPUMetric
from smart_manager.serializers import CPUMetricSerializer
from generic_sprobe import GenericSProbeView
from smart_manager.views.generic_sprobe import GenericSProbeView


class CPUMetricView(GenericSProbeView):
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/dc_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from storageadmin.util import handle_exception
from system.services import superctl
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service


Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/disk_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from smart_manager.models import DiskStat
from storageadmin.models import Disk
from smart_manager.serializers import DiskStatSerializer
from generic_sprobe import GenericSProbeView
from smart_manager.views.generic_sprobe import GenericSProbeView


class DiskStatView(GenericSProbeView):
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/docker_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from django.db import transaction
from rest_framework.response import Response

from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from fs.btrfs import mount_share
from smart_manager.models import Service
from storageadmin.models import Share
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/ldap_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from django.db import transaction
from rest_framework.response import Response

from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from storageadmin.util import handle_exception
from system.directory_services import (
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/mem_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from smart_manager.models import MemInfo
from smart_manager.serializers import MemInfoSerializer
from generic_sprobe import GenericSProbeView
from smart_manager.views.generic_sprobe import GenericSProbeView


class MemInfoView(GenericSProbeView):
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/net_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from smart_manager.models import NetStat
from smart_manager.serializers import NetStatSerializer
from generic_sprobe import GenericSProbeView
from smart_manager.views.generic_sprobe import GenericSProbeView


class NetStatView(GenericSProbeView):
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/nfs_client_distrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from advanced_sprobe import AdvancedSProbeView
from smart_manager.views.advanced_sprobe import AdvancedSProbeView
from smart_manager.models import NFSDClientDistribution
from smart_manager.serializers import NFSDClientDistributionSerializer

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/nfs_distrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from advanced_sprobe import AdvancedSProbeView
from smart_manager.views.advanced_sprobe import AdvancedSProbeView
from smart_manager.models import NFSDCallDistribution
from smart_manager.serializers import NFSDCallDistributionSerializer

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/nfs_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from storageadmin.util import handle_exception
from system.services import systemctl
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service

import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from advanced_sprobe import AdvancedSProbeView
from smart_manager.views.advanced_sprobe import AdvancedSProbeView
from smart_manager.models import NFSDShareClientDistribution
from smart_manager.serializers import NFSDShareClientDistributionSerializer

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/nfs_share_distrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from advanced_sprobe import AdvancedSProbeView
from smart_manager.views.advanced_sprobe import AdvancedSProbeView
from smart_manager.models import NFSDShareDistribution
from smart_manager.serializers import NFSDShareDistributionSerializer

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/nfs_uid_gid.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from advanced_sprobe import AdvancedSProbeView
from smart_manager.views.advanced_sprobe import AdvancedSProbeView
from smart_manager.models import NFSDUidGidDistribution
from smart_manager.serializers import NFSDUidGidDistributionSerializer

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/nis_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from system.services import systemctl
from system.nis import configure_nis
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service

import logging
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/ntp_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from system.services import systemctl
from system.osi import run_command
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from django.conf import settings
import re
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/replication_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from storageadmin.util import handle_exception
from system.services import superctl
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from storageadmin.models import NetworkConnection

Expand Down
4 changes: 2 additions & 2 deletions src/rockstor/smart_manager/views/rockstor_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
from rest_framework.response import Response
from storageadmin.util import handle_exception
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from storageadmin.models import NetworkConnection
import ztask_helpers
from smart_manager.views import ztask_helpers


import logging
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/samba_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from django.db import transaction
from rest_framework.response import Response

from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from smart_manager.serializers import ServiceStatusSerializer
from storageadmin.util import handle_exception
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/sftp_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from django.db import transaction
from rest_framework.response import Response

from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from storageadmin.util import handle_exception
from system.ssh import toggle_sftp_service
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/shellinaboxd_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
from rest_framework.response import Response
from system.services import systemctl
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
from system.shell import update_shell_config, restart_shell
import json
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/sm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from storageadmin.util import handle_exception
from system.services import superctl
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
import logging

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/smartd_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from system.services import systemctl
from system.pkg_mgmt import install_pkg
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
import os
from system import smart
from smart_manager.models import Service
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/snmp_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from storageadmin.util import handle_exception
from system.services import systemctl
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from system.snmp import configure_snmp
from smart_manager.models import Service

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/sprobe_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from smart_manager.serializers import SProbeSerializer
from rest_framework.response import Response
from django.conf import settings
from advanced_sprobe import AdvancedSProbeView
from smart_manager.views.advanced_sprobe import AdvancedSProbeView


class SProbeMetadataView(AdvancedSProbeView):
Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/ts_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from storageadmin.util import handle_exception
from system.services import superctl
from django.db import transaction
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service
import logging

Expand Down
2 changes: 1 addition & 1 deletion src/rockstor/smart_manager/views/ztaskd_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from rest_framework.response import Response
from storageadmin.util import handle_exception
from system.services import superctl
from base_service import BaseServiceDetailView
from smart_manager.views.base_service import BaseServiceDetailView
from smart_manager.models import Service

import logging
Expand Down
Loading

0 comments on commit 6ab781d

Please sign in to comment.