Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #299 from indigo-dc/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
micafer authored Oct 21, 2019
2 parents 61e6f4f + 7b54e61 commit 083c34b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion IM/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, auth_data):
self.auth_list = auth_data

for auth in self.auth_list:
if 'id' in auth:
if 'id' in auth and auth['id']:
pattern = re.compile(r'[a-zA-Z_.][\w\d_.-]*')
if not pattern.match(auth['id']):
raise Exception('Incorrect value in auth item id: %s' % auth['id'])
Expand Down
19 changes: 17 additions & 2 deletions doc/source/radl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ The supported features are:
manage the security in this network.
The default value is ``''``.

``router = <string>``
Add static routes in the network settings. Currently only supported in OpenStack,
GCE and AWS. The format is 'net_cidr, system_name' e.g. '10.1.0.0/16,front' to route
all the traffic to the net 10.1.0.0/16 through the front node, or '0.0.0.0/0,front' to
route all the traffic through the front node.
The default value is ``''``.

System Features
---------------

Expand Down Expand Up @@ -281,14 +288,17 @@ machine. The supported features are:
Set the source of the disk image. The URI designates the cloud provider:

* ``one://<server>:<port>/<image-id>``, for OpenNebula;
* ``ost://<server>:<port>/<ami-id>``, for OpenStack;
* ``one://<server>:<port>/<image-name>``, for OpenNebula;
* ``ost://<server>:<port>/<image-id>``, for OpenStack;
* ``aws://<region>/<ami-id>``, for Amazon Web Service;
* ``aws://<region>/<snapshot-id>``, for Amazon Web Service;
* ``aws://<region>/<snapshot-name>``, for Amazon Web Service;
* ``gce://<region>/<image-id>``, for Google Cloud;
* ``azr://<image-id>``, for Microsoft Azure Clasic;
* ``azr://<publisher>/<offer>/<sku>/<version>``, for Microsoft Azure;
* ``azr://[snapshots|disk]/<rgname>/<diskname>``, for Microsoft Azure;
* ``<fedcloud_endpoint_url>/<image_id>``, for FedCloud OCCI connector.
* ``appdb://<site_name>/<apc_name>?<vo_name>``, for FedCloud OCCI connector using AppDB info (from ver. 1.6.0).
* ``appdb://<site_name>/<apc_name>?<vo_name>``, for FedCloud OCCI or OpenStack connector using AppDB info (from vers. 1.6.0 and 1.8.6).
* ``docker://<docker_image>``, for Docker images.
* ``fbw://<fns_server>/<image-id>``, for FogBow images.

Expand Down Expand Up @@ -386,6 +396,11 @@ machine. The supported features are:
(using the git scheme in the URL) afther the string ``ansible.modules.``. Furthermore the
user can specify the rolename using a ``|`` afther the url, as shown in the example.

``nat_instance = yes|no``
Set that this instance will be used as a NAT router for a set of nodes.
It will configure the node to enable nat with the appropriate iptables rules
(experimental).

Disk Management
^^^^^^^^^^^^^^^

Expand Down
4 changes: 2 additions & 2 deletions test/unit/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def test_auth_read(self):

def test_get_auth(self):
auth_lines = ["""id = a1; type = InfrastructureManager; username = someuser; password = somepass """,
"""id = a2; type = VMRC; username = someuser; password = somepass; """]
"""id = ''; type = VMRC; username = someuser; password = somepass; """]
auth = Authentication(Authentication.read_auth_data(auth_lines))
auth_data = auth.getAuthInfoByID("a1")
self.assertEqual(auth_data, [{'id': 'a1', 'password': "somepass",
'type': 'InfrastructureManager', 'username': 'someuser'}])
auth_data = auth.getAuthInfo("VMRC")
self.assertEqual(auth_data, [{'id': 'a2', 'password': "somepass",
self.assertEqual(auth_data, [{'id': '', 'password': "somepass",
'type': 'VMRC', 'username': 'someuser'}])

auth_lines = ["""id = 1a; type = InfrastructureManager; username = someuser; password = somepass """]
Expand Down

0 comments on commit 083c34b

Please sign in to comment.