Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from coldfront.core.resource.models import Resource, ResourceType
from coldfront.core.allocation.models import Allocation, AllocationStatusChoice

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from coldfront.core.resource.models import Resource, ResourceType
from coldfront.core.allocation.models import Allocation, AllocationStatusChoice


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from coldfront.core.resource.models import Resource, ResourceType
from coldfront.core.allocation.models import Allocation, AllocationStatusChoice


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import logging


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -56,7 +56,7 @@ def _load_fos_map(mapping_csv):
def _validate_old_fos(mapping_dict):
for old_fos_name in list(mapping_dict.keys()):
if not FieldOfScience.objects.filter(description=old_fos_name):
logger.warn(f"Old field of science {old_fos_name} does not exist")
logger.warning(f"Old field of science {old_fos_name} does not exist")

@staticmethod
def _create_new_fos(new_fos_set):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from coldfront_plugin_cloud import attributes

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
)
from keystoneauth1.exceptions import http


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

STATES_TO_VALIDATE = ["Active", "Active (Needs Renewal)"]
Expand Down Expand Up @@ -43,7 +43,7 @@ def sync_users(project_id, allocation, allocator, apply):
for coldfront_user in coldfront_users:
if coldfront_user.user.username not in allocation_users:
failed_validation = True
logger.warn(
logger.warning(
f"{coldfront_user.user.username} is not part of {project_id}"
)
if apply:
Expand All @@ -56,7 +56,7 @@ def sync_users(project_id, allocation, allocator, apply):
for allocation_user in allocation_users:
if allocation_user not in users:
failed_validation = True
logger.warn(
logger.warning(
f"{allocation_user} exists in the resource {project_id} but not in coldfront"
)
if apply:
Expand Down Expand Up @@ -97,10 +97,10 @@ def check_institution_specific_code(self, allocation, apply):
if not isc:
alloc_str = f'{allocation.pk} of project "{allocation.project.title}"'
msg = f'Attribute "{attr}" missing on allocation {alloc_str}'
logger.warn(msg)
logger.warning(msg)
if apply:
utils.set_attribute_on_allocation(allocation, attr, "N/A")
logger.warn(f'Attribute "{attr}" added to allocation {alloc_str}')
logger.warning(f'Attribute "{attr}" added to allocation {alloc_str}')

def handle(self, *args, **options):
# Deal with Openstack and ESI resources
Expand Down