Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions lib/deis-workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def self.login(username, password, uri)
def whoami
get('/v2/auth/whoami').parsed_response['username']
end

def users_list
get('/v2/users').parsed_response['results']
end
Expand Down Expand Up @@ -104,7 +104,7 @@ def perms_list(app_name)
end

### App config methods

def config_list(app_name)
get("#{app_path(app_name)}/config/").parsed_response['values']
end
Expand All @@ -131,6 +131,28 @@ def app_limit_unset(app_name, limit_type, pod_type)
}).success?
end

def certs_create(name, certificate, private_key)
puts "X"
post("/v2/certs/", {
"name" => name,
"certificate" => certificate,
"key" => private_key
}).success?
end

def certs_delete(name)
delete("/v2/certs/#{name}").success?
end

def certs_domain_attach(name, domain)
post("/v2/certs/#{name}/domain/", {
"domain" => domain
}).success?
end

def certs_domain_detach(name, domain)
delete("/v2/certs/#{name}/domain/#{domain}/").success?
end

private

Expand Down