Class: ProxyAPI::ContainerGateway

Inherits:
Resource
  • Object
show all
Defined in:
lib/proxy_api/container_gateway.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ ContainerGateway

Returns a new instance of ContainerGateway.



3
4
5
6
# File 'lib/proxy_api/container_gateway.rb', line 3

def initialize(args)
  @url = args[:url] + "/container_gateway"
  super args
end

Instance Method Details

#host_repository_mapping(args) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/proxy_api/container_gateway.rb', line 40

def host_repository_mapping(args)
  # put '/v2/update_host_repository_mapping/?'
  @url += "/host_repository_mapping"
  parse put(args)
rescue => e
  raise ::ProxyAPI::ProxyException.new(url, e, N_("Unable to refresh host-repository mapping"))
end

#repository_list(args) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/proxy_api/container_gateway.rb', line 8

def repository_list(args)
  # put '/v2/repository_list/?'
  @url += "/repository_list"
  parse put(args)
rescue => e
  raise ::ProxyAPI::ProxyException.new(url, e, N_("Unable to update the repository list"))
end

#update_host_repositories(args) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/proxy_api/container_gateway.rb', line 48

def update_host_repositories(args)
  # put '/v2/update_host_repositories/?'
  @url += "/update_host_repositories"
  parse put(args)
rescue => e
  raise ::ProxyAPI::ProxyException.new(url, e, N_("Unable to update host-repository mapping"))
end

#update_hosts(args) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/proxy_api/container_gateway.rb', line 32

def update_hosts(args)
  # put '/v2/update_hosts/?'
  @url += "/update_hosts"
  parse put(args)
rescue => e
  raise ::ProxyAPI::ProxyException.new(url, e, N_("Unable to update hosts"))
end

#user_repository_mapping(args) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/proxy_api/container_gateway.rb', line 16

def user_repository_mapping(args)
  # put '/v2/user_repository_mapping/?'
  @url += "/user_repository_mapping"
  parse put(args)
rescue => e
  raise ::ProxyAPI::ProxyException.new(url, e, N_("Unable to update the user-repository mapping"))
end

#usersObject



24
25
26
27
28
29
30
# File 'lib/proxy_api/container_gateway.rb', line 24

def users
  # get '/v2/users/?'
  @url += "/users"
  @users = parse get
rescue => e
  raise ::ProxyAPI::ProxyException.new(url, e, N_("Unable to get users"))
end