def add_service_port(service, port):
 if (service not in get_services(permanent=True)):
  raise CommandExecutionError('The service does not exist.')
 cmd = '--permanent --service={0} --add-port={1}'.format(service, port)
 return __firewall_cmd(cmd)

def add_service_port ( service , port ) : if ( service not in get_services ( permanent = True ) ) : raise CommandExecutionError ( 'The service does not exist.' ) cmd = '--permanent --service={0} --add-port={1}' . format ( service , port ) return __firewall_cmd ( cmd )
add a new port to the specified service .