|
39 | 39 | import com.dtolabs.rundeck.plugins.ServiceNameConstants;
|
40 | 40 | import com.dtolabs.rundeck.plugins.util.DescriptionBuilder;
|
41 | 41 |
|
42 |
| -@Plugin(name = "aws-s3-source", service = ServiceNameConstants.ResourceModelSource) |
| 42 | +@Plugin(name = "aws-s3-source-chris", service = ServiceNameConstants.ResourceModelSource) |
43 | 43 | public class S3ResourceModelSource implements ResourceModelSourceFactory,Describable {
|
44 |
| - public static final String PROVIDER_NAME = "aws-s3-source"; |
| 44 | + public static final String PROVIDER_NAME = "aws-s3-source-chris"; |
45 | 45 |
|
46 | 46 | private Framework framework;
|
47 | 47 |
|
@@ -88,29 +88,32 @@ public class S3ResourceModelSource implements ResourceModelSourceFactory,Describ
|
88 | 88 | "json"
|
89 | 89 | ));
|
90 | 90 |
|
91 |
| - final static Map<String, Object> renderingOptionsAuthentication = getRenderOpt("Credentials",false); |
92 |
| - final static Map<String, Object> renderingOptionsConnection = getRenderOpt("Connection",false); |
93 |
| - final static Map<String, Object> renderingOptionsResource = getRenderOpt("Resource",false); |
| 91 | + final static Map<String, Object> renderingOptionsAuthentication = getRenderOpt("Credentials",false, true); |
| 92 | + final static Map<String, Object> renderingOptionsConnection = getRenderOpt("Connection",false, false); |
| 93 | + final static Map<String, Object> renderingOptionsResource = getRenderOpt("Resource",false, false); |
94 | 94 |
|
95 |
| - protected static Map<String, Object> getRenderOpt(String value, boolean secondary) { |
| 95 | + protected static Map<String, Object> getRenderOpt(String value, boolean secondary, boolean password) { |
96 | 96 | Map<String, Object> ret = new HashMap<>();
|
97 | 97 | ret.put(StringRenderingConstants.GROUP_NAME,value);
|
98 | 98 | if(secondary){
|
99 | 99 | ret.put(StringRenderingConstants.GROUPING,"secondary");
|
100 | 100 | }
|
| 101 | + if(password){ |
| 102 | + ret.put("displayType",StringRenderingConstants.DisplayType.PASSWORD); |
| 103 | + } |
101 | 104 | return ret;
|
102 | 105 | }
|
103 | 106 |
|
104 | 107 |
|
105 | 108 | static Description DESC = DescriptionBuilder.builder()
|
106 | 109 | .name(PROVIDER_NAME)
|
107 |
| - .title("AWS S3 remote model source") |
| 110 | + .title("AWS S3 remote model source - TEST") |
108 | 111 | .description("Obtain nodes information from a file located in a S3 bucket")
|
109 |
| - .property(PropertyUtil.string(KEY, "AWS Access Key", "AWS Access Key.", false, |
| 112 | + .property(PropertyUtil.string(KEY, "AWS Access Key", "AWS Access Key. - TEST", false, |
110 | 113 | null,null,null, renderingOptionsAuthentication))
|
111 |
| - .property(PropertyUtil.string(SECRET, "AWS Secret Key", "AWS Secret Key.", false, |
| 114 | + .property(PropertyUtil.string(SECRET, "AWS Secret Key", "AWS Secret Key. - TEST", false, |
112 | 115 | null,null,null, renderingOptionsAuthentication))
|
113 |
| - .property(PropertyUtil.string(CREDENTIALFILE, "AWS Credentials File", "Path to a AWSCredentials.properties file " + |
| 116 | + .property(PropertyUtil.string(CREDENTIALFILE, "AWS Credentials File - TEST", "Path to a AWSCredentials.properties file " + |
114 | 117 | "containing 'accessKey' and 'secretKey'.", false,
|
115 | 118 | null,null,null, renderingOptionsAuthentication))
|
116 | 119 |
|
|
0 commit comments