from .label import Label
from .client_config import ClientConfig


def create(args):
    pxe_client = ClientConfig(args.ip_address, args.password, args.script)
    pxe_client.create(Label.find(args.label))
    msg = 'Created %s with password %s'
    print(msg % (pxe_client.file_path(), pxe_client.password))


def list(args):
    for pxe_client in ClientConfig.all():
        print('%s: %s' % (pxe_client.ip_address, pxe_client.label))


def remove(args):
    pxe_client = ClientConfig(args.ip_address)
    if pxe_client.remove():
        print('Removed', pxe_client.file_path())
    else:
        print('No entry found for', pxe_client.ip_address)


from .label import Label
from .client_config import ClientConfig


def create(args):
    pxe_client = ClientConfig(args.ip_address, args.password, args.script)
    used_options = pxe_client.create(Label.find(args.label))

    msg = 'Created %s with following Options:'

    print(msg % pxe_client.file_path())
    for option in used_options:
        print("\t%s" % option)


def list(args):
    for pxe_client in ClientConfig.all():
        print('%s: %s' % (pxe_client.ip_address, pxe_client.label))


def remove(args):
    pxe_client = ClientConfig(args.ip_address)
    if pxe_client.remove():
        print('Removed', pxe_client.file_path())
    else:
        print('No entry found for', pxe_client.ip_address)


Implement better result output for pxe config file crete
Implement better result output for pxe config file crete

  from .label import Label
  from .client_config import ClientConfig
  
  
  def create(args):
      pxe_client = ClientConfig(args.ip_address, args.password, args.script)
-     pxe_client.create(Label.find(args.label))
+     used_options = pxe_client.create(Label.find(args.label))
-     msg = 'Created %s with password %s'
+ 
+     msg = 'Created %s with following Options:'
+ 
-     print(msg % (pxe_client.file_path(), pxe_client.password))
+     print(msg % pxe_client.file_path())
+     for option in used_options:
+         print("\t%s" % option)
  
  
  def list(args):
      for pxe_client in ClientConfig.all():
          print('%s: %s' % (pxe_client.ip_address, pxe_client.label))
  
  
  def remove(args):
      pxe_client = ClientConfig(args.ip_address)
      if pxe_client.remove():
          print('Removed', pxe_client.file_path())
      else:
          print('No entry found for', pxe_client.ip_address)
  
  
Implement better result output for pxe config file crete
## Code Before:
from .label import Label
from .client_config import ClientConfig


def create(args):
    pxe_client = ClientConfig(args.ip_address, args.password, args.script)
    pxe_client.create(Label.find(args.label))
    msg = 'Created %s with password %s'
    print(msg % (pxe_client.file_path(), pxe_client.password))


def list(args):
    for pxe_client in ClientConfig.all():
        print('%s: %s' % (pxe_client.ip_address, pxe_client.label))


def remove(args):
    pxe_client = ClientConfig(args.ip_address)
    if pxe_client.remove():
        print('Removed', pxe_client.file_path())
    else:
        print('No entry found for', pxe_client.ip_address)


## Instruction:
Implement better result output for pxe config file crete
## Code After:
from .label import Label
from .client_config import ClientConfig


def create(args):
    pxe_client = ClientConfig(args.ip_address, args.password, args.script)
    used_options = pxe_client.create(Label.find(args.label))

    msg = 'Created %s with following Options:'

    print(msg % pxe_client.file_path())
    for option in used_options:
        print("\t%s" % option)


def list(args):
    for pxe_client in ClientConfig.all():
        print('%s: %s' % (pxe_client.ip_address, pxe_client.label))


def remove(args):
    pxe_client = ClientConfig(args.ip_address)
    if pxe_client.remove():
        print('Removed', pxe_client.file_path())
    else:
        print('No entry found for', pxe_client.ip_address)

