All Downloads are FREE. Search and download functionalities are using the official Maven repository.

libraries.AwsEFS.pec Maven / Gradle / Ivy

There is a newer version: 0.1.57
Show newest version
define AwsEFS as native category with bindings:
	
	define category bindings as:
		Java: prompto.aws.EFS
	
and methods:
	
	define listFileSystems as method returning Document[] doing:
		Java: return this.listFileSystems();
		
	define createFileSystem as method receiving Text name, Text zoneName = Nothing, Boolean backup = true and Boolean waitForAvailability = true returning Text doing:
		Java: return this.createFileSystem(name, zoneName, backup, waitForAvailability);
		
	define dropFileSystem as method receiving Text fileSystemId and Boolean waitForDestruction = true doing:
		Java: this.dropFileSystem(fileSystemId, waitForDestruction);

	define listMountTargets as method receiving Text fileSystemId returning Document[] doing:
		Java: return this.listMountTargets(fileSystemId);
		
	define createMountTarget as method receiving Text fileSystemId, Text subnetId, Text[] securityGroupNames = nothing and Boolean waitForAvailability = true returning Text doing:
		Java: return this.createMountTarget(fileSystemId, subnetId, securityGroupNames, waitForAvailability);

	define dropMountTarget as method receiving Text mountTargetId and Boolean waitForDestruction = true doing:
		Java: return this.dropMountTarget(mountTargetId, waitForDestruction);
		


define newAwsEFS as native method receiving Text awsRegion, login = Nothing and password = Nothing returning AwsEFS doing:
	Java: prompto.aws.EFS.newInstance(awsRegion, login, password);


define newAwsEFSWithLocalCredentials as method receiving Text awsRegion returning AwsEFS doing:
	text = read all from Url with "file:/Users/ericvergnaud/Documents/Technical/Certificates/prompto-keys/aws/us-east-1/keys.json" as path
	keys = (readJson with text as text) as Document
	login = keys.accessKey as Text
	password = keys.secretKey as Text
	return newAwsEFS with awsRegion as awsRegion, login as login and password as password


define "EFS client is created" as test method doing:
	efs = newAwsEFSWithLocalCredentials with "us-east-1" as awsRegion
and verifying:
	efs is not Nothing


define "File systems are listed" as test method doing:
	efs = newAwsEFSWithLocalCredentials with "us-east-1" as awsRegion
	fs = efs.listFileSystems
and verifying:
	fs.count >= 0
	

define "File system is created and dropped" as test method doing:
	efs = newAwsEFSWithLocalCredentials with "us-east-1" as awsRegion
	before = efs.listFileSystems
	fsid = efs.createFileSystem "test-efs"
	after = efs.listFileSystems
	efs.dropFileSystem fsid
	after2 = efs.listFileSystems
and verifying:
	after.count = before.count + 1
	after2.count = before.count
	

define "Mount target is created and dropped" as test method doing:
	efs = newAwsEFSWithLocalCredentials with "us-east-1" as awsRegion
	fsid = efs.createFileSystem "test-efs"
	mtid = efs.createMountTarget with fsid as fileSystemId and "subnet-f9e252c5" as subnetId
	efs.dropMountTarget with mtid as mountTargetId
	efs.dropFileSystem with fsid as fileSystemId
and verifying:
	mtid is not nothing
 	




© 2015 - 2024 Weber Informatics LLC | Privacy Policy