From 2e29d5b1cc30f304608e1b91f004ec1a478e5fc4 Mon Sep 17 00:00:00 2001 From: David Kocher Date: Wed, 26 Feb 2020 21:22:50 +0100 Subject: [PATCH] Include both Keystone 2/3 profiles by default. --- .../cli/CommandLineUriParserTest.java | 2 +- .../core/openstack/SwiftProtocol.java | 10 ------- .../ch/cyberduck/core/HostParserTest.java | 2 +- ...nstack Swift (Keystone 2).cyberduckprofile | 18 +++++++++++++ ...nstack Swift (Keystone 3).cyberduckprofile | 18 +++++++++++++ profiles/default/Swift.cyberduckprofile | 27 ------------------- 6 files changed, 38 insertions(+), 39 deletions(-) create mode 100644 profiles/default/Openstack Swift (Keystone 2).cyberduckprofile create mode 100644 profiles/default/Openstack Swift (Keystone 3).cyberduckprofile delete mode 100644 profiles/default/Swift.cyberduckprofile diff --git a/cli/src/test/java/ch/cyberduck/cli/CommandLineUriParserTest.java b/cli/src/test/java/ch/cyberduck/cli/CommandLineUriParserTest.java index 9259025e938..b25f36fb15a 100644 --- a/cli/src/test/java/ch/cyberduck/cli/CommandLineUriParserTest.java +++ b/cli/src/test/java/ch/cyberduck/cli/CommandLineUriParserTest.java @@ -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()); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftProtocol.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftProtocol.java index 19fe742e294..12c0b38247f 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftProtocol.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftProtocol.java @@ -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"); diff --git a/openstack/src/test/java/ch/cyberduck/core/HostParserTest.java b/openstack/src/test/java/ch/cyberduck/core/HostParserTest.java index 1c7aa88791c..0ab1d2c156b 100644 --- a/openstack/src/test/java/ch/cyberduck/core/HostParserTest.java +++ b/openstack/src/test/java/ch/cyberduck/core/HostParserTest.java @@ -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()); diff --git a/profiles/default/Openstack Swift (Keystone 2).cyberduckprofile b/profiles/default/Openstack Swift (Keystone 2).cyberduckprofile new file mode 100644 index 00000000000..6fd1408ad0d --- /dev/null +++ b/profiles/default/Openstack Swift (Keystone 2).cyberduckprofile @@ -0,0 +1,18 @@ + + + + + Protocol + swift + Vendor + keystone2 + Context + /v2.0/tokens + Description + OpenStack Swift (Keystone 2.0) + Username Placeholder + Tenant ID:Access Key + Password Placeholder + Secret Key + + diff --git a/profiles/default/Openstack Swift (Keystone 3).cyberduckprofile b/profiles/default/Openstack Swift (Keystone 3).cyberduckprofile new file mode 100644 index 00000000000..1341fcd8e1c --- /dev/null +++ b/profiles/default/Openstack Swift (Keystone 3).cyberduckprofile @@ -0,0 +1,18 @@ + + + + + Protocol + swift + Vendor + keystone3 + Context + /v3/auth/tokens + Description + OpenStack Swift (Keystone 3) + Username Placeholder + Project:Domain:Username + Password Placeholder + Password + + diff --git a/profiles/default/Swift.cyberduckprofile b/profiles/default/Swift.cyberduckprofile deleted file mode 100644 index 65fc850933e..00000000000 --- a/profiles/default/Swift.cyberduckprofile +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - Protocol - swift - Vendor - iterate GmbH - Bundled - - -