mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
This commit is contained in:
parent
01fb7ea150
commit
c4591f0861
2 changed files with 23 additions and 4 deletions
|
@ -135,10 +135,15 @@ life_cycle_state:
|
|||
type: string
|
||||
sample: "creating, available, deleting, deleted"
|
||||
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
|
||||
type: string
|
||||
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:
|
||||
description: list of mount targets
|
||||
returned: always
|
||||
|
@ -252,10 +257,14 @@ class EFSConnection(object):
|
|||
item['Name'] = item['CreationToken']
|
||||
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
|
||||
"""
|
||||
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']:
|
||||
item['SizeInBytes']['Timestamp'] = str(item['SizeInBytes']['Timestamp'])
|
||||
if item['LifeCycleState'] == self.STATE_AVAILABLE:
|
||||
|
|
|
@ -83,10 +83,15 @@ life_cycle_state:
|
|||
type: str
|
||||
sample: creating, available, deleting, deleted
|
||||
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
|
||||
type: str
|
||||
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:
|
||||
description: list of mount targets
|
||||
returned: always
|
||||
|
@ -251,10 +256,15 @@ class EFSConnection(object):
|
|||
for item in file_systems:
|
||||
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
|
||||
"""
|
||||
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']:
|
||||
item['SizeInBytes']['Timestamp'] = str(item['SizeInBytes']['Timestamp'])
|
||||
result = camel_dict_to_snake_dict(item)
|
||||
|
|
Loading…
Reference in a new issue