Lines Matching refs:hostnames
143 self.parser.add_option('-N', '--hostnames-only', help='Only return '
144 'hostnames for the machines queried.',
191 '--hostnames-only.')
215 hostnames=self.hosts,
515 @param hosts: list of hostnames
663 @return A list of hostnames which have been successfully modified.
808 @param hosts: A list of hostnames as strings.
947 @return A list of hostnames which have been successfully deleted.
980 @return A list of hostnames which have been successfully deleted.
1021 help=('Rename hostnames for migration. Rename '
1028 help=('Rename hostnames for migration rollback. '
1055 print('This will be a dryrun and will not rename hostnames.')
1167 def _remove_invalid_hostnames(self, hostnames, log_failure=False):
1168 """Remove hostnames with MIGRATED_HOST_SUFFIX.
1170 @param hostnames: A list of hostnames.
1173 @return A list of valid hostnames.
1176 for hostname in hostnames:
1184 hostnames = list(set(hostnames) - invalid_hostnames)
1186 return hostnames
1191 hostnames = self._remove_invalid_hostnames(self.hosts, log_failure=True)
1195 if hostnames:
1198 filters['hostname__in'] = hostnames
1203 for h in hostnames]
1229 hostnames = [h['hostname'] for h in results]
1232 hostnames = self._remove_invalid_hostnames(hostnames)
1235 hostnames = [_remove_hostname_suffix(h, MIGRATED_HOST_SUFFIX)
1236 for h in hostnames]
1238 return self.execute_skylab_migration(hostnames)
1276 def execute_skylab_migration(self, hostnames):
1279 @param hostnames: A list of hostnames to migrate.
1280 @return If there're hosts to migrate, return a list of the hostnames and
1284 if not hostnames:
1311 hostnames=hostnames)
1314 hostnames=hostnames)
1317 # Hostnames in afe_hosts tabel.
1331 label_map=label_map, hostnames=hostnames)
1334 label_map=label_map, hostnames=hostnames)
1337 # Hostnames in afe_hosts tabel.
1376 hostnames = [h.common.hostname for h in devices]
1378 print('Migrating hosts: %s' % ','.join(hostnames))
1381 print('Rolling back hosts: %s' % ','.join(hostnames))