Package expedient :: Package clearinghouse :: Package slice :: Module models :: Class Slice
[hide private]
[frames] | no frames]

Class Slice

source code


Holds information about reservations across aggregates

Nested Classes [hide private]
  DoesNotExist
  MultipleObjectsReturned

Inherited from django.db.models.base.Model: __metaclass__

Instance Methods [hide private]
 
__unicode__(self) source code
 
start(self, user)
Should be an idempotent operation on the aggregates.
source code
 
stop(self, user)
Should be an idempotent operation on the aggregates.
source code
 
_get_aggregates(self)
Get all aggregates that can be used by the slice (i.e.
source code
 
get_update_url(*args, **kwargs)
Returns the URL to update slice info
 
get_detail_url(*args, **kwargs)
Returns the URL for the slice detail page
 
get_delete_url(*args, **kwargs)
Returns the URL to delete a slice
 
get_start_url(*args, **kwargs)
Returns the URL to start the slice
 
get_stop_url(*args, **kwargs)
Returns the URL to stop the slice
 
get_agg_add_url(*args, **kwargs)
Returns the URL to add an aggregate to a slice
 
get_agg_update_url(*args, **kwargs)
Returns URL to update an aggregate's info related to the slice
 
get_agg_remove_url(*args, **kwargs)
Returns URL to remove aggregate from slice
 
get_rsc_management_url(*args, **kwargs)
Returns the URL at which to select a UI plugin.
 
get_next_by_expiration_date(*moreargs, **morekwargs)
 
get_previous_by_expiration_date(*moreargs, **morekwargs)
 
objects(...)

Inherited from django.db.models.base.Model: __eq__, __hash__, __init__, __ne__, __reduce__, __repr__, __str__, clean, clean_fields, date_error_message, delete, full_clean, prepare_database_save, save, save_base, serializable_value, unique_error_message, validate_unique

Inherited from django.db.models.base.Model (private): _collect_sub_objects, _get_FIELD_display, _get_next_or_previous_by_FIELD, _get_next_or_previous_in_order, _get_pk_val, _get_unique_checks, _perform_date_checks, _perform_unique_checks, _set_pk_val

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
get_create_url(*args, **kwargs)
Returns the URL to create slices
source code
Class Variables [hide private]
  _base_manager = <django.db.models.manager.Manager object at 0x...
  _default_manager = <django.db.models.manager.Manager object at...
  _meta = <Options for Slice>
  geni_slice_info = <django.db.models.fields.related.SingleRelat...
  openflowsliceinfo = <django.db.models.fields.related.SingleRel...
  resource_set = <django.db.models.fields.related.ManyRelatedObj...
  sliver_set = <django.db.models.fields.related.ForeignRelatedOb...

Inherited from django.db.models.base.Model (private): _deferred

Instance Variables [hide private]
str name = models.CharField(max_length= 200, unique= True)
The name of the Slice
str description = models.TextField()
Short description of the slice
models.ForeignKey to Project project = models.ForeignKey(Project)
Project in which this slice belongs
User owner = models.ForeignKey(User, related_name= "owned_slices")
Original creator of the slice
bool started = models.BooleanField(default= False, editable= False)
Has this slice been reserved with the aggregates yet?
bool modified = models.BooleanField(default= False, editable= False)
Has this slice been modified since it was last reserved?
datetime.datetime instance expiration_date = LimitedDateTimeField(default= datetime.now, ...
Date and time of when the slice is going to expire in local time.
QuerySet of Aggregates aggregates
Read-only property returning all aggregates that can be used by the project (i.e.
Properties [hide private]

Inherited from django.db.models.base.Model: pk

Inherited from object: __class__

Method Details [hide private]

_get_aggregates(self)

source code 

Get all aggregates that can be used by the slice (i.e. for which the slice has the "can_use_aggregate" permission).

get_create_url(*args, **kwargs)
Class Method

source code 

Returns the URL to create slices

Decorators:
  • @models.permalink

get_update_url(*args, **kwargs)

 

Returns the URL to update slice info

Decorators:
  • @models.permalink

get_detail_url(*args, **kwargs)

 

Returns the URL for the slice detail page

Decorators:
  • @models.permalink

get_delete_url(*args, **kwargs)

 

Returns the URL to delete a slice

Decorators:
  • @models.permalink

get_start_url(*args, **kwargs)

 

Returns the URL to start the slice

Decorators:
  • @models.permalink

get_stop_url(*args, **kwargs)

 

Returns the URL to stop the slice

Decorators:
  • @models.permalink

get_agg_add_url(*args, **kwargs)

 

Returns the URL to add an aggregate to a slice

Decorators:
  • @models.permalink

get_agg_update_url(*args, **kwargs)

 

Returns URL to update an aggregate's info related to the slice

Decorators:
  • @models.permalink

get_agg_remove_url(*args, **kwargs)

 

Returns URL to remove aggregate from slice

Decorators:
  • @models.permalink

get_rsc_management_url(*args, **kwargs)

 

Returns the URL at which to select a UI plugin.

Decorators:
  • @models.permalink

Class Variable Details [hide private]

_base_manager

Value:
<django.db.models.manager.Manager object at 0x8d7edcc>

_default_manager

Value:
<django.db.models.manager.Manager object at 0x8d7edcc>

geni_slice_info

Value:
<django.db.models.fields.related.SingleRelatedObjectDescriptor object \
at 0x8faf86c>

openflowsliceinfo

Value:
<django.db.models.fields.related.SingleRelatedObjectDescriptor object \
at 0x8f7482c>

resource_set

Value:
<django.db.models.fields.related.ManyRelatedObjectsDescriptor object a\
t 0x8d8912c>

sliver_set

Value:
<django.db.models.fields.related.ForeignRelatedObjectsDescriptor objec\
t at 0x8d8966c>

Instance Variable Details [hide private]

expiration_date

Date and time of when the slice is going to expire in local time.
Type:
datetime.datetime instance
Value:
LimitedDateTimeField(default= datetime.now, help_text= "Enter a date a\
nd time. The date should be in the" " following format: 'YYYY-MM-DD'. \
And for the time: 'HH:MM:SS'." " The expiration date cannot be later t\
han %s days from" " now." % settings.MAX_SLICE_LIFE, max_date= _get_sl\
ice_max_date,)

aggregates

Read-only property returning all aggregates that can be used by the project (i.e. for which the project has the "can_use_aggregate" permission).
Get Method:
_get_aggregates(self) - Get all aggregates that can be used by the slice (i.e.