-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intergrated ESI, allowing users to allocate ESI Network quotas
- Loading branch information
Showing
14 changed files
with
340 additions
and
130 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
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
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
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,29 @@ | ||
import logging | ||
import functools | ||
import os | ||
|
||
from keystoneauth1.identity import v3 | ||
from keystoneauth1 import session | ||
|
||
from coldfront_plugin_cloud import attributes, utils | ||
from coldfront_plugin_cloud.openstack import OpenStackResourceAllocator | ||
|
||
class ESIResourceAllocator(OpenStackResourceAllocator): | ||
|
||
QUOTA_KEY_MAPPING = { | ||
'network': { | ||
'keys': { | ||
attributes.QUOTA_FLOATING_IPS: 'floatingip', | ||
attributes.QUOTA_NETWORKS: 'network' | ||
} | ||
} | ||
} | ||
|
||
QUOTA_KEY_MAPPING_ALL_KEYS = {quota_key: quota_name for k in QUOTA_KEY_MAPPING.values() for quota_key, quota_name in k['keys'].items()} | ||
|
||
resource_type = 'esi' | ||
|
||
def get_quota(self, project_id): | ||
quotas = dict() | ||
quotas = self._get_network_quota(quotas, project_id) | ||
return quotas |
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
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
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
Oops, something went wrong.