'Adds a port group to the host system object in the db.'

def _add_port_group(self, spec):

    pg_name = spec.name
    vswitch_name = spec.vswitchName
    vlanid = spec.vlanId
    vswitch_do = DataObject()
    vswitch_do.pnic = ['vmnic0']
    vswitch_do.name = vswitch_name
    vswitch_do.portgroup = [('PortGroup-%s' % pg_name)]
    vswitches = self.get('config.network.vswitch').HostVirtualSwitch
    vswitches.append(vswitch_do)
    host_pg_do = DataObject()
    host_pg_do.key = ('PortGroup-%s' % pg_name)
    pg_spec = DataObject()
    pg_spec.vlanId = vlanid
    pg_spec.name = pg_name
    host_pg_do.spec = pg_spec
    host_pgrps = self.get('config.network.portgroup').HostPortGroup
    host_pgrps.append(host_pg_do)
