blob: 62293e01c95e84cbfa704694cce9d16dfe28a052 [file] [log] [blame]
Simon Hunt5f6dbf82016-03-30 08:53:33 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Simon Hunt5f6dbf82016-03-30 08:53:33 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.ui.model.topo;
18
Simon Hunt23fb1352016-04-11 12:15:19 -070019import org.slf4j.Logger;
20import org.slf4j.LoggerFactory;
21
22import java.util.Set;
23import java.util.TreeSet;
24
Simon Hunt5f6dbf82016-03-30 08:53:33 -070025/**
26 * Represents the overall network topology.
27 */
Simon Huntcda9c032016-04-11 10:32:54 -070028public class UiTopology extends UiElement {
Simon Hunt23fb1352016-04-11 12:15:19 -070029
30 private static final Logger log = LoggerFactory.getLogger(UiTopology.class);
31
32 private final UiCluster uiCluster = new UiCluster();
33 private final Set<UiRegion> uiRegions = new TreeSet<>();
34
35 /**
36 * Clears the topology state; that is, drops all regions, devices, hosts,
37 * links, and cluster members.
38 */
39 public void clear() {
40 log.debug("clearing topology model");
41 uiRegions.clear();
42 uiCluster.clear();
43 }
Simon Hunt5f6dbf82016-03-30 08:53:33 -070044}