diff --git a/netbox_agent/server.py b/netbox_agent/server.py index bdc1407..c755a71 100644 --- a/netbox_agent/server.py +++ b/netbox_agent/server.py @@ -62,7 +62,7 @@ class ServerBase(): def get_netbox_datacenter(self): dc = self.get_datacenter() if dc is None: - logging.error("Specificing a datacenter (Site) is mandatory in Netbox") + logging.error("Specifying a datacenter (Site) is mandatory in Netbox") sys.exit(1) nb_dc = nb.dcim.sites.get( diff --git a/netbox_agent/virtualmachine.py b/netbox_agent/virtualmachine.py index db2cdb0..03a5008 100644 --- a/netbox_agent/virtualmachine.py +++ b/netbox_agent/virtualmachine.py @@ -96,8 +96,7 @@ class VirtualMachine(object): vm = nb.virtualization.virtual_machines.create( name=hostname, cluster=cluster.id, - platform=self.device_platform, - device_platform=self.device_platform, + platform=self.device_platform.id, vcpus=vcpus, memory=memory, tenant=tenant.id if tenant else None,