Home | History | Annotate | Download | only in site_utils

Lines Matching refs:Hostname

47                     hostname=exclude_server.hostname)
52 (role, exclude_server.hostname, role))
56 def get_servers(hostname=None, role=None, status=None):
59 @param hostname: hostname of the server.
66 if hostname:
67 filters['hostname'] = hostname
80 Hostname : server2
88 Hostname | Status | Roles | Date Created | Date Modified | Note
114 # Hostname, Status, Roles, Date Created, Date Modified, Note
115 TABLEVIEW_FORMAT = ('%(hostname)-30s | %(status)-7s | %(roles)-20s | '
124 {'hostname':'Hostname', 'status':'Status',
130 {'hostname':server.hostname,
143 result += '%s(%s), ' % (server.hostname, server.status)
145 servers_without_role = [s.hostname for s in servers
152 def check_server(hostname, role):
153 """Confirm server with given hostname is ready to be primary of given role.
159 @param hostname: hostname of the server.
167 infra.execute_command(hostname, 'true')
171 (hostname, e))
176 """Decorator to check if server with given hostname exists in the database.
195 given hostname is not found in server database.
197 given hostname is found in server database.
203 hostname = kwargs['hostname']
205 server = server_models.Server.objects.get(hostname=hostname)
211 hostname)
214 'database.' % hostname)
229 return [s.hostname for s in servers]
241 (server.hostname, attribute))
244 server.hostname)
262 (attribute, server.hostname, value))
268 (attribute, server.hostname, old_value, value))
273 (attribute, server.hostname, value))
283 return [s.hostname for s in servers]
286 def confirm_server_has_role(hostname, role):
289 @param hostname: hostname of the server.
294 if hostname.lower() in ['localhost', '127.0.0.1']:
295 hostname = socket.gethostname()
296 hostname = utils.normalize_hostname(hostname)
300 if hostname == utils.normalize_hostname(server.hostname):
303 'status primary.' % (hostname, role))