Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to add associated actors in ThreatActor #110

Closed
rpiazza opened this issue Apr 10, 2014 · 7 comments
Closed

Need to add associated actors in ThreatActor #110

rpiazza opened this issue Apr 10, 2014 · 7 comments

Comments

@rpiazza
Copy link

rpiazza commented Apr 10, 2014

No description provided.

@jonathanbaker jonathanbaker changed the title Need to add associated actors in ThreadActor Need to add associated actors in ThreatActor Apr 10, 2014
@gtback
Copy link
Contributor

gtback commented Apr 16, 2014

@rpiazza
Copy link
Author

rpiazza commented Apr 16, 2014

I think the issue is that there is no method to add an associated actor. You can have more than 1, so usually there is an add... method in the API in that case. I could always just append, but I thought that wasn't the paradigm.

@bworrell
Copy link
Contributor

A while back, @gtback introduced a couple of base classes that GREATLY help in reducing the amount of code we need to write for STIX fields that have a multiplicity > 1 (i.e., lists).

However, this introduced a new pattern that deviated from the way that we had interacted with these lists in the past. Instead of something.add_foo(bar) calls, you do something.foo.append(bar). Well, we could always do the something.foo.append(bar), but now it is forced since we don't have the associated add_foo() method.

I'd like to go back through the codebase and add the def add_foo(...) methods to our classes where they are missing, just for consistency. This way, developers will be able to interact with these lists directly via the property or via the method.

@rpiazza
Copy link
Author

rpiazza commented Apr 17, 2014

So - for the near future, I should just use the append pattern?

@bworrell
Copy link
Contributor

@rpiazza - Yup!

@gtback
Copy link
Contributor

gtback commented Apr 17, 2014

+1 for append() 😄

@bworrell
Copy link
Contributor

bworrell commented May 2, 2014

I am going to close this out since we have a way of adding associated threat actors. Issue #117 refrs to the add_foo() pattern.

@bworrell bworrell closed this as completed May 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants