def add_port_profile(self, profile_name, vlan_id, device_id):
if not self.get_port_profile_for_vlan(vlan_id, device_id):<EOL><INDENT>port_profile = ucsm_model.PortProfile(profile_id=profile_name,<EOL>vlan_id=vlan_id,<EOL>device_id=device_id,<EOL>created_on_ucs=False)<EOL>with self.session.begin(subtransactions=True):<EOL><INDENT>self.session.add(port_profile)<EOL><DEDENT>return port_profile<EOL><DEDENT>
Adds a port profile and its vlan_id to the table.