Nautobot NetBox Importer API Package¶
nautobot_netbox_importer.diffsync
¶
DiffSync adapter and model implementation for nautobot-netbox-importer.
adapters
¶
DiffSync adapters for nautobot-netbox-importer.
NautobotDiffSync
¶
Bases: N2NDiffSync
DiffSync adapter integrating with the Nautobot database.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|
__init__(args, bypass_data_validation=False, kwargs)
¶
Initialization of a NautobotDiffSync adapater instance.
load()
¶
Load all available and relevant data from Nautobot in the appropriate sequence.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
load_model(diffsync_model, record)
¶
Instantiate the given DiffSync model class from the given Django record.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
restore_required_custom_fields(source)
¶
Post-synchronization cleanup function to restore any 'required=True' custom field records.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
sync_complete(source, args, kwargs)
¶
Callback invoked after completing a sync operation in which changes occurred.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
abstract
¶
Abstract base DiffSync adapter class for code shared by NetBox and Nautobot adapters.
N2NDiffSync
¶
Bases: DiffSync
Generic DiffSync adapter base class for working with NetBox/Nautobot data models.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
|
__init__(args, verbosity=0, kwargs)
¶
Initialize this container, including its PK-indexed alternate data store.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
add(obj)
¶
Add a DiffSync model to the store, as well as registering it by PK for fast later retrieval.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
get_by_pk(obj, pk)
¶
Retrieve a previously loaded object by its primary key.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
get_fk_identifiers(source_object, target_class, pk)
¶
Helper to load_record: given a class and a PK, get the identifiers of the given instance.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
make_model(diffsync_model, data)
¶
Instantiate and add the given diffsync_model.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
sync_complete(source, diff, flags=DiffSyncFlags.NONE, logger=None)
¶
Callback invoked after completing a sync operation in which changes occurred.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
sync_from(source, diff_class=Diff, flags=DiffSyncFlags.NONE, callback=None, diff=None)
¶
Synchronize data from the given source DiffSync object into the current DiffSync object.
Source code in nautobot_netbox_importer/diffsync/adapters/abstract.py
nautobot
¶
DiffSync adapter for Nautobot database.
IGNORED_FIELD_CLASSES = (GenericRel, GenericForeignKey, models.ManyToManyRel, models.ManyToOneRel)
module-attribute
¶
Field types that will appear in record._meta.get_fields() but can be generally ignored.
The *Rel
models are reverse-lookup relations and are not "real" fields on the model.
We handle GenericForeignKeys by managing their component content_type
and id
fields separately.
NautobotDiffSync
¶
Bases: N2NDiffSync
DiffSync adapter integrating with the Nautobot database.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|
__init__(args, bypass_data_validation=False, kwargs)
¶
Initialization of a NautobotDiffSync adapater instance.
load()
¶
Load all available and relevant data from Nautobot in the appropriate sequence.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
load_model(diffsync_model, record)
¶
Instantiate the given DiffSync model class from the given Django record.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
restore_required_custom_fields(source)
¶
Post-synchronization cleanup function to restore any 'required=True' custom field records.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
sync_complete(source, args, kwargs)
¶
Callback invoked after completing a sync operation in which changes occurred.
Source code in nautobot_netbox_importer/diffsync/adapters/nautobot.py
netbox
¶
DiffSync adapters for NetBox data dumps.
NetBox210DiffSync
¶
Bases: N2NDiffSync
DiffSync adapter for working with data from NetBox 2.10.x.
Source code in nautobot_netbox_importer/diffsync/adapters/netbox.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
|
unsupported_fields
property
¶
Public interface for accessing class attr _unsupported_fields
.
__init__(args, source_data=None, kwargs)
¶
Store the provided source_data for use when load() is called later.
load()
¶
Load records from the provided source_data into DiffSync.
Source code in nautobot_netbox_importer/diffsync/adapters/netbox.py
load_record(diffsync_model, record)
¶
Instantiate the given model class from the given record.
Source code in nautobot_netbox_importer/diffsync/adapters/netbox.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
|
models
¶
DiffSync model class definitions for nautobot-netbox-importer.
Note that in most cases the same model classes are used for both NetBox imports and Nautobot exports. Because this plugin is meant only for NetBox-to-Nautobot migration, the create/update/delete methods on these classes are for populating data into Nautobot only, never the reverse.
Aggregate
¶
Bases: PrimaryModel
An aggregate exists at the root level of the IP address space hierarchy.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
__init__(args, kwargs)
¶
Clean up prefix to an IPNetwork before initializing as normal.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
Cable
¶
Bases: StatusModelMixin
, PrimaryModel
A physical connection between two endpoints.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
invalid_type_to_other(values)
¶
Default invalid type
fields to use other
type.
The type
field uses a ChoiceSet to limit valid choices. This uses Pydantic's
root_validator to clean up the type
data before loading it into a Model
instance. All invalid types will be changed to "other."
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
Circuit
¶
Bases: StatusModelMixin
, PrimaryModel
A communications circuit connects two points.
Source code in nautobot_netbox_importer/diffsync/models/circuits.py
check_install_date(value)
¶
Pre-cleaning: in JSON dump from Django, date string is formatted differently than Pydantic expects.
Source code in nautobot_netbox_importer/diffsync/models/circuits.py
CircuitTermination
¶
Bases: CableTerminationMixin
, NautobotBaseModel
An endpoint of a Circuit.
Source code in nautobot_netbox_importer/diffsync/models/circuits.py
CircuitType
¶
Bases: OrganizationalModel
Circuits can be organized by their functional role.
Source code in nautobot_netbox_importer/diffsync/models/circuits.py
Cluster
¶
Bases: PrimaryModel
A cluster of VirtualMachines, optionally associated with one or more Devices.
Source code in nautobot_netbox_importer/diffsync/models/virtualization.py
ClusterGroup
¶
Bases: OrganizationalModel
An organizational group of Clusters.
Source code in nautobot_netbox_importer/diffsync/models/virtualization.py
ClusterType
¶
Bases: OrganizationalModel
A type of Cluster.
Source code in nautobot_netbox_importer/diffsync/models/virtualization.py
ConfigContext
¶
Bases: ChangeLoggedModelMixin
, NautobotBaseModel
A set of arbitrary data available to Devices and VirtualMachines.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
ConsolePort
¶
Bases: CableTerminationMixin
, ComponentModel
A physical console port within a Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
ConsolePortTemplate
¶
Bases: ComponentTemplateModel
A template for a ConsolePort.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
ConsoleServerPort
¶
Bases: CableTerminationMixin
, ComponentModel
A physical port that provides access to console ports.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
ConsoleServerPortTemplate
¶
Bases: ComponentTemplateModel
A template for a ConsoleServerPort.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
ContentType
¶
Bases: DjangoBaseModel
A reference to a model type, in the form (
Source code in nautobot_netbox_importer/diffsync/models/contenttypes.py
__init__(args, app_label=None, model=None, kwargs)
¶
Map NetBox 'auth.user' content type to Nautobot 'users.user' content type.
Source code in nautobot_netbox_importer/diffsync/models/contenttypes.py
CustomField
¶
Bases: NautobotBaseModel
Custom field defined on a model(s).
Source code in nautobot_netbox_importer/diffsync/models/extras.py
special_clean(diffsync, ids, attrs)
classmethod
¶
Special-case handling for the "default" attribute.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
CustomFieldChoice
¶
Bases: NautobotBaseModel
One of the valid options for a CustomField of type "select" or "multiselect".
Source code in nautobot_netbox_importer/diffsync/models/extras.py
CustomLink
¶
Bases: ChangeLoggedModelMixin
, NautobotBaseModel
A custom link to an external representation of a Nautobot object.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
Config
¶
Device
¶
Bases: ConfigContextModelMixin
, StatusModelMixin
, PrimaryModel
A Device represents a piece of physical hardware mounted within a Rack.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
DeviceBay
¶
Bases: ComponentModel
An empty space within a Device which can house a child Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
DeviceBayTemplate
¶
DeviceRole
¶
Bases: OrganizationalModel
Devices are organized by functional role.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
DeviceType
¶
Bases: PrimaryModel
A DeviceType represents a particular make and model of device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
ExportTemplate
¶
Bases: ChangeLoggedModelMixin
, NautobotBaseModel
A Jinja2 template for exporting records as text.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
FrontPort
¶
Bases: CableTerminationMixin
, ComponentModel
A pass-through port on the front of a Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
FrontPortTemplate
¶
Bases: ComponentTemplateModel
A template for a FrontPort.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
Group
¶
Bases: DjangoBaseModel
Definition of a user group.
Source code in nautobot_netbox_importer/diffsync/models/auth.py
IPAddress
¶
Bases: StatusModelMixin
, PrimaryModel
An individual IPv4 or IPv6 address.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
__init__(args, kwargs)
¶
Clean up address to an IPNetwork before initializing as normal.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
ImageAttachment
¶
Bases: NautobotBaseModel
An uploaded image which is associated with an object.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
imagefieldfile_to_str(value)
¶
Convert ImageFieldFile objects to strings.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
Interface
¶
Bases: BaseInterfaceMixin
, CableTerminationMixin
, ComponentModel
A network interface within a Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
InterfaceTemplate
¶
Bases: ComponentTemplateModel
A template for a physical data interface.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
InventoryItem
¶
Bases: MPTTModelMixin
, ComponentModel
A serialized piece of hardware within a Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
JobResult
¶
Bases: NautobotBaseModel
Results of running a Job / Script / Report.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
Manufacturer
¶
Bases: OrganizationalModel
A Manufacturer represents a company which produces hardware devices.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
Note
¶
Bases: ChangeLoggedModelMixin
, NautobotBaseModel
Representation of NetBox JournalEntry to Nautobot Note.
NetBox fields ignored: kind Nautobot fields not supported by NetBox: user_name, slug
Source code in nautobot_netbox_importer/diffsync/models/extras.py
ObjectPermission
¶
Bases: NautobotBaseModel
A mapping of view, add, change, and/or delete permissions for users and/or groups.
Source code in nautobot_netbox_importer/diffsync/models/users.py
Permission
¶
Bases: DjangoBaseModel
Definition of a permissions rule.
Source code in nautobot_netbox_importer/diffsync/models/auth.py
__init__(args, kwargs)
¶
Set the IGNORE flag on permissions that refer to content-types that do not exist in Nautobot.
Source code in nautobot_netbox_importer/diffsync/models/auth.py
Platform
¶
Bases: OrganizationalModel
Platform refers to the software or firmware running on a device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
PowerFeed
¶
Bases: CableTerminationMixin
, StatusModelMixin
, PrimaryModel
An electrical circuit delivered from a PowerPanel.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
PowerOutlet
¶
Bases: CableTerminationMixin
, ComponentModel
A physical power outlet (output) within a Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
PowerOutletTemplate
¶
Bases: ComponentTemplateModel
A template for a PowerOutlet.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
PowerPanel
¶
Bases: PrimaryModel
A distribution point for electrical power.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
PowerPort
¶
Bases: CableTerminationMixin
, ComponentModel
A physical power supply (input) port within a Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
PowerPortTemplate
¶
Bases: ComponentTemplateModel
A template for a PowerPort.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
Prefix
¶
Bases: StatusModelMixin
, PrimaryModel
An IPv4 or IPv4 network, including mask.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
__init__(args, kwargs)
¶
Clean up prefix to an IPNetwork before initializing as normal.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
Provider
¶
Bases: PrimaryModel
Each Circuit belongs to a Provider.
Source code in nautobot_netbox_importer/diffsync/models/circuits.py
ProviderNetwork
¶
Bases: PrimaryModel
Service Provider Network Model.
Source code in nautobot_netbox_importer/diffsync/models/circuits.py
RIR
¶
Bases: OrganizationalModel
A Regional Internet Registry (RIR).
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
Rack
¶
Bases: StatusModelMixin
, PrimaryModel
Devices are housed within Racks.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
invalid_type_to_other(values)
¶
Default invalid type
fields to use other
type.
The type
field uses a ChoiceSet to limit valid choices. This uses Pydantic's
root_validator to clean up the type
data before loading it into a Model
instance. All invalid types will be changed to "other."
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
RackGroup
¶
Bases: MPTTModelMixin
, OrganizationalModel
Racks can be grouped as subsets within a Site.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
RackReservation
¶
Bases: PrimaryModel
One or more reserved units within a Rack.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
RackRole
¶
Bases: OrganizationalModel
Racks can be organized by functional role.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
RearPort
¶
Bases: CableTerminationMixin
, ComponentModel
A pass-through port on the rear of a Device.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
RearPortTemplate
¶
Bases: ComponentTemplateModel
A template for a RearPort.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
Region
¶
Bases: MPTTModelMixin
, OrganizationalModel
Sites can be grouped within geographic Regions.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
Role
¶
Bases: OrganizationalModel
The functional role of a Prefix or VLAN.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
RouteTarget
¶
Bases: PrimaryModel
A BGP extended community.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
Service
¶
Bases: PrimaryModel
A layer-four service such as HTTP or SSH.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
Site
¶
Bases: StatusModelMixin
, PrimaryModel
A Site represents a geographic location within a network.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
__init__(args, kwargs)
¶
Explicitly convert time_zone to a string if needed.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
Status
¶
Bases: ChangeLoggedModelMixin
, NautobotBaseModel
Representation of a status value.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
Tag
¶
Bases: ChangeLoggedModelMixin
, CustomFieldModelMixin
, NautobotBaseModel
A tag that can be associated with various objects.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
TaggedItem
¶
Bases: NautobotBaseModel
Mapping between a record and a Tag.
Source code in nautobot_netbox_importer/diffsync/models/extras.py
Tenant
¶
Bases: PrimaryModel
A Tenant represents an organization served by the application owner.
Source code in nautobot_netbox_importer/diffsync/models/tenancy.py
TenantGroup
¶
Bases: MPTTModelMixin
, OrganizationalModel
An arbitrary collection of Tenants.
Source code in nautobot_netbox_importer/diffsync/models/tenancy.py
Token
¶
Bases: NautobotBaseModel
An API token used for user authentication.
Source code in nautobot_netbox_importer/diffsync/models/users.py
User
¶
Bases: NautobotBaseModel
A user account, for authentication and authorization purposes.
Note that in NetBox this is actually two separate models - Django's built-in User class, and a custom UserConfig class - while in Nautobot it is a single custom User class model.
Source code in nautobot_netbox_importer/diffsync/models/users.py
VLAN
¶
Bases: StatusModelMixin
, PrimaryModel
A distinct layer two forwarding domain.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
VLANGroup
¶
Bases: OrganizationalModel
An arbitrary collection of VLANs.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
VMInterface
¶
Bases: CustomFieldModelMixin
, BaseInterfaceMixin
, NautobotBaseModel
An interface on a VirtualMachine.
Source code in nautobot_netbox_importer/diffsync/models/virtualization.py
VRF
¶
Bases: PrimaryModel
A virtual routing and forwarding (VRF) table.
Source code in nautobot_netbox_importer/diffsync/models/ipam.py
VirtualChassis
¶
Bases: PrimaryModel
A collection of Devices which operate with a shared control plane.
Source code in nautobot_netbox_importer/diffsync/models/dcim.py
create(diffsync, ids, attrs)
classmethod
¶
Create an instance of this model, both in Nautobot and in DiffSync.
There is an odd behavior (bug?) in Nautobot 1.0.0 wherein when creating a VirtualChassis with a predefined "master" Device, it changes the master device's position to 1 regardless of what it was previously configured to. This will cause us problems later when we attempt to associate member devices with the VirtualChassis if there's a member that's supposed to be using position 1. So, we take it upon ourselves to overrule Nautobot and put the master back into the position it's supposed to be in.