Leading dot in efs_facts.mountpoint (#35909)

* remove leading dot in efs_facts mountpoint

* remove leading dot in efs_facts mountpoint

* remove leading dot in efs.py

* introduce filesystem_address var in efs* modules and revert changes to mount_point
pull/43546/head
Rushan 6 years ago committed by ansibot
parent 01fb7ea150
commit c4591f0861

@ -135,10 +135,15 @@ life_cycle_state:
type: string type: string
sample: "creating, available, deleting, deleted" sample: "creating, available, deleting, deleted"
mount_point: mount_point:
description: url of file system description: url of file system with leading dot from the time when AWS EFS required to add a region suffix to the address
returned: always returned: always
type: string type: string
sample: ".fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/" sample: ".fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/"
filesystem_address:
description: url of file system valid for use with mount
returned: always
type: string
sample: "fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/"
mount_targets: mount_targets:
description: list of mount targets description: list of mount targets
returned: always returned: always
@ -252,10 +257,14 @@ class EFSConnection(object):
item['Name'] = item['CreationToken'] item['Name'] = item['CreationToken']
item['CreationTime'] = str(item['CreationTime']) item['CreationTime'] = str(item['CreationTime'])
""" """
Suffix of network path to be used as NFS device for mount. More detail here: In the time when MountPoint was introduced there was a need to add a suffix of network path before one could use it
AWS updated it and now there is no need to add a suffix. MountPoint is left for back-compatibility purpose
And new FilesystemAddress variable is introduced for direct use with other modules (e.g. mount)
AWS documentation is available here:
http://docs.aws.amazon.com/efs/latest/ug/gs-step-three-connect-to-ec2-instance.html http://docs.aws.amazon.com/efs/latest/ug/gs-step-three-connect-to-ec2-instance.html
""" """
item['MountPoint'] = '.%s.efs.%s.amazonaws.com:/' % (item['FileSystemId'], self.region) item['MountPoint'] = '.%s.efs.%s.amazonaws.com:/' % (item['FileSystemId'], self.region)
item['FilesystemAddress'] = '%s.efs.%s.amazonaws.com:/' % (item['FileSystemId'], self.region)
if 'Timestamp' in item['SizeInBytes']: if 'Timestamp' in item['SizeInBytes']:
item['SizeInBytes']['Timestamp'] = str(item['SizeInBytes']['Timestamp']) item['SizeInBytes']['Timestamp'] = str(item['SizeInBytes']['Timestamp'])
if item['LifeCycleState'] == self.STATE_AVAILABLE: if item['LifeCycleState'] == self.STATE_AVAILABLE:

@ -83,10 +83,15 @@ life_cycle_state:
type: str type: str
sample: creating, available, deleting, deleted sample: creating, available, deleting, deleted
mount_point: mount_point:
description: url of file system description: url of file system with leading dot from the time AWS EFS required to add network suffix to EFS address
returned: always returned: always
type: str type: str
sample: .fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/ sample: .fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/
filesystem_address:
description: url of file system
returned: always
type: str
sample: fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/
mount_targets: mount_targets:
description: list of mount targets description: list of mount targets
returned: always returned: always
@ -251,10 +256,15 @@ class EFSConnection(object):
for item in file_systems: for item in file_systems:
item['CreationTime'] = str(item['CreationTime']) item['CreationTime'] = str(item['CreationTime'])
""" """
Suffix of network path to be used as NFS device for mount. More detail here: In the time when MountPoint was introduced there was a need to add a suffix of network path before one could use it
AWS updated it and now there is no need to add a suffix. MountPoint is left for back-compatibility purpose
And new FilesystemAddress variable is introduced for direct use with other modules (e.g. mount)
AWS documentation is available here:
http://docs.aws.amazon.com/efs/latest/ug/gs-step-three-connect-to-ec2-instance.html http://docs.aws.amazon.com/efs/latest/ug/gs-step-three-connect-to-ec2-instance.html
""" """
item['MountPoint'] = '.%s.efs.%s.amazonaws.com:/' % (item['FileSystemId'], self.region) item['MountPoint'] = '.%s.efs.%s.amazonaws.com:/' % (item['FileSystemId'], self.region)
item['FilesystemAddress'] = '%s.efs.%s.amazonaws.com:/' % (item['FileSystemId'], self.region)
if 'Timestamp' in item['SizeInBytes']: if 'Timestamp' in item['SizeInBytes']:
item['SizeInBytes']['Timestamp'] = str(item['SizeInBytes']['Timestamp']) item['SizeInBytes']['Timestamp'] = str(item['SizeInBytes']['Timestamp'])
result = camel_dict_to_snake_dict(item) result = camel_dict_to_snake_dict(item)

Loading…
Cancel
Save