Skip to content

Commit

Permalink
Include both Keystone 2/3 profiles by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Feb 26, 2020
1 parent 39b3e93 commit 2e29d5b
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 39 deletions.
Expand Up @@ -93,7 +93,7 @@ public void testCustomProvider() throws Exception {
final Profile rackspace = new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Rackspace US.cyberduckprofile"));
assertEquals(new SwiftProtocol(), rackspace.getProtocol());
factory.register(rackspace);
final Profile generic = new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Swift.cyberduckprofile"));
final Profile generic = new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Openstack Swift (Keystone 2).cyberduckprofile"));
assertEquals(new SwiftProtocol(), generic.getProtocol());
factory.register(generic);
assertEquals(rackspace, new CommandLineUriParser(input, factory).parse("rackspace://container//").getProtocol());
Expand Down
Expand Up @@ -49,16 +49,6 @@ public boolean isHostnameConfigurable() {
return true;
}

@Override
public String getUsernamePlaceholder() {
return "Tenant ID:Access Key";
}

@Override
public String getPasswordPlaceholder() {
return "Secret Key";
}

@Override
public String getContext() {
return PreferencesFactory.get().getProperty("openstack.authentication.context");
Expand Down
Expand Up @@ -30,7 +30,7 @@ public class HostParserTest {
@Test
public void testParseCustomHostname() throws Exception {
final ProtocolFactory factory = new ProtocolFactory(new LinkedHashSet<>(Collections.singletonList(new SwiftProtocol())));
factory.register(new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Swift.cyberduckprofile")));
factory.register(new ProfilePlistReader(factory).read(this.getClass().getResourceAsStream("/Openstack Swift (Keystone 2).cyberduckprofile")));
final Host host = new HostParser(factory).get("swift://auth.cloud.ovh.net/container/");
assertEquals("auth.cloud.ovh.net", host.getHostname());
assertEquals(Protocol.Type.swift, host.getProtocol().getType());
Expand Down
18 changes: 18 additions & 0 deletions profiles/default/Openstack Swift (Keystone 2).cyberduckprofile
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Protocol</key>
<string>swift</string>
<key>Vendor</key>
<string>keystone2</string>
<key>Context</key>
<string>/v2.0/tokens</string>
<key>Description</key>
<string>OpenStack Swift (Keystone 2.0)</string>
<key>Username Placeholder</key>
<string>Tenant ID:Access Key</string>
<key>Password Placeholder</key>
<string>Secret Key</string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions profiles/default/Openstack Swift (Keystone 3).cyberduckprofile
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Protocol</key>
<string>swift</string>
<key>Vendor</key>
<string>keystone3</string>
<key>Context</key>
<string>/v3/auth/tokens</string>
<key>Description</key>
<string>OpenStack Swift (Keystone 3)</string>
<key>Username Placeholder</key>
<string>Project:Domain:Username</string>
<key>Password Placeholder</key>
<string>Password</string>
</dict>
</plist>
27 changes: 0 additions & 27 deletions profiles/default/Swift.cyberduckprofile

This file was deleted.

0 comments on commit 2e29d5b

Please sign in to comment.